disable $bank when character overlay is present

This commit is contained in:
Martin Michelsen
2023-12-09 10:38:48 -08:00
parent 0ded423c84
commit bb3d4ac847
4 changed files with 16 additions and 1 deletions
+3
View File
@@ -1896,9 +1896,11 @@ static void on_quest_loaded(shared_ptr<Lobby> l) {
if (l->base_version != Version::BB_V4) {
lc->delete_overlay();
if (l->quest->battle_rules) {
lc->use_default_bank();
lc->create_battle_overlay(l->quest->battle_rules, s->level_table);
lc->log.info("Created battle overlay");
} else if (l->quest->challenge_template_index >= 0) {
lc->use_default_bank();
lc->create_challenge_overlay(lc->version(), l->quest->challenge_template_index, s->level_table);
lc->log.info("Created challenge overlay");
l->assign_inventory_and_bank_item_ids(lc);
@@ -3463,6 +3465,7 @@ static void on_DF_BB(shared_ptr<Client> c, uint16_t command, uint32_t, string& d
for (auto lc : l->clients) {
if (lc) {
lc->use_default_bank();
lc->create_challenge_overlay(lc->version(), l->quest->challenge_template_index, s->level_table);
lc->log.info("Created challenge overlay");
l->assign_inventory_and_bank_item_ids(lc);