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

◆ OnExecute()

override void ActionTakeArrow::OnExecute ( ActionData action_data)
inlineprivate

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

94 {
95 if (g_Game.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 }
DayZGame g_Game
Определения DayZGame.c:3942
class GP5GasMask extends MaskBase ItemBase
void ClearActionJuncture(ActionData action_data)
Определения ActionBase.c:1104
void ClearInventoryReservationEx(ActionData action_data)
Определения ActionBase.c:1040
proto native int GetSlot()
returns slot id if current type is Attachment
proto native EntityAI GetItem()
returns item of current inventory location

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