From 9e4fb51719f23b48db499ab549578e0add0ded1e Mon Sep 17 00:00:00 2001 From: redChrillz Date: Tue, 2 Aug 2016 13:43:02 +0200 Subject: [PATCH] Add lat and long to pokemon capture event --- PoGo.NecroBot.CLI/ConsoleEventListener.cs | 7 ++++--- PoGo.NecroBot.Logic/Common/Translations.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PoGo.NecroBot.CLI/ConsoleEventListener.cs b/PoGo.NecroBot.CLI/ConsoleEventListener.cs index caacedaaf..0961fb11a 100644 --- a/PoGo.NecroBot.CLI/ConsoleEventListener.cs +++ b/PoGo.NecroBot.CLI/ConsoleEventListener.cs @@ -174,11 +174,12 @@ private static void HandleEvent(PokemonCaptureEvent pokemonCaptureEvent, ISessio ? session.Translation.GetTranslation(TranslationString.Candies, pokemonCaptureEvent.FamilyCandies) : ""; - Logger.Write( - session.Translation.GetTranslation(TranslationString.EventPokemonCapture, catchStatus, catchType, pokemonCaptureEvent.Id, + var message = session.Translation.GetTranslation(TranslationString.EventPokemonCapture, catchStatus, catchType, pokemonCaptureEvent.Id, pokemonCaptureEvent.Level, pokemonCaptureEvent.Cp, pokemonCaptureEvent.MaxCp, pokemonCaptureEvent.Perfection.ToString("0.00"), pokemonCaptureEvent.Probability, pokemonCaptureEvent.Distance.ToString("F2"), - returnRealBallName(pokemonCaptureEvent.Pokeball), pokemonCaptureEvent.BallAmount, familyCandies), LogLevel.Caught); + returnRealBallName(pokemonCaptureEvent.Pokeball), pokemonCaptureEvent.BallAmount, familyCandies, pokemonCaptureEvent.Latitude, pokemonCaptureEvent.Longitude); + + Logger.Write(message, LogLevel.Caught); } private static void HandleEvent(NoPokeballEvent noPokeballEvent, ISession session) diff --git a/PoGo.NecroBot.Logic/Common/Translations.cs b/PoGo.NecroBot.Logic/Common/Translations.cs index 006c61621..acbdf9ee3 100644 --- a/PoGo.NecroBot.Logic/Common/Translations.cs +++ b/PoGo.NecroBot.Logic/Common/Translations.cs @@ -187,7 +187,7 @@ public class Translation : ITranslation "{0}\t- CP: {1} IV: {2}% [Best CP: {3} IV: {4}%] (Candies: {5})"), new KeyValuePair(TranslationString.EventItemRecycled, "{0}x {1}"), new KeyValuePair(TranslationString.EventPokemonCapture, - "({0}) | ({1}) {2} Lvl: {3} CP: ({4}/{5}) IV: {6}% | Chance: {7}% | {8}m dist | with a {9} ({10} left). | {11}"), + "({0}) | ({1}) {2} Lvl: {3} CP: ({4}/{5}) IV: {6}% | Chance: {7}% | {8}m dist | with a {9} ({10} left). | {11} | lat: {12} long: {13}"), new KeyValuePair(TranslationString.EventNoPokeballs, "No Pokeballs - We missed a {0} with CP {1}"), new KeyValuePair(TranslationString.WaitingForMorePokemonToEvolve,