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

◆ ~ItemBase()

void InventoryItem::~ItemBase ( )
inlineprivate

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

741 {
742 if (GetGame() && GetGame().GetPlayer() && (!GetGame().IsDedicatedServer()))
743 {
744 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
745 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
746
747 if (r_index >= 0)
748 {
749 InventoryLocation r_il = new InventoryLocation;
750 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
751
752 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
753 int r_type = r_il.GetType();
754 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
755 {
756 r_il.GetParent().GetOnReleaseLock().Invoke(this);
757 }
758 else if (r_type == InventoryLocationType.ATTACHMENT)
759 {
760 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
761 }
762
763 }
764
765 player.GetHumanInventory().ClearUserReservedLocation(this);
766 }
767
768 if (m_LockingSound)
769 SEffectManager.DestroyEffect(m_LockingSound);
770 }
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
PlayerBase GetPlayer()
Определения ModifierBase.c:51
ref EffectSound m_LockingSound
Определения ItemBase.c:127
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetType()
returns type of InventoryLocation
proto native CGame GetGame()

Перекрестные ссылки SEffectManager::DestroyEffect(), GetGame(), InventoryLocation::GetParent(), GetPlayer(), InventoryLocation::GetSlot(), InventoryLocation::GetType() и m_LockingSound.