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

◆ TakeEntityToInventory()

override bool HumanInventory::TakeEntityToInventory ( InventoryMode mode,
FindInventoryLocationType flags,
notnull EntityAI item )
inlineprivate

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

254 {
255 InventoryLocation src = new InventoryLocation();
256 if (item.GetInventory().GetCurrentInventoryLocation(src))
257 {
258 InventoryLocation dst = new InventoryLocation();
259 if (FindFreeLocationFor(item, flags, dst))
260 {
261 if (RedirectToHandEvent(mode, src, dst))
262 return true;
263
264 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
265 return super.TakeEntityToInventory(mode, flags, item);
266 }
267 else
268 return false; // no room
269 }
270 Error("HumanInventory::TakeEntityToInventory: No inventory location");
271 return false;
272 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void hndDebugPrint(string s)
Определения HandFSM.c:1
proto native bool FindFreeLocationFor(notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFreeLocationFor.
bool RedirectToHandEvent(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
Определения HumanInventory.c:200
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), GameInventory::FindFreeLocationFor(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable() и RedirectToHandEvent().

Используется в EntityAI::PredictiveMoveItemFromHandsToInventory().