diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2022-02-14 21:17:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 21:17:44 -0500 |
commit | 759f373d3153afb0e9dcf5050a700aeca036a919 (patch) | |
tree | b43e8d72d1886eb1c38dadd67113bec77ef41a26 /src/menu_helpers.c | |
parent | 8d85ff1683437897cb0c06dd84fa2d927f560090 (diff) | |
parent | 59695b82210cb2c95c10b52efc1a88e18c67dea9 (diff) |
Merge pull request #488 from GriffinRichards/map-constants
Sync roamer.c, add missing map constant usage
Diffstat (limited to 'src/menu_helpers.c')
-rw-r--r-- | src/menu_helpers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/menu_helpers.c b/src/menu_helpers.c index a64a4a0cd..11d26f204 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -10,6 +10,7 @@ #include "field_specials.h" #include "constants/songs.h" #include "constants/items.h" +#include "constants/maps.h" static EWRAM_DATA const struct YesNoFuncTable *gUnknown_20399C8 = NULL; static EWRAM_DATA TaskFunc gUnknown_20399CC = NULL; @@ -94,7 +95,8 @@ bool8 itemid_link_can_give_berry(u16 itemId) { if (itemId != ITEM_ENIGMA_BERRY) return TRUE; - else if (!gSaveBlock1Ptr->location.mapGroup && gSaveBlock1Ptr->location.mapNum == 1) + else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) + && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER)) return FALSE; else if (InUnionRoom() != TRUE) return TRUE; |