mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Merge pull request #1568 from GriffinRichards/fix-roamerstatus
Add BUGFIX for roamer's status
This commit is contained in:
commit
8cbb207795
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user