From 0b2272bfa76008b9d99496da7e4496b6337650bc Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 12 Apr 2024 19:39:06 -0700 Subject: [PATCH] don't show non-unique team rewards in purchased list --- src/SendCommands.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SendCommands.cc b/src/SendCommands.cc index be5882ea..ac08476c 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -4056,9 +4056,8 @@ void send_team_reward_list(shared_ptr c, bool show_purchased) { for (const auto& reward : s->team_index->reward_definitions()) { // In the buy menu, hide rewards that can't be bought again (that is, unique // rewards that the team already has). In the bought menu, hide rewards that - // the team does not have. - bool has_reward = team->has_reward(reward.key); - if (show_purchased ? (!has_reward) : (has_reward && reward.is_unique)) { + // the team does not have or that can be bought again. + if (show_purchased != (team->has_reward(reward.key) && reward.is_unique)) { continue; } if (!show_item_rewards && !reward.reward_item.empty()) {