[Hotfix] Use `getPokemonSpecies()` instead of `allSpecies[]` (#3179)

This commit is contained in:
NightKev 2024-07-27 21:54:32 -07:00 committed by GitHub
parent 09e7192046
commit 8a883ea079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}