Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Add AutoFavoriteShinyOnCatch Feature & Functionality
Browse files Browse the repository at this point in the history
* Update CatchPokemonTask.cs

* Fix typo
  • Loading branch information
Lord-Haji authored Mar 28, 2017
1 parent dee7861 commit 47984c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion PoGo.NecroBot.Logic/Tasks/CatchPokemonTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,13 @@ encounter is EncounterResponse || encounter is IncenseEncounterResponse

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();

if (session.LogicSettings.AutoFavoriteShinyOnCatch)
{
if (evt.Shiny == "Yes")
{
await FavoritePokemonTask.Execute (session, encounteredPokemon.Id, true);
}
}
var totalExp = 0;
var totalStarDust = caughtPokemonResponse.CaptureAward.Stardust.Sum();
if (encounteredPokemon != null)
Expand Down

0 comments on commit 47984c0

Please sign in to comment.