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

◆ CreateInInventory()

EntityAI GameInventory::CreateInInventory ( string type)
inlineprotected

creates entity somewhere in inventory

Аргументы
[in]typeitem type to be placed in inventory
Возвращает
created entity or null

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

875 {
876 InventoryLocation loc = new InventoryLocation();
878 {
879 switch (loc.GetType())
880 {
881 case InventoryLocationType.ATTACHMENT:
882 return loc.GetParent().GetInventory().CreateAttachmentEx(type, loc.GetSlot());
883 case InventoryLocationType.CARGO:
884 return loc.GetParent().GetInventory().CreateEntityInCargoEx(type, loc.GetIdx(), loc.GetRow(), loc.GetCol(), loc.GetFlip());
885 default:
886 Error("CreateInInventory: unknown location for item");
887 break;
888 }
889 }
890
891 return null;
892 }
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native bool FindFirstFreeLocationForNewEntity(string item_type, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFirstFreeLocationForNewEntity.
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 GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo
proto native int GetType()
returns type of InventoryLocation
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo
proto native bool GetFlip()
returns flip status of cargo
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), FindFirstFreeLocationForNewEntity(), InventoryLocation::GetCol(), InventoryLocation::GetFlip(), InventoryLocation::GetIdx(), InventoryLocation::GetParent(), InventoryLocation::GetRow(), InventoryLocation::GetSlot() и InventoryLocation::GetType().

Используется в AK101_Base::OnDebugSpawn(), AK74_Base::OnDebugSpawn(), AKM_Base::OnDebugSpawn(), Aug_Base::OnDebugSpawn(), B95_base::OnDebugSpawn(), Colt1911_Base::OnDebugSpawn(), CZ61_Base::OnDebugSpawn(), CZ75_Base::OnDebugSpawn(), Deagle_Base::OnDebugSpawn(), FAL_Base::OnDebugSpawn(), FNX45_Base::OnDebugSpawn(), Glock19_Base::OnDebugSpawn(), M14_Base::OnDebugSpawn(), M4A1_Base::OnDebugSpawn(), MakarovIJ70_Base::OnDebugSpawn(), Mosin9130_Base::OnDebugSpawn(), Mp133Shotgun_Base::OnDebugSpawn(), MP5K_Base::OnDebugSpawn(), PP19_Base::OnDebugSpawn(), Rifle_Base::OnDebugSpawn(), Ruger1022_Base::OnDebugSpawn(), Saiga_Base::OnDebugSpawn(), SVD_Base::OnDebugSpawn(), UMP45_Base::OnDebugSpawn(), PluginBase::SpawnEntityAsAttachment() и Entity::SpawnInInventoryOrGroundPos().