implement challenge stage unlocks

This commit is contained in:
Martin Michelsen
2024-01-14 09:47:03 -08:00
parent 02e8f8ea8b
commit c15e154846
19 changed files with 162 additions and 25 deletions
+6 -2
View File
@@ -340,9 +340,11 @@ bool Client::can_see_quest(shared_ptr<const Quest> q, uint8_t difficulty, size_t
if (!q->available_expression) {
return true;
}
auto p = this->character();
string expr = q->available_expression->str();
QuestAvailabilityExpression::Env env = {
.flags = &this->character()->quest_flags.data.at(difficulty),
.flags = &p->quest_flags.data.at(difficulty),
.challenge_records = &p->challenge_records,
.team = this->team(),
.num_players = num_players,
};
@@ -358,9 +360,11 @@ bool Client::can_play_quest(shared_ptr<const Quest> q, uint8_t difficulty, size_
if (!q->enabled_expression) {
return true;
}
auto p = this->character();
string expr = q->enabled_expression->str();
QuestAvailabilityExpression::Env env = {
.flags = &this->character()->quest_flags.data.at(difficulty),
.flags = &p->quest_flags.data.at(difficulty),
.challenge_records = &p->challenge_records,
.team = this->team(),
.num_players = num_players,
};