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

◆ ReplaceItemInElsewhereWithNewinHandsImpl()

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

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

414 {
415 if (GetEntityInHands())
416 {
417 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl Item in hands, event=" + e.DumpToString());
418 return false;
419 }
420
421 InventoryLocation dst = e.GetDst();
422 if (dst)
423 {
424 switch (dst.GetType())
425 {
426 case InventoryLocationType.HANDS:
427 if (GetInventoryOwner().IsAlive())
428 {
429 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl event=" + e);
430 HandEvent(mode, e);
431 return true;
432 }
433
434 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
435 Error("HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl TODO"); // replace-with-new in corpse's hands, not implemented
436 return false;
437
438 default:
439 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl src has to be hands");
440 return false;
441 }
442 }
443
444 Error("[inv] HumanInventory::ReplaceItemInElsewhereWithNewinHandsImpl no dst in event, event=" + e.DumpToString());
445 return false;
446 }
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:333
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().