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

◆ TakeEntityToInventory()

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

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

246 {
247 InventoryLocation src = new InventoryLocation();
248 if (item.GetInventory().GetCurrentInventoryLocation(src))
249 {
250 InventoryLocation dst = new InventoryLocation();
251 if (FindFreeLocationFor(item, flags, dst))
252 {
253 if (RedirectToHandEvent(mode, src, dst))
254 return true;
255
256 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Inv(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item);
257 return super.TakeEntityToInventory(mode, flags, item);
258 }
259 else
260 return false; // no room
261 }
262 Error("HumanInventory::TakeEntityToInventory: No inventory location");
263 return false;
264 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
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:192
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

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

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