mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Replace magic numbers in message handler
This commit is contained in:
parent
d95e4d4994
commit
42edeb25a6
1 changed files with 4 additions and 2 deletions
|
@ -1763,9 +1763,11 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
|
|||
} else {
|
||||
messageEntry = Randomizer_GetGanonHintText();
|
||||
}
|
||||
} else if (textId >= TEXT_SCRUB_RANDOM && textId <= TEXT_SCRUB_RANDOM + 0xFF) {
|
||||
// Business Scrub textID is TEXT_SCRUB_RANDOM + their price, anywhere from 0-95
|
||||
} else if (textId >= TEXT_SCRUB_RANDOM && textId <= TEXT_SCRUB_RANDOM + 95) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, textId);
|
||||
} else if (textId >= TEXT_SHOP_ITEM_RANDOM && textId <= TEXT_SHOP_ITEM_RANDOM + 0xFF) {
|
||||
// Shop items each have two message entries
|
||||
} else if (textId >= TEXT_SHOP_ITEM_RANDOM && textId <= TEXT_SHOP_ITEM_RANDOM + (NUM_SHOP_ITEMS * 2)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, textId);
|
||||
} else if (CVar_GetS32("gRandomizeRupeeNames", 0) &&
|
||||
(textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue