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

◆ PerformSwap()

void PerformSwap ( ActionData action_data)

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

214 {
215 ClearInventoryReservationEx(action_data);
216
217 EntityAI ntarget = EntityAI.Cast(action_data.m_Target.GetObject());
218 if (action_data.m_Player)
219 {
220 InventoryMode invMode = InventoryMode.PREDICTIVE;
221 if (!GetGame().IsMultiplayer())
222 invMode = InventoryMode.LOCAL;
223 else if (action_data.m_Player.NeedInventoryJunctureFromServer(ntarget, ntarget.GetHierarchyParent(), action_data.m_Player))
224 invMode = InventoryMode.JUNCTURE;
225
226 action_data.m_Player.TakeEntityToHandsImpl(invMode, ntarget);
227 }
228 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
Определения Building.c:6
proto native CGame GetGame()

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

Используется в OnEnd() и OnExecute().