Fixes RNG (#181)

This commit is contained in:
Kamron Batman 2020-07-25 15:57:32 -07:00 • committed by GitHub
parent 319a990ede
commit ff3a28ab84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 273 additions and 115 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Random;
namespace Server.Engines.Harvest
{
@ -116,7 +117,7 @@ namespace Server.Engines.Harvest
if (RandomizeVeins) return GetVeinFrom(Utility.Random(1000u));
// TODO: Introduce pulling primes from a config and writing them if they don't exist to the config
using Xoshiro256PlusPlus random = new Xoshiro256PlusPlus((ulong)(x * 17 + y * 11 + map.MapID * 3));
var random = new Xoshiro256PlusPlus((ulong)(x * 17 + y * 11 + map.MapID * 3));
return GetVeinFrom(random.Next(VeinWeights));
}