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

◆ OnExecute()

override void ActionTakeArrow::OnExecute ( ActionData action_data)
inlineprivate

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

94 {
95 if (GetGame().IsDedicatedServer())
96 {
97 ClearActionJuncture(action_data);
98 return;
99 }
100
101 InventoryLocation il = action_data.m_ReservedInventoryLocations.Get(0);
102
103 ClearInventoryReservationEx(action_data);
104
105 ItemBase arrow = ItemBase.Cast(il.GetItem());
106 InventoryLocation arrowInventoryLocation = new InventoryLocation;
107 arrow.GetInventory().GetCurrentInventoryLocation(arrowInventoryLocation);
108
109 float stackable = arrow.GetTargetQuantityMax(il.GetSlot());
110
111 if ( stackable == 0 || stackable >= arrow.GetQuantity() )
112 {
113 action_data.m_Player.PredictiveTakeToDst(arrowInventoryLocation, il);
114 }
115 else
116 {
117 arrow.SplitIntoStackMaxToInventoryLocationClient( il );
118 }
119 }
class GP5GasMask extends MaskBase ItemBase
void ClearActionJuncture(ActionData action_data)
Определения ActionBase.c:1083
void ClearInventoryReservationEx(ActionData action_data)
Определения ActionBase.c:1025
proto native int GetSlot()
returns slot id if current type is Attachment
proto native EntityAI GetItem()
returns item of current inventory location
proto native CGame GetGame()

Перекрестные ссылки ActionData, ActionBase::ClearActionJuncture(), ActionBase::ClearInventoryReservationEx(), GetGame(), InventoryLocation::GetItem() и InventoryLocation::GetSlot().