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

◆ CanAddEntityToInventory()

bool GameInventory::CanAddEntityToInventory ( notnull EntityAI item,
int flag = FindInventoryLocationType.ANY )
inlineprotected

ask inventory if item could be placed somewhere in inventory

All available inventory locations (hands, cargo, attachments, proxycargo, ...) are traversed recursively from root to leafs.

Аргументы
[in]itemitem to be placed in inventory
Возвращает
true if item can be added, false otherwise

См. определение в файле 3_Game/DayZ/Systems/Inventory/Inventory.c строка 906

907 {
908 InventoryLocation il = new InventoryLocation();
909 bool result = FindFreeLocationFor(item, flag, il);
910 return result;
911 }
proto native bool FindFreeLocationFor(notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFreeLocationFor.

Перекрестные ссылки FindFreeLocationFor().