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

◆ ReplaceItemInHandsWithNewImpl()

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

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

512 {
513 EntityAI itemInHands = GetEntityInHands();
514 InventoryLocation src = new InventoryLocation();
515 if (itemInHands && itemInHands.GetInventory().GetCurrentInventoryLocation(src))
516 {
517 switch (src.GetType())
518 {
519 case InventoryLocationType.HANDS:
520 if ((mode != InventoryMode.SERVER) && GetInventoryOwner().IsAlive())
521 {
522 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl event=" + e);
523 HandEvent(mode, e);
524 return true;
525 }
526
527 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
528 HandEvent(mode, e);
529 return true;
530
531 default:
532 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl src has to be hands");
533 return false;
534 }
535 }
536
537 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl No item in hands, event=" + e.DumpToString());
538 return false;
539 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class LogManager EntityAI
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native EntityAI GetInventoryOwner()
Engine native functions.
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(), GetEntityInHands(), GameInventory::GetInventoryOwner(), GetName(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint() и LogManager::IsInventoryHFSMLogEnable().

Используется в ReplaceItemInHandsWithNew() и ReplaceItemInHandsWithNewElsewhere().