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

◆ ~ItemBase()

void InventoryItem::~ItemBase ( )
inlineprivate

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

751 {
752 if (g_Game && g_Game.GetPlayer() && (!g_Game.IsDedicatedServer()))
753 {
754 PlayerBase player = PlayerBase.Cast(g_Game.GetPlayer());
755 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
756
757 if (r_index >= 0)
758 {
759 InventoryLocation r_il = new InventoryLocation;
760 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
761
762 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
763 int r_type = r_il.GetType();
764 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
765 {
766 r_il.GetParent().GetOnReleaseLock().Invoke(this);
767 }
768 else if (r_type == InventoryLocationType.ATTACHMENT)
769 {
770 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
771 }
772
773 }
774
775 player.GetHumanInventory().ClearUserReservedLocation(this);
776 }
777
778 if (m_LockingSound)
779 SEffectManager.DestroyEffect(m_LockingSound);
780 }
DayZGame g_Game
Определения DayZGame.c:3942
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
ref EffectSound m_LockingSound
Определения ItemBase.c:133
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

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