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

◆ SpawnDiscreteSlotItemSet()

static bool PlayerSpawnHandler::SpawnDiscreteSlotItemSet ( PlayerBase player,
PlayerSpawnPresetDiscreteItemSetSlotData dis,
int slotID )
inlinestaticprivate

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

163 {
164 if (!dis)
165 {
166 Debug.Log("No PlayerSpawnPresetDiscreteItemSet found. Skipping spawn for slot: " + InventorySlots.GetSlotName(slotID),"n/a","n/a","SpawnDiscreteSlotItemSet");
167 return false;
168 }
169
170 ItemBase item;
171 if (slotID == InventorySlots.HANDS) //hands exception
172 item = ItemBase.Cast(player.GetHumanInventory().CreateInHands(dis.itemType));
173 else
174 item = ItemBase.Cast(player.GetInventory().CreateAttachmentEx(dis.itemType,slotID));
175
176 if (item)
177 {
178 HandleNewItem(item,dis);
179 }
180 else if (dis.itemType != string.Empty)
181 {
182 Debug.Log("FAILED spawning item type: " + dis.itemType + " into slot: " + InventorySlots.GetSlotName(slotID) + " of parent: " + player,"n/a","n/a","SpawnDiscreteSlotItemSet");
183 return false;
184 }
185
186 return item != null;
187 }
class GP5GasMask extends MaskBase ItemBase
void Debug()
Определения UniversalTemperatureSource.c:349
static void HandleNewItem(notnull ItemBase item, PlayerSpawnPresetItemSetBase data)
Определения CfgPlayerSpawnHandler.c:259
static const string Empty
Определения EnString.c:7

Перекрестные ссылки string::Empty, InventorySlots::GetSlotName(), HandleNewItem(), PlayerSpawnPresetDiscreteItemSetSlotData::itemType и Debug::Log().

Используется в SelectAndSpawnSlotEquipment().