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

◆ ReplaceItemInHandsWithNewImpl()

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

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

501 {
502 EntityAI itemInHands = GetEntityInHands();
503 InventoryLocation src = new InventoryLocation();
504 if (itemInHands && itemInHands.GetInventory().GetCurrentInventoryLocation(src))
505 {
506 switch (src.GetType())
507 {
508 case InventoryLocationType.HANDS:
509 if ((mode != InventoryMode.SERVER) && GetInventoryOwner().IsAlive())
510 {
511 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl event=" + e);
512 HandEvent(mode, e);
513 return true;
514 }
515
516 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl DEAD_owner=" + GetInventoryOwner().GetName() +"="+ GetInventoryOwner());
517 HandEvent(mode, e);
518 return true;
519
520 default:
521 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl src has to be hands");
522 return false;
523 }
524 }
525
526 Error("[inv] HumanInventory::ReplaceItemInHandsWithNewImpl No item in hands, event=" + e.DumpToString());
527 return false;
528 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
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: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(), GetEntityInHands(), GameInventory::GetInventoryOwner(), GetName(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint() и LogManager::IsInventoryHFSMLogEnable().

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