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

◆ OnExecute()

override void ActionTakeItem::OnExecute ( ActionData action_data)
inlineprivate

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

126 {
127 if (GetGame().IsDedicatedServer())
128 {
129 ClearActionJuncture(action_data);
130 return;
131 }
132
133 //Debug.Log("[Action DEBUG] Start time stamp: " + action_data.m_Player.GetSimulationTimeStamp());
134 ItemBase ntarget = ItemBase.Cast(action_data.m_Target.GetObject());
135 InventoryLocation il = action_data.m_ReservedInventoryLocations.Get(0);
136 InventoryLocation targetInventoryLocation = new InventoryLocation;
137 ntarget.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
138
139 ClearInventoryReservationEx(action_data);
140
141 //SplitItemUtils.TakeOrSplitToInventoryLocation( action_data.m_Player, il );
142
143 float stackable = ntarget.GetTargetQuantityMax(il.GetSlot());
144
145 if( stackable == 0 || stackable >= ntarget.GetQuantity() )
146 {
147 action_data.m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
148 }
149 else
150 {
151 ClearInventoryReservationEx(action_data);
152 ntarget.SplitIntoStackMaxToInventoryLocationClient( il );
153 }
154
155 //action_data.m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
156 }
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 CGame GetGame()

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