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

◆ EEDelete()

override void InventoryItem::EEDelete ( EntityAI parent)
inlineprivate

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

1341 {
1342 super.EEDelete(parent);
1343 PlayerBase player = PlayerBase.Cast(GetHierarchyRootPlayer());
1344 if (player)
1345 {
1346 OnInventoryExit(player);
1347
1348 if (player.IsAlive())
1349 {
1350 int r_index = player.GetHumanInventory().FindUserReservedLocationIndex(this);
1351 if (r_index >= 0)
1352 {
1353 InventoryLocation r_il = new InventoryLocation;
1354 player.GetHumanInventory().GetUserReservedLocation(r_index,r_il);
1355
1356 player.GetHumanInventory().ClearUserReservedLocationAtIndex(r_index);
1357 int r_type = r_il.GetType();
1358 if (r_type == InventoryLocationType.CARGO || r_type == InventoryLocationType.PROXYCARGO)
1359 {
1360 r_il.GetParent().GetOnReleaseLock().Invoke(this);
1361 }
1362 else if (r_type == InventoryLocationType.ATTACHMENT)
1363 {
1364 r_il.GetParent().GetOnAttachmentReleaseLock().Invoke(this, r_il.GetSlot());
1365 }
1366
1367 }
1368
1369 player.RemoveQuickBarEntityShortcut(this);
1370 }
1371 }
1372 }
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:3935
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().