From ce817e8e5506cd4f09f469144ae3e0b4be84d202 Mon Sep 17 00:00:00 2001 From: erri120 Date: Thu, 24 Feb 2022 19:25:21 +0100 Subject: [PATCH] Fix event 322 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 --- CHANGELOG.md | 4 ++++ src/parsedData.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 262d44e..3bbbe33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/parsedData.ts b/src/parsedData.ts index 5a4b279..03fb7e4 100644 --- a/src/parsedData.ts +++ b/src/parsedData.ts @@ -198,7 +198,7 @@ function parseEvents(events: Array, 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 @@ -246,8 +246,8 @@ function parseEvents(events: Array, 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[];