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

◆ SpawnItemOnLocation()

EntityAI SpawnItemOnLocation ( string object_name,
notnull InventoryLocation loc,
bool full_quantity )
protected

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

4953{
4954 EntityAI entity = SpawnEntity(object_name, loc, ECE_IN_INVENTORY, RF_DEFAULT);
4955 if (entity)
4956 {
4957 bool is_item = entity.IsInherited(ItemBase);
4958 if (is_item && full_quantity)
4959 {
4960 ItemBase item = ItemBase.Cast(entity);
4961 item.SetQuantity(item.GetQuantityInit());
4962 }
4963 }
4964 else
4965 {
4966 ErrorEx("Cannot spawn entity: " + object_name,ErrorExSeverity.INFO);
4967 return NULL;
4968 }
4969 return entity;
4970}
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:37
const int RF_DEFAULT
Определения CentralEconomy.c:66
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfBricks.c:64
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки ECE_IN_INVENTORY, ErrorEx, RF_DEFAULT, ItemBase::SetQuantity() и SpawnEntity().

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