Skip to content

Commit

Permalink
- Fix issue with Ho-Oh subscriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
versx committed Dec 20, 2019
1 parent dce736d commit 2974981
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion masterfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -12137,7 +12137,7 @@
"buddy_distance_evolve": ""
},
"250": {
"name": "Ho oh",
"name": "Ho-Oh",
"forms": {},
"default_form": "",
"evolutions": [],
Expand Down
29 changes: 16 additions & 13 deletions src/Extensions/PokemonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,22 +1311,25 @@ public static PokemonValidation ValidatePokemon(this IEnumerable<string> pokemon
{
string form = null;
var pokeIdStr = poke;
if (poke.Contains("-"))
{
//Has form
var formSplit = poke.Split('-');
if (formSplit.Length != 2)
continue;

pokeIdStr = formSplit[0];
form = formSplit[1];
}

var pokeId = pokeIdStr.PokemonIdFromName();
if (pokeId == 0)
{
invalid.Add(poke);
continue;
if (poke.Contains("-"))
{
//Has form
var formSplit = poke.Split('-');
if (formSplit.Length != 2)
continue;

pokeIdStr = formSplit[0];
pokeId = pokeIdStr.PokemonIdFromName();
form = formSplit[1];
}
else
{
invalid.Add(poke);
continue;
}
}

if (!MasterFile.Instance.Pokedex.ContainsKey(pokeId))
Expand Down

0 comments on commit 2974981

Please sign in to comment.