89 {
90 int slotID;
91 if (!slotData.TranslateAndValidateSlot(player,slotID))
92 return false;
93
94 if (!slotData.IsValid())
95 return false;
96
97 array<int> weightedDiscreteSetIndexes = new array<int>();
98 int count = slotData.discreteItemSets.Count();
99 PlayerSpawnPresetDiscreteItemSetSlotData dis;
100 for (int i = 0; i < count; i++)
101 {
102 dis = slotData.discreteItemSets[i];
103
105 {
106 for (int j = 0; j < dis.spawnWeight; j++)
107 {
108 weightedDiscreteSetIndexes.Insert(i);
109 }
110 }
111 }
112
113 dis = null;
114 if (weightedDiscreteSetIndexes.Count() > 0)
115 dis = slotData.discreteItemSets.Get(weightedDiscreteSetIndexes.GetRandomElement());
117 }
static bool SpawnDiscreteSlotItemSet(PlayerBase player, PlayerSpawnPresetDiscreteItemSetSlotData dis, int slotID)