100 {
101 int slotID;
102 if (!slotData.TranslateAndValidateSlot(player,slotID))
103 return false;
104
105 if (!slotData.IsValid())
106 return false;
107
108 array<int> weightedDiscreteSetIndexes = new array<int>();
109 int count = slotData.discreteItemSets.Count();
110 PlayerSpawnPresetDiscreteItemSetSlotData dis;
111 for (int i = 0; i < count; i++)
112 {
113 dis = slotData.discreteItemSets[i];
114
116 {
117 for (int j = 0; j < dis.spawnWeight; j++)
118 {
119 weightedDiscreteSetIndexes.Insert(i);
120 }
121 }
122 }
123
124 dis = null;
125 if (weightedDiscreteSetIndexes.Count() > 0)
126 dis = slotData.discreteItemSets.Get(weightedDiscreteSetIndexes.GetRandomElement());
128 }
static bool SpawnDiscreteSlotItemSet(PlayerBase player, PlayerSpawnPresetDiscreteItemSetSlotData dis, int slotID)