Skip to content

Commit

Permalink
Utilize RandomElement for hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Caladius committed Nov 12, 2024
1 parent aa1a9ad commit 0b27807
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions soh/soh/Enhancements/randomizer/Plandomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,11 @@ void PlandomizerItemImageCorrection(Rando::Item randoItem) {
}

void PlandomizerRandomizeHint(int32_t status, int32_t index) {
int32_t roll;
if (status == HINT_SINGLE) {
roll = (rand() % Rando::StaticData::hintTextTable.size());
plandoHintData[index].hintText = Rando::StaticData::hintTextTable[roll].GetHintMessage().GetForCurrentLanguage();
plandoHintData[index].hintText = RandomElement(Rando::StaticData::hintTextTable).GetHintMessage().GetForCurrentLanguage();
} else {
for (auto& hint : plandoHintData) {
roll = (rand() % Rando::StaticData::hintTextTable.size());
hint.hintText = Rando::StaticData::hintTextTable[roll].GetHintMessage().GetForCurrentLanguage();
hint.hintText = RandomElement(Rando::StaticData::hintTextTable).GetHintMessage().GetForCurrentLanguage();
}
}
}
Expand Down

0 comments on commit 0b27807

Please sign in to comment.