fix challenge overlay creation on non-BB versions
This commit is contained in:
@@ -2617,14 +2617,11 @@ static void on_AC_V3_BB(shared_ptr<Client> c, uint16_t, uint32_t, string& data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (send_quest_barrier_if_all_clients_ready(l) &&
|
||||
(l->base_version == GameVersion::BB) &&
|
||||
l->map &&
|
||||
l->quest) {
|
||||
if (send_quest_barrier_if_all_clients_ready(l) && l->quest) {
|
||||
auto s = l->require_server_state();
|
||||
|
||||
auto vq = l->quest->version(QuestScriptVersion::BB_V4, c->language());
|
||||
|
||||
if ((l->base_version == GameVersion::BB) && l->map) {
|
||||
auto dat_contents = prs_decompress(*vq->dat_contents);
|
||||
l->map->clear();
|
||||
l->map->add_enemies_and_objects_from_quest_data(
|
||||
@@ -2647,13 +2644,16 @@ static void on_AC_V3_BB(shared_ptr<Client> c, uint16_t, uint32_t, string& data)
|
||||
string e_str = l->map->enemies[z].str();
|
||||
l->log.info("(E-%zX) %s", z, e_str.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& lc : l->clients) {
|
||||
if (!lc) {
|
||||
continue;
|
||||
}
|
||||
|
||||
send_rare_enemy_index_list(c, l->map->rare_enemy_indexes);
|
||||
if ((l->base_version == GameVersion::BB) && l->map) {
|
||||
send_rare_enemy_index_list(lc, l->map->rare_enemy_indexes);
|
||||
}
|
||||
|
||||
// On non-BB versions, overlays are created when the quest starts because
|
||||
// the server is not informed when the clients have replaced their player
|
||||
|
||||
Reference in New Issue
Block a user