Skip to content

Commit

Permalink
Add support for pokemon forms via quest subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
versx committed May 26, 2021
1 parent 7a0cf6f commit c80db0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Extensions/QuestExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public static string GetReward(this QuestRewardType type, QuestReward info)
var itemName = Translator.Instance.GetItem(info.Item);
return Translator.Instance.Translate(rewardKey, info.Amount, itemName);
case QuestRewardType.PokemonEncounter:
return (info.Shiny ? $"**SHINY** " : "") + Translator.Instance.GetPokemonName(info.Ditto ? 132 : info.PokemonId);
var formName = info.FormId > 0 ? Translator.Instance.GetFormName(info.FormId) : null;
var pkmnName = (info.Shiny ? $"**SHINY** " : "") + Translator.Instance.GetPokemonName(info.Ditto ? 132 : info.PokemonId);
return $"{pkmnName} {formName}";
case QuestRewardType.Stardust:
return Translator.Instance.Translate(rewardKey, info.Amount);
case QuestRewardType.MegaResource:
Expand Down

0 comments on commit c80db0c

Please sign in to comment.