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

◆ SpawnItemOnLocation()

class ItemBase extends InventoryItem SpawnItemOnLocation ( string object_name,
notnull InventoryLocation loc,
bool full_quantity )

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

4784{
4785 EntityAI entity = SpawnEntity(object_name, loc, ECE_IN_INVENTORY, RF_DEFAULT);
4786 if (entity)
4787 {
4788 bool is_item = entity.IsInherited(ItemBase);
4789 if (is_item && full_quantity)
4790 {
4791 ItemBase item = ItemBase.Cast(entity);
4792 item.SetQuantity(item.GetQuantityInit());
4793 }
4794 }
4795 else
4796 {
4797 ErrorEx("Cannot spawn entity: " + object_name,ErrorExSeverity.INFO);
4798 return NULL;
4799 }
4800 return entity;
4801}
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:36
const int RF_DEFAULT
Определения CentralEconomy.c:65
Определения Building.c:6
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88
Определения InventoryItem.c:731
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки InventoryItem::ItemBase().

Используется в ManBase::CreateInInventory().