Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
PlayerSpawnHandler Class Reference

Static Private Member Functions

static void ApplyAttributes (ItemBase item, PlayerSpawnAttributesData attributes)
static EntityAI CreateChildItem (EntityAI parent, string type)
static PlayerSpawnPreset GetCharacterPresetByName (string presetName)
static PlayerSpawnPreset GetRandomCharacterPreset ()
static void HandleNewItem (notnull ItemBase item, PlayerSpawnPresetItemSetBase data)
static bool IsInitialized ()
static bool IsWeaponAndMagazineType (EntityAI parent, string type)
 Used for exceptions in the system.
static bool LoadData ()
static void ProcessCargoEquipment (PlayerBase player, PlayerSpawnPreset data)
 chooses one object from the array
static bool ProcessEquipmentData (PlayerBase player, PlayerSpawnPreset data)
 equips character with the chosen preset
static void ProcessSlotsEquipment (PlayerBase player, PlayerSpawnPreset data)
 iterates over each object and spawns alternatives
static bool SelectAndSpawnCargoSet (PlayerBase player, PlayerSpawnPreset data)
static bool SelectAndSpawnSlotEquipment (PlayerBase player, PlayerSpawnPresetSlotData slotData)
 selects weighted slot equipment variant
static bool SpawnComplexChildrenItems (EntityAI parent, notnull PlayerSpawnPresetItemSetBase data)
 could spawn other items recursively. Parent item is guaranteed here.
static bool SpawnDiscreteCargoItemSet (PlayerBase player, PlayerSpawnPresetDiscreteCargoSetData csd)
static bool SpawnDiscreteSlotItemSet (PlayerBase player, PlayerSpawnPresetDiscreteItemSetSlotData dis, int slotID)
static bool SpawnSimpleChildrenItems (EntityAI parent, PlayerSpawnPresetItemSetBase data)

Static Private Attributes

static ref PlayerSpawnJsonData m_Data = new PlayerSpawnJsonData()
static bool m_Initialized

Detailed Description

Definition at line 1 of file cfgplayerspawnhandler.c.

Member Function Documentation

◆ ApplyAttributes()

void ApplyAttributes ( ItemBase item,
PlayerSpawnAttributesData attributes )
inlinestaticprivate

◆ CreateChildItem()

EntityAI CreateChildItem ( EntityAI parent,
string type )
inlinestaticprivate

◆ GetCharacterPresetByName()

PlayerSpawnPreset GetCharacterPresetByName ( string presetName)
inlinestaticprivate

◆ GetRandomCharacterPreset()

PlayerSpawnPreset GetRandomCharacterPreset ( )
inlinestaticprivate

◆ HandleNewItem()

◆ IsInitialized()

bool IsInitialized ( )
inlinestaticprivate

Definition at line 35 of file cfgplayerspawnhandler.c.

References m_Initialized.

Referenced by MissionBase::OnClientNewEvent().

◆ IsWeaponAndMagazineType()

bool IsWeaponAndMagazineType ( EntityAI parent,
string type )
inlinestaticprivate

Used for exceptions in the system.

Definition at line 354 of file cfgplayerspawnhandler.c.

References CFG_MAGAZINESPATH, and g_Game.

Referenced by SpawnComplexChildrenItems(), and SpawnSimpleChildrenItems().

◆ LoadData()

bool LoadData ( )
inlinestaticprivate

◆ ProcessCargoEquipment()

void ProcessCargoEquipment ( PlayerBase player,
PlayerSpawnPreset data )
inlinestaticprivate

chooses one object from the array

Definition at line 131 of file cfgplayerspawnhandler.c.

References PlayerSpawnPreset::HasDiscreteUnsortedItemSetsDefined(), Debug::Log(), and SelectAndSpawnCargoSet().

Referenced by ProcessEquipmentData().

◆ ProcessEquipmentData()

bool ProcessEquipmentData ( PlayerBase player,
PlayerSpawnPreset data )
inlinestaticprivate

equips character with the chosen preset

Definition at line 72 of file cfgplayerspawnhandler.c.

References PlayerSpawnPreset::IsValid(), ProcessCargoEquipment(), and ProcessSlotsEquipment().

Referenced by MissionBase::OnClientNewEvent().

◆ ProcessSlotsEquipment()

void ProcessSlotsEquipment ( PlayerBase player,
PlayerSpawnPreset data )
inlinestaticprivate

iterates over each object and spawns alternatives

Definition at line 84 of file cfgplayerspawnhandler.c.

References PlayerSpawnPreset::attachmentSlotItemSets, PlayerSpawnPreset::HasAttachmentSlotSetsDefined(), Debug::Log(), and SelectAndSpawnSlotEquipment().

Referenced by ProcessEquipmentData().

◆ SelectAndSpawnCargoSet()

bool SelectAndSpawnCargoSet ( PlayerBase player,
PlayerSpawnPreset data )
inlinestaticprivate

◆ SelectAndSpawnSlotEquipment()

bool SelectAndSpawnSlotEquipment ( PlayerBase player,
PlayerSpawnPresetSlotData slotData )
inlinestaticprivate

selects weighted slot equipment variant

Definition at line 99 of file cfgplayerspawnhandler.c.

References PlayerSpawnPresetDiscreteItemSetSlotData::IsValid(), and SpawnDiscreteSlotItemSet().

Referenced by ProcessSlotsEquipment().

◆ SpawnComplexChildrenItems()

bool SpawnComplexChildrenItems ( EntityAI parent,
notnull PlayerSpawnPresetItemSetBase data )
inlinestaticprivate

◆ SpawnDiscreteCargoItemSet()

bool SpawnDiscreteCargoItemSet ( PlayerBase player,
PlayerSpawnPresetDiscreteCargoSetData csd )
inlinestaticprivate

◆ SpawnDiscreteSlotItemSet()

◆ SpawnSimpleChildrenItems()

Field Documentation

◆ m_Data

ref PlayerSpawnJsonData m_Data = new PlayerSpawnJsonData()
staticprivate

◆ m_Initialized

bool m_Initialized
staticprivate

Definition at line 3 of file cfgplayerspawnhandler.c.

Referenced by IsInitialized(), and LoadData().


The documentation for this class was generated from the following file: