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

◆ CheckRequest() [4/4]

override bool HandEventBase::CheckRequest ( )
inlineprivate

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

638 {
639 if (m_Src && m_Dst && m_Src.GetItem() != m_Dst.GetItem())
640 return false;
641
642 if (m_Src2 && m_Dst2 && m_Src2.GetItem() != m_Dst2.GetItem())
643 return false;
644
645 if (!GameInventory.CheckSwapItemsRequest(m_Player, m_Src, m_Src2, m_Dst, m_Dst2, GameInventory.c_MaxItemDistanceRadius))
646 {
647 #ifdef ENABLE_LOGGING
648 if ( LogManager.IsInventoryHFSMLogEnable() )
649 {
650 Debug.InventoryHFSMLog("CheckSwapItemsRequest - failed", typename.EnumToString(HandEventID, GetEventID()) , "n/a", "CheckRequest", m_Player.ToString() );
651 }
652 #endif
653 }
654 else if (!m_Player.GetHumanInventory().CanAddSwappedEntity(m_Src, m_Src2, m_Dst, m_Dst2))
655 {
656 #ifdef ENABLE_LOGGING
657 if ( LogManager.IsInventoryHFSMLogEnable() )
658 {
659 Debug.InventoryHFSMLog("CanAddSwappedEntity - failed", typename.EnumToString(HandEventID, GetEventID()) , "n/a", "CheckRequest", m_Player.ToString() );
660 }
661 #endif
662 }
663 else
664 return true;
665
666 return false;
667 }
string Debug()
Определения CachedEquipmentStorageBase.c:29
DayZPlayer m_Player
Определения Hand_Events.c:42
ref InventoryLocation m_Src
Определения Hand_Events.c:43
HandEventID GetEventID()
Определения Hand_Events.c:53
HandEventID
events
Определения Hand_Events.c:7
ref InventoryLocation m_Dst2
src of old item in hands
Определения Hand_Events.c:565
ref InventoryLocation m_Src2
destination for new item (i.e. hands)
Определения Hand_Events.c:564
ref InventoryLocation m_Dst
Определения Hand_Events.c:275
proto native EntityAI GetItem()
returns item of current inventory location

Перекрестные ссылки GameInventory::c_MaxItemDistanceRadius, GameInventory::CheckSwapItemsRequest(), GetEventID(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), m_Dst, m_Dst2, m_Player, m_Src и m_Src2.