DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ EquipItem()

override bool HandsContainer::EquipItem ( )
inlineprotected

См. определение в файле HandsContainer.c строка 235

236 {
237 if (CanEquip())
238 {
239 if (m_ActiveIndex == 0)
240 {
241 ItemBase item_in_hands = ItemBase.Cast( GetGame().GetPlayer().GetHumanInventory().GetEntityInHands() );
242 if ( item_in_hands )
243 {
244 DayZPlayer player = GetGame().GetPlayer();
245 if (player && player.GetHumanInventory().CanRemoveEntityInHands() && !player.GetInventory().HasInventoryReservation(item_in_hands, null))
246 {
247 bool res = player.PredictiveTakeOrSwapAttachment(item_in_hands);
248 if (!res)
249 {
250 res = player.PredictiveTakeEntityToInventory(FindInventoryLocationType.ATTACHMENT, item_in_hands);
251 }
252 if (res)
253 {
254 m_MainWidget.FindAnyWidget("Cursor").Show(false);
255 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha(0.7);
256 return true;
257 }
258 }
259 }
260 }
261 else if (GetFocusedContainer())
262 {
263 return GetFocusedContainer().EquipItem();
264 }
265 }
266 return false;
267 }
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native DayZPlayer GetPlayer()
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CGame::GetPlayer() и GetPlayer().