Skip to content

Commit

Permalink
[Hotfix] Use getPokemonSpecies() instead of allSpecies[] (#3179)
Browse files Browse the repository at this point in the history
  • Loading branch information
DayKev authored Jul 28, 2024
1 parent 09e7192 commit 8a883ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/system/game-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,8 @@ export class GameData {
try {
const sessionData = this.parseSessionData(sessionDataStr);
for (let i = 0; i <= 5; i++) {
const speciesToCheck = getPokemonSpecies(sessionData.party[i]?.species);
if (sessionData.party[i]?.abilityIndex === 1) {
const speciesToCheck = allSpecies[sessionData.party[i].species - 1];
if (speciesToCheck.ability1 === speciesToCheck.ability2 && speciesToCheck.abilityHidden !== Abilities.NONE && speciesToCheck.abilityHidden !== speciesToCheck.ability1) {
sessionData.party[i].abilityIndex = 2;
}
Expand Down

0 comments on commit 8a883ea

Please sign in to comment.