DayZ 1.27
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 if ( GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands() && !GetGame().GetPlayer().GetInventory().HasInventoryReservation(item_in_hands, null) )
245 {
246 bool res = GetGame().GetPlayer().PredictiveTakeOrSwapAttachment( item_in_hands );
247 if(!res)
248 {
249 res = GetGame().GetPlayer().PredictiveTakeEntityToInventory(FindInventoryLocationType.ATTACHMENT, item_in_hands);
250 }
251 if(res)
252 {
253 m_MainWidget.FindAnyWidget("Cursor").Show( false );
254 m_MainWidget.FindAnyWidget("hands_preview_root").SetAlpha( 0.7 );
255 return true;
256 }
257 }
258 }
259 }
260 else if (GetFocusedContainer())
261 {
262 return GetFocusedContainer().EquipItem();
263 }
264 }
265 return false;
266 }
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().