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

◆ CanPerformEventEx()

override bool HandEventRemove::CanPerformEventEx ( InventoryValidation validation)
inlineprivate

On multiplayer client, if this is the initial call then we are waiting for the server to setup this event still

Singleplayer or server was initial caller

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

443 {
444 if (!m_CanPerformDrop)
445 {
446 return false;
447 }
448
450 if (!validation.m_IsJuncture && !validation.m_IsRemote && !GetDst() && (GetGame().IsMultiplayer() && GetGame().IsClient()))
451 {
452 return true;
453 }
454
456 if (!validation.m_IsRemote && !GetDst())
457 {
458 m_Dst = new InventoryLocation();
459 m_CanPerformDrop = GameInventory.SetGroundPosByOwner(m_Player, GetSrcEntity(), m_Dst);
460
461 if (!m_CanPerformDrop)
462 {
463 validation.m_Reason = InventoryValidationReason.DROP_PREVENTED;
464 return false;
465 }
466 }
467
468 return super.CanPerformEventEx(validation);
469 }
InventoryValidationReason
Определения Inventory.c:37
DayZPlayer m_Player
Определения Hand_Events.c:42
EntityAI GetSrcEntity()
Определения Hand_Events.c:81
InventoryLocation GetDst()
Определения Hand_Events.c:88
bool m_CanPerformDrop
Определения Hand_Events.c:471
bool m_IsJuncture
Определения Inventory.c:45
InventoryValidationReason m_Reason
Определения Inventory.c:49
bool m_IsRemote
Определения Inventory.c:46
proto native CGame GetGame()

Перекрестные ссылки GetDst(), GetGame(), GetSrcEntity(), m_CanPerformDrop, InventoryValidation::m_IsJuncture, InventoryValidation::m_IsRemote, m_Player, InventoryValidation::m_Reason и GameInventory::SetGroundPosByOwner().