From cc16e343b592e0855b5d3a808fcad2e4126f7068 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 29 Jul 2017 13:19:23 -0400 Subject: [PATCH] fix rng bug with loot --- ShiftOS_TheReturn/Hacking.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShiftOS_TheReturn/Hacking.cs b/ShiftOS_TheReturn/Hacking.cs index b9149d9..0186e51 100644 --- a/ShiftOS_TheReturn/Hacking.cs +++ b/ShiftOS_TheReturn/Hacking.cs @@ -111,7 +111,7 @@ namespace ShiftOS.Engine var amount = data.LootAmount; for (int i = 0; i < amount; i++) { - int idx = rnd.Next(0, loot.Count - 1); + int idx = rnd.Next(0, loot.Count); //warning MV1224: Random.Next(min, max) - max is not inclusive, i.e the number will always be less than it and equal to or greater than min. hsys.ServerFTPLoot.Add(loot[idx]); loot.RemoveAt(idx); }