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

◆ IsSlotReserved()

bool Entity::IsSlotReserved ( int slotID)
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 1860

1861 {
1862 Man player = GetHierarchyRootPlayer();
1863 if (!player)
1864 return false;
1865
1866 HumanInventory inv = player.GetHumanInventory();
1867 if (!inv || inv.GetUserReservedLocationCount() == 0)
1868 return false;
1869
1871 InventoryLocation loc = new InventoryLocation();
1872 if (id == -1)
1873 return false;
1874
1875 inv.GetUserReservedLocation(id, loc);
1876
1877 if (loc.GetSlot() != slotID)
1878 return false;
1879
1880 return true;
1881 }
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().