DayZ 1.29
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( g_Game.GetPlayer().GetEntityInHands() );
242 if ( item_in_hands )
243 {
244 DayZPlayer player = g_Game.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 }
DayZGame g_Game
Определения DayZGame.c:3942
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:18

Перекрестные ссылки g_Game.