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

◆ ReplaceItemInHandsWithNewImpl()

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

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

449 {
450 EntityAI itemInHands = GetEntityInHands();
451 InventoryLocation src = new InventoryLocation();
452 if (itemInHands && itemInHands.GetInventory().GetCurrentInventoryLocation(src))
453 {
454 switch (src.GetType())
455 {
456 case InventoryLocationType.HANDS:
457 if ((mode != InventoryMode.SERVER) && GetInventoryOwner().IsAlive())
458 {
459 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl event=" + e);
460 HandEvent(mode, e);
461 return true;
462 }
463
464 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
465 HandEvent(mode, e);
466 return true;
467
468 default:
469 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl src has to be hands");
470 return false;
471 }
472 }
473
474 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl No item in hands, event=" + e.DumpToString());
475 return false;
476 }
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: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(), GetEntityInHands(), GameInventory::GetInventoryOwner(), GetName(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint() и LogManager::IsInventoryHFSMLogEnable().

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