Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Fix event 322
Browse files Browse the repository at this point in the history
The params for 322 are [unk, character, unk, face, unk, battler] but it
got parsed as [unk, face, unk, character, unk, battler] with unk being
unknown.

Resolves #49
  • Loading branch information
erri120 committed Feb 24, 2022
1 parent 1d160b8 commit ce817e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog][Keep a Changelog] and this project adh

## [Released]

## [2.0.5] - 2022-02-24

Fixed event 322 ("Change Actor Images"), the character image was parsed as a face image and vice versa ([#49](https://github.com/erri120/rpgmpacker/issues/49)).

## [2.0.4] - 2021-12-31

Parameters for Plugins at the end will no longer be ignored.
Expand Down
6 changes: 3 additions & 3 deletions src/parsedData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function parseEvents(events: Array<Event>, res: ParsedData) {
* - 283: change battle back, [0] is battlebacks1 and [1] is battlebacks2
* - 284: change parallax, [0] is image name
*
* - 322: change actor images, [1] is face name, [3] is character name, [5] is battler name
* - 322: change actor images, [1] is character name, [3] is face name, [5] is battler name
* - 323: change vehicle image, [1] is face name
*
* - 337: show battle animation, [1] is index of animation
Expand Down Expand Up @@ -246,8 +246,8 @@ function parseEvents(events: Array<Event>, res: ParsedData) {
specialPush(res.parallaxNames, params[0]);
} else if (code === 322) {
const params = event.parameters as string[];
specialPush(res.faceNames, params[1]);
specialPush(res.characterNames, params[3]);
specialPush(res.characterNames, params[1]);
specialPush(res.faceNames, params[3]);
specialPush(res.actorBattlerNames, params[5]);
} else if (code === 323) {
const params = event.parameters as string[];
Expand Down

0 comments on commit ce817e8

Please sign in to comment.