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

◆ IsSlotReserved()

bool Entity::IsSlotReserved ( int slotID)
inlineprotected

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

1821 {
1822 Man player = GetHierarchyRootPlayer();
1823 if (!player)
1824 return false;
1825
1826 HumanInventory inv = player.GetHumanInventory();
1827 if (!inv || inv.GetUserReservedLocationCount() == 0)
1828 return false;
1829
1831 InventoryLocation loc = new InventoryLocation();
1832 if (id == -1)
1833 return false;
1834
1835 inv.GetUserReservedLocation(id, loc);
1836
1837 if (loc.GetSlot() != slotID)
1838 return false;
1839
1840 return true;
1841 }
proto native Man GetHierarchyRootPlayer()
Returns root of current hierarchy cast to Man.
proto native int GetUserReservedLocationCount()
proto native int FindFirstUserReservedLocationIndexForContainer(notnull EntityAI e)
proto native void GetUserReservedLocation(int index, out notnull InventoryLocation dst)
proto native int GetSlot()
returns slot id if current type is Attachment

Перекрестные ссылки HumanInventory::FindFirstUserReservedLocationIndexForContainer(), GetHierarchyRootPlayer(), InventoryLocation::GetSlot(), HumanInventory::GetUserReservedLocation(), HumanInventory::GetUserReservedLocationCount() и EntityAI::Man().