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

◆ ReplaceItemInElsewhereWithNewinHandsImpl()

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

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

477 {
478 if (GetEntityInHands())
479 {
480 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl Item in hands, event=" + e.DumpToString());
481 return false;
482 }
483
484 InventoryLocation dst = e.GetDst();
485 if (dst)
486 {
487 switch (dst.GetType())
488 {
489 case InventoryLocationType.HANDS:
490 if (GetInventoryOwner().IsAlive())
491 {
492 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl event=" + e);
493 HandEvent(mode, e);
494 return true;
495 }
496
497 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
498 Error("HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl TODO"); // replace-with-new in corpse's hands, not implemented
499 return false;
500
501 default:
502 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl src has to be hands");
503 return false;
504 }
505 }
506
507 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl no dst in event, event=" + e.DumpToString());
508 return false;
509 }
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:215
override string DumpToString()
Определения Hand_Events.c:338
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().