add v2 challenge templates

This commit is contained in:
Martin Michelsen
2023-10-29 17:59:36 -07:00
parent 5ec969ece3
commit 138c563a40
5 changed files with 154 additions and 86 deletions
+3 -2
View File
@@ -92,8 +92,9 @@ void ClientGameData::create_battle_overlay(shared_ptr<const BattleRules> rules,
}
}
void ClientGameData::create_challenge_overlay(size_t template_index, shared_ptr<const LevelTable> level_table) {
const auto& tpl = get_challenge_template_definition(this->player(true, false)->disp.visual.class_flags, template_index);
void ClientGameData::create_challenge_overlay(GameVersion version, size_t template_index, shared_ptr<const LevelTable> level_table) {
const auto& tpl = get_challenge_template_definition(
version, this->player(true, false)->disp.visual.class_flags, template_index);
this->overlay_player_data.reset(new SavedPlayerDataBB(*this->player(true, false)));
auto overlay = this->overlay_player_data;