diff --git a/ShiftOS_TheReturn/Hacking.cs b/ShiftOS_TheReturn/Hacking.cs index 1eb1892..b9149d9 100644 --- a/ShiftOS_TheReturn/Hacking.cs +++ b/ShiftOS_TheReturn/Hacking.cs @@ -109,11 +109,11 @@ namespace ShiftOS.Engine List loot = new List(); loot.AddRange(LootFiles.Where(x => x.Rarity <= hsys.Data.LootRarity)); var amount = data.LootAmount; - for (int i = 0; i < amount && i < loot.Count - 1; i++) + for (int i = 0; i < amount; i++) { - var randomLoot = loot[rnd.Next(0, loot.Count - 1)]; - hsys.ServerFTPLoot.Add(randomLoot); - loot.Remove(randomLoot); + int idx = rnd.Next(0, loot.Count - 1); + hsys.ServerFTPLoot.Add(loot[idx]); + loot.RemoveAt(idx); } CurrentHackable = hsys; }