mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
fix rng bug with loot
This commit is contained in:
parent
f8854f0e44
commit
cc16e343b5
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue