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

◆ OnExecute()

override void ActionTakeItem::OnExecute ( ActionData action_data)
inlineprivate

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

97 {
98 if (g_Game.IsDedicatedServer())
99 {
100 ClearActionJuncture(action_data);
101 return;
102 }
103
104 //Debug.Log("[Action DEBUG] Start time stamp: " + action_data.m_Player.GetSimulationTimeStamp());
105 ItemBase ntarget = ItemBase.Cast(action_data.m_Target.GetObject());
106 InventoryLocation il = action_data.m_ReservedInventoryLocations.Get(0);
107 InventoryLocation targetInventoryLocation = new InventoryLocation;
108 ntarget.GetInventory().GetCurrentInventoryLocation(targetInventoryLocation);
109
110 ClearInventoryReservationEx(action_data);
111
112 //SplitItemUtils.TakeOrSplitToInventoryLocation( action_data.m_Player, il );
113
114 float stackable = ntarget.GetTargetQuantityMax(il.GetSlot());
115
116 if( stackable == 0 || stackable >= ntarget.GetQuantity() )
117 {
118 action_data.m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
119 }
120 else
121 {
122 ClearInventoryReservationEx(action_data);
123 ntarget.SplitIntoStackMaxToInventoryLocationClient( il );
124 }
125
126 //action_data.m_Player.PredictiveTakeToDst(targetInventoryLocation, il);
127 }
void ClearInventoryReservationEx(ActionData action_data)
Определения ActionBase.c:1120
void ClearActionJuncture(ActionData action_data)
Определения ActionBase.c:1207
DayZGame g_Game
Определения DayZGame.c:4074
class GP5GasMask extends MaskBase ItemBase
PlayerBase m_Player
Определения ActionBase.c:40
ref ActionTarget m_Target
Определения ActionBase.c:39
ref array< ref InventoryLocation > m_ReservedInventoryLocations
Определения ActionBase.c:42
proto native int GetSlot()
returns slot id if current type is Attachment

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