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

◆ EEDelete()

override void InventoryItem::EEDelete ( EntityAI parent)
inlineprivate

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

1322 {
1323 super.EEDelete(parent);
1324 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
1325 if (player)
1326 {
1327 OnInventoryExit(player);
1328
1329 if (player.IsAlive())
1330 {
1331 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
1332 if (r_index >= 0)
1333 {
1334 InventoryLocation r_il = new InventoryLocation;
1335 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
1336
1337 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
1338 int r_type = r_il.GetType();
1339 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
1340 {
1341 r_il.GetParent().GetOnReleaseLock().Invoke(this);
1342 }
1343 else if (r_type == InventoryLocationType.ATTACHMENT)
1344 {
1345 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
1346 }
1347
1348 }
1349
1350 player.RemoveQuickBarEntityShortcut(this);
1351 }
1352 }
1353 }
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
void OnInventoryExit(Man player)
Event called on item when it is removed from the player(Man) inventory, passes the old owner as a par...
Определения ItemBase.c:3811
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

Перекрестные ссылки InventoryLocation::GetParent(), InventoryLocation::GetSlot(), InventoryLocation::GetType() и ItemBase::OnInventoryExit().