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

Commit

Permalink
Merge branch 'features/auto_favorite_shiny_on_catch' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Haji authored Mar 28, 2017
2 parents f365b00 + 5cd3c4e commit dee7861
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -250,4 +251,4 @@ public interface ILogicSettings
int CatchMissedDelay { get; }
int BeforeCatchDelay { get; }
}
}
}
3 changes: 2 additions & 1 deletion PoGo.NecroBot.Logic/Model/Settings/LogicSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -290,4 +291,4 @@ public float GenRandom(float val)
public int BeforeCatchDelay => _settings.HumanlikeDelays.BeforeCatchDelay;

}
}
}
1 change: 1 addition & 0 deletions PoGo.NecroBot.Logic/Tasks/CatchPokemonTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit dee7861

Please sign in to comment.