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

◆ ReplaceItemInElsewhereWithNewinHandsImpl()

bool HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl ( InventoryMode mode,
HandEventBase e )
inlineprotected

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

466 {
467 if (GetEntityInHands())
468 {
469 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl Item in hands, event=" + e.DumpToString());
470 return false;
471 }
472
473 InventoryLocation dst = e.GetDst();
474 if (dst)
475 {
476 switch (dst.GetType())
477 {
478 case InventoryLocationType.HANDS:
479 if (GetInventoryOwner().IsAlive())
480 {
481 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl event=" + e);
482 HandEvent(mode, e);
483 return true;
484 }
485
486 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
487 Error("HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl TODO"); // replace-with-new in corpse's hands, not implemented
488 return false;
489
490 default:
491 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl src has to be hands");
492 return false;
493 }
494 }
495
496 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl no dst in event, event=" + e.DumpToString());
497 return false;
498 }
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native EntityAI GetInventoryOwner()
Engine native functions.
override InventoryLocation GetDst()
Определения Hand_Events.c:212
override string DumpToString()
Определения Hand_Events.c:332
bool HandEvent(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:134
proto native EntityAI GetEntityInHands()
proto native int GetType()
returns type of InventoryLocation
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
proto native owned string GetName()
Test name getter. Strictly for UI porposes!
Определения SyncedValue.c:119

Перекрестные ссылки HandEventBase::DumpToString(), Error(), HandEventBase::GetDst(), GetEntityInHands(), GameInventory::GetInventoryOwner(), GetName(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint() и LogManager::IsInventoryHFSMLogEnable().

Используется в ReplaceItemElsewhereWithNewInHands().