From 7ab98f41da017ffa29f8b152a68641da3925fb56 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 18 Nov 2023 22:13:59 -0800 Subject: [PATCH] fix challenge overlays for non-leaders --- src/ReceiveCommands.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index abb7da1e..c73c1c18 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -3352,9 +3352,13 @@ static void on_DF_BB(shared_ptr c, uint16_t command, uint32_t, string& d if (l->quest->challenge_template_index != static_cast(cmd.template_index)) { throw runtime_error("challenge template index in quest metadata does not match index sent by client"); } - c->game_data.create_challenge_overlay(c->version(), l->quest->challenge_template_index, s->level_table); - c->log.info("Created challenge overlay"); - l->assign_inventory_item_ids(c); + for (auto lc : l->clients) { + if (lc) { + lc->game_data.create_challenge_overlay(lc->version(), l->quest->challenge_template_index, s->level_table); + lc->log.info("Created challenge overlay"); + l->assign_inventory_item_ids(lc); + } + } break; }