Skip to content

Commit

Permalink
Merge pull request #4033 from cawk/master
Browse files Browse the repository at this point in the history
Change Level Up Colour
  • Loading branch information
GrimmGringo committed Aug 9, 2016
2 parents 1a2b1d2 + dbee5b1 commit bd2b341
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions PoGo.NecroBot.CLI/ConsoleLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public void Write(string message, LogLevel level = LogLevel.Info, ConsoleColor c
Console.ForegroundColor = color == ConsoleColor.Black ? ConsoleColor.DarkRed : color;
Console.WriteLine($"[{DateTime.Now.ToString("HH:mm:ss")}] ({LoggingStrings.SoftBan}) {message}");
break;
case LogLevel.LevelUp:
Console.ForegroundColor = color == ConsoleColor.Black ? ConsoleColor.Magenta : color;
Console.WriteLine($"[{DateTime.Now.ToString("HH:mm:ss")}] ({LoggingStrings.Pkmn}) {message}");
break;
default:
Console.ForegroundColor = color == ConsoleColor.Black ? ConsoleColor.White : color;
Console.WriteLine($"[{DateTime.Now.ToString("HH:mm:ss")}] ({LoggingStrings.Error}) {message}");
Expand Down
2 changes: 1 addition & 1 deletion PoGo.NecroBot.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private static void Main(string[] args)
if (args.Length > 0)
subPath = args[0];

var logger = new ConsoleLogger(LogLevel.SoftBan);
var logger = new ConsoleLogger(LogLevel.LevelUp);
Logger.SetLogger(logger, subPath);

if (CheckKillSwitch())
Expand Down
3 changes: 2 additions & 1 deletion PoGo.NecroBot.Logic/Logging/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public enum LogLevel
Info = 14,
New = 15,
SoftBan = 16,
Debug = 17,
LevelUp = 17,
Debug = 18,
}
}
4 changes: 2 additions & 2 deletions PoGo.NecroBot.Logic/Tasks/LevelUpPokemonTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio
Logger.Write("Pokemon Upgraded:" +
session.Translation.GetPokemonTranslation(
upgradeResult.UpgradedPokemon.PokemonId) + ":" +
upgradeResult.UpgradedPokemon.Cp);
upgradeResult.UpgradedPokemon.Cp,LogLevel.LevelUp);
upgradedNumber++;
}

Expand Down Expand Up @@ -84,7 +84,7 @@ public static async Task Execute(ISession session, CancellationToken cancellatio
if (upgradeResult.Result.ToString().ToLower().Contains("success"))
{
Logger.Write("Pokemon Upgraded:" + session.Translation.GetPokemonTranslation(upgradeResult.UpgradedPokemon.PokemonId) + ":" +
upgradeResult.UpgradedPokemon.Cp);
upgradeResult.UpgradedPokemon.Cp, LogLevel.LevelUp);
upgradedNumber++;
}

Expand Down

0 comments on commit bd2b341

Please sign in to comment.