diff --git a/PoGo.NecroBot.Logic/Interfaces/Configuration/ILogicSettings.cs b/PoGo.NecroBot.Logic/Interfaces/Configuration/ILogicSettings.cs index 69b03900e..7a3185327 100644 --- a/PoGo.NecroBot.Logic/Interfaces/Configuration/ILogicSettings.cs +++ b/PoGo.NecroBot.Logic/Interfaces/Configuration/ILogicSettings.cs @@ -107,6 +107,7 @@ public interface ILogicSettings int FavoriteMinLevel { get; } string FavoriteOperator { get; } bool AutoFavoritePokemon { get; } + bool AutoFavoriteShinyOnCatch { get; } string RenameTemplate { get; } int AmountOfPokemonToDisplayOnStart { get; } string TranslationLanguageCode { get; } @@ -250,4 +251,4 @@ public interface ILogicSettings int CatchMissedDelay { get; } int BeforeCatchDelay { get; } } -} \ No newline at end of file +} diff --git a/PoGo.NecroBot.Logic/Model/Settings/LogicSettings.cs b/PoGo.NecroBot.Logic/Model/Settings/LogicSettings.cs index 04daecc4e..e303c0d6e 100644 --- a/PoGo.NecroBot.Logic/Model/Settings/LogicSettings.cs +++ b/PoGo.NecroBot.Logic/Model/Settings/LogicSettings.cs @@ -171,6 +171,7 @@ public float GenRandom(float val) public string FavoriteOperator => _settings.PokemonConfig.FavoriteOperator.ToString(); public bool AutoFavoritePokemon => _settings.PokemonConfig.AutoFavoritePokemon; + public bool AutoFavoriteShinyOnCatch => _settings.PokemonConfig.AutoFavoriteShinyOnCatch; public string RenameTemplate => _settings.PokemonConfig.RenameTemplate; public int AmountOfPokemonToDisplayOnStart => _settings.ConsoleConfig.AmountOfPokemonToDisplayOnStart; public bool DumpPokemonStats => _settings.PokemonConfig.DumpPokemonStats; @@ -290,4 +291,4 @@ public float GenRandom(float val) public int BeforeCatchDelay => _settings.HumanlikeDelays.BeforeCatchDelay; } -} \ No newline at end of file +} diff --git a/PoGo.NecroBot.Logic/Tasks/CatchPokemonTask.cs b/PoGo.NecroBot.Logic/Tasks/CatchPokemonTask.cs index 39797cf1d..fbb322579 100644 --- a/PoGo.NecroBot.Logic/Tasks/CatchPokemonTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/CatchPokemonTask.cs @@ -429,6 +429,7 @@ encounter is EncounterResponse || encounter is IncenseEncounterResponse if (caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchSuccess) { + evt.Shiny = (await session.Inventory.GetPokemons().ConfigureAwait(false)).First(x => x.Id == caughtPokemonResponse.CapturedPokemonId).PokemonDisplay.Shiny ? "Yes" : "No"; evt.Gender = (await session.Inventory.GetPokemons().ConfigureAwait(false)).First(x => x.Id == caughtPokemonResponse.CapturedPokemonId).PokemonDisplay.Gender.ToString();