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

◆ TakeEntityToCargoEx()

override bool HumanInventory::TakeEntityToCargoEx ( InventoryMode mode,
notnull EntityAI item,
int idx,
int row,
int col )
inlineprivate

Put item into into cargo on specific cargo location.

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

278 {
279 InventoryLocation src = new InventoryLocation();
280 GameInventory itemInventory = item.GetInventory();
281 if (itemInventory.GetCurrentInventoryLocation(src))
282 {
283 switch (src.GetType())
284 {
285 case InventoryLocationType.HANDS:
286 EntityAI inventoryOwner = GetInventoryOwner();
287 if (inventoryOwner.IsAlive())
288 {
289 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Cgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item + " row=" + row + " col=" + col);
290 InventoryLocation dst = new InventoryLocation();
291 dst.SetCargo(inventoryOwner, item, idx, row, col, itemInventory.GetFlipCargo());
292
293 HandEvent(mode, new HandEventMoveTo(GetManOwner(), src, dst));
294 return true;
295 }
296
297 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
298
299 default:
300 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
301 }
302 }
303
304 Error("HumanInventory::TakeEntityToCargoEx: No inventory location");
305 return false;
306 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class LogManager EntityAI
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native bool GetFlipCargo()
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
proto native EntityAI GetInventoryOwner()
Engine native functions.
Man GetManOwner()
Определения HumanInventory.c:102
bool HandEvent(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:134
proto native int GetType()
returns type of InventoryLocation
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), GameInventory::GetCurrentInventoryLocation(), GameInventory::GetFlipCargo(), GameInventory::GetInventoryOwner(), GetManOwner(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable() и InventoryLocation::SetCargo().