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

◆ IsSlotReserved()

bool Entity::IsSlotReserved ( int slotID)
inlineprotected

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

1911 {
1912 Man player = GetHierarchyRootPlayer();
1913 if (!player)
1914 return false;
1915
1916 HumanInventory inv = player.GetHumanInventory();
1917 if (!inv || inv.GetUserReservedLocationCount() == 0)
1918 return false;
1919
1921 InventoryLocation loc = new InventoryLocation();
1922 if (id == -1)
1923 return false;
1924
1925 inv.GetUserReservedLocation(id, loc);
1926
1927 if (loc.GetSlot() != slotID)
1928 return false;
1929
1930 return true;
1931 }
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().