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

◆ SpawnDiscreteSlotItemSet()

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

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

174 {
175 if (!dis)
176 {
177 Debug.Log("No PlayerSpawnPresetDiscreteItemSet found. Skipping spawn for slot: " + InventorySlots.GetSlotName(slotID),"n/a","n/a","SpawnDiscreteSlotItemSet");
178 return false;
179 }
180
181 ItemBase item;
182 if (slotID == InventorySlots.HANDS) //hands exception
183 item = ItemBase.Cast(player.GetHumanInventory().CreateInHands(dis.itemType));
184 else
185 item = ItemBase.Cast(player.GetInventory().CreateAttachmentEx(dis.itemType,slotID));
186
187 if (item)
188 {
189 HandleNewItem(item,dis);
190 }
191 else if (dis.itemType != string.Empty)
192 {
193 Debug.Log("FAILED spawning item type: " + dis.itemType + " into slot: " + InventorySlots.GetSlotName(slotID) + " of parent: " + player,"n/a","n/a","SpawnDiscreteSlotItemSet");
194 return false;
195 }
196
197 return item != null;
198 }
class GP5GasMask extends MaskBase ItemBase
void Debug()
Определения UniversalTemperatureSource.c:349
static void HandleNewItem(notnull ItemBase item, PlayerSpawnPresetItemSetBase data)
Определения CfgPlayerSpawnHandler.c:270
static const string Empty
Определения EnString.c:7

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

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