Skip to content

Commit

Permalink
Fix RNG in UpgradePokemonTask.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilses committed Jul 30, 2016
1 parent 1199b6a commit 2d64255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PoGo.NecroBot.Logic/Tasks/LevelUpPokemonTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace PoGo.NecroBot.Logic.Tasks
{
internal class LevelUpPokemonTask
{
private static readonly Random rand = new Random();

public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
if (DisplayPokemonStatsTask.PokemonId.Count == 0 || DisplayPokemonStatsTask.PokemonIdcp.Count == 0)
Expand All @@ -20,7 +22,6 @@ public static async Task Execute(ISession session, CancellationToken cancellatio
}
if (session.LogicSettings.LevelUpByCPorIv.ToLower().Contains("iv"))
{
var rand = new Random();
var randomNumber = rand.Next(0, DisplayPokemonStatsTask.PokemonId.Count - 1);

var upgradeResult =
Expand Down

0 comments on commit 2d64255

Please sign in to comment.