[Hotfix] Use `getPokemonSpecies()` instead of `allSpecies[]` (#3179)
This commit is contained in:
parent
09e7192046
commit
8a883ea079
|
@ -853,8 +853,8 @@ export class GameData {
|
||||||
try {
|
try {
|
||||||
const sessionData = this.parseSessionData(sessionDataStr);
|
const sessionData = this.parseSessionData(sessionDataStr);
|
||||||
for (let i = 0; i <= 5; i++) {
|
for (let i = 0; i <= 5; i++) {
|
||||||
|
const speciesToCheck = getPokemonSpecies(sessionData.party[i]?.species);
|
||||||
if (sessionData.party[i]?.abilityIndex === 1) {
|
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) {
|
if (speciesToCheck.ability1 === speciesToCheck.ability2 && speciesToCheck.abilityHidden !== Abilities.NONE && speciesToCheck.abilityHidden !== speciesToCheck.ability1) {
|
||||||
sessionData.party[i].abilityIndex = 2;
|
sessionData.party[i].abilityIndex = 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue