diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-12-03 16:58:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-03 16:58:53 -0500 |
commit | 8cbb207795e539deb1667c9b43cc0591f9ba9206 (patch) | |
tree | ebfa208ad3df896b6c6414220f29a952b30089fc | |
parent | 83be1bfc8fc071e26d2a3f8191a9c7ecc7161dce (diff) | |
parent | 1a08d8fcb4bb2aaa1dd36a5f751bb31519545a4b (diff) |
Merge pull request #1568 from GriffinRichards/fix-roamerstatus
Add BUGFIX for roamer's status
-rw-r--r-- | src/roamer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/roamer.c b/src/roamer.c index 4811ac3b2..c17ec490c 100644 --- a/src/roamer.c +++ b/src/roamer.c @@ -193,10 +193,18 @@ bool8 IsRoamerAt(u8 mapGroup, u8 mapNum) void CreateRoamerMonInstance(void) { + u32 status; struct Pokemon *mon = &gEnemyParty[0]; ZeroEnemyPartyMons(); CreateMonWithIVsPersonality(mon, ROAMER->species, ROAMER->level, ROAMER->ivs, ROAMER->personality); +// The roamer's status field is u8, but SetMonData expects status to be u32, so will set the roamer's status +// using the status field and the following 3 bytes (cool, beauty, and cute). +#ifdef BUGFIX + status = ROAMER->status; + SetMonData(mon, MON_DATA_STATUS, &status); +#else SetMonData(mon, MON_DATA_STATUS, &ROAMER->status); +#endif SetMonData(mon, MON_DATA_HP, &ROAMER->hp); SetMonData(mon, MON_DATA_COOL, &ROAMER->cool); SetMonData(mon, MON_DATA_BEAUTY, &ROAMER->beauty); |