DayZ 1.27
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 строка 269

270 {
271 InventoryLocation src = new InventoryLocation();
272 if (item.GetInventory().GetCurrentInventoryLocation(src))
273 {
274 switch (src.GetType())
275 {
276 case InventoryLocationType.HANDS:
277 if (GetInventoryOwner().IsAlive())
278 {
279 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Cgo(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item + " row=" + row + " col=" + col);
280 InventoryLocation dst = new InventoryLocation();
281 dst.SetCargo(GetInventoryOwner(), item, idx, row, col, item.GetInventory().GetFlipCargo());
282
283 HandEvent(mode, new HandEventMoveTo(GetManOwner(), src, dst));
284 return true;
285 }
286
287 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
288
289 default:
290 return super.TakeEntityToCargoEx(mode, item, idx, row, col);
291 }
292 }
293
294 Error("HumanInventory::TakeEntityToCargoEx: No inventory location");
295 return false;
296 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
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::GetInventoryOwner(), GetManOwner(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable() и InventoryLocation::SetCargo().