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

◆ TakeEntityToInventory()

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

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

255 {
256 InventoryLocation src = new InventoryLocation();
257 if (item.GetInventory().GetCurrentInventoryLocation(src))
258 {
259 InventoryLocation dst = new InventoryLocation();
260 if (FindFreeLocationFor(item, flags, dst))
261 {
262 if (RedirectToHandEvent(mode, src, dst))
263 return true;
264
265 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
266 return super.TakeEntityToInventory(mode, flags, item);
267 }
268 else
269 return false; // no room
270 }
271 Error("HumanInventory::TakeEntityToInventory: No inventory location");
272 return false;
273 }
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().