mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-21 06:48:39 -04:00
Fix bugs in hints (#7046)
1. fix filtering trials hints when only 1-3 required 2. clearing names per iteration won't work with dual hints
This commit is contained in:
@@ -480,8 +480,8 @@ static void CreateTrialHints(uint8_t copies) {
|
||||
ctx->GetTrials()->GetTrialList(); // there's probably a way to remove this assignment
|
||||
if (ctx->GetOption(RSK_TRIAL_COUNT).Get() >= 4) { // 4 or 5 required trials, get skipped trials
|
||||
trials = FilterFromPool(trials, [](TrialInfo* trial) { return trial->IsSkipped(); });
|
||||
} else { // 1 to 3 trials, get requried trials
|
||||
auto requiredTrials = FilterFromPool(trials, [](TrialInfo* trial) { return trial->IsRequired(); });
|
||||
} else { // 1 to 3 trials, get required trials
|
||||
trials = FilterFromPool(trials, [](TrialInfo* trial) { return trial->IsRequired(); });
|
||||
}
|
||||
for (auto& trial : trials) { // create a hint for each hinted trial
|
||||
AddGossipStoneHintCopies(copies, HINT_TYPE_TRIAL, "Trial", {}, {}, {}, { trial->GetTrialKey() });
|
||||
|
||||
@@ -181,9 +181,10 @@ void Hint::NamesChosen() {
|
||||
}
|
||||
|
||||
if (hintType == HINT_TYPE_ITEM || hintType == HINT_TYPE_ITEM_AREA) {
|
||||
namesTemp.clear();
|
||||
saveNames = false;
|
||||
|
||||
for (size_t c = 0; c < locations.size(); c++) {
|
||||
namesTemp = {};
|
||||
saveNames = false;
|
||||
uint8_t selection = GetRandomHintTextEntry(GetItemHintText(static_cast<u8>(c)));
|
||||
if (selection > 0) {
|
||||
saveNames = true;
|
||||
@@ -197,7 +198,7 @@ void Hint::NamesChosen() {
|
||||
|
||||
if (hintType == HINT_TYPE_FOOLISH || hintType == HINT_TYPE_ITEM_AREA || hintType == HINT_TYPE_WOTH ||
|
||||
hintType == HINT_TYPE_ALTAR_CHILD || hintType == HINT_TYPE_ALTAR_ADULT) {
|
||||
namesTemp = {};
|
||||
namesTemp.clear();
|
||||
saveNames = false;
|
||||
|
||||
for (uint8_t c = 0; c < areas.size(); c++) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace SOH {
|
||||
void* Scene::GetPointer() {
|
||||
// Scene is a special type that requries C++ processing. As such, we return nothing.
|
||||
// Scene is a special type that requires C++ processing. As such, we return nothing.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user