diff options
| author | Michael <[email protected]> | 2017-07-29 13:19:23 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-07-29 13:19:23 -0400 |
| commit | cc16e343b592e0855b5d3a808fcad2e4126f7068 (patch) | |
| tree | 29d99f83c3386f18811100624af008ebf63bbc35 /ShiftOS_TheReturn | |
| parent | f8854f0e4477f87ef68649e769b8126e7586865a (diff) | |
| download | shiftos_thereturn-cc16e343b592e0855b5d3a808fcad2e4126f7068.tar.gz shiftos_thereturn-cc16e343b592e0855b5d3a808fcad2e4126f7068.tar.bz2 shiftos_thereturn-cc16e343b592e0855b5d3a808fcad2e4126f7068.zip | |
fix rng bug with loot
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/Hacking.cs | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |
