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

◆ TakeEntityToTargetInventory()

bool GameInventory::TakeEntityToTargetInventory ( InventoryMode mode,
notnull EntityAI target,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprotected

helper that finds location first, then moves the entity into it

См. определение в файле 3_Game/DayZ/Systems/Inventory/Inventory.c строка 1031

1032 {
1033 if (LogManager.IsInventoryMoveLogEnable()) inventoryDebugPrint("[inv] I::Take2Target(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
1034
1035 InventoryLocation src = new InventoryLocation();
1036 if (item.GetInventory().GetCurrentInventoryLocation(src))
1037 {
1038 InventoryLocation dst = new InventoryLocation();
1039
1040 if (target.GetInventory().FindFreeLocationFor(item, flags, dst))
1041 return TakeToDst(mode, src, dst);
1042
1043 if (LogManager.IsInventoryMoveLogEnable()) inventoryDebugPrint("[inv] I::Take2Target(" + typename.EnumToString(InventoryMode, mode) + ") target=" + target + " item=" + item + " Warning - no room for item in target");
1044 return false;
1045 }
1046 Error("[inv] I::Take2Target(" + typename.EnumToString(InventoryMode, mode) + ") target=" + target + " item=" + item + " Error - src has no inventory location");
1047 return false;
1048 }
void inventoryDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
move src to dst
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), inventoryDebugPrint(), LogManager::IsInventoryMoveLogEnable() и TakeToDst().

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