Skip to content

Commit

Permalink
add v2 challenge templates
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzziqersoftware committed Oct 30, 2023
1 parent 5ec969e commit 138c563
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 86 deletions.
5 changes: 3 additions & 2 deletions src/Player.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Player.hh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public:
~ClientGameData();

void create_battle_overlay(std::shared_ptr<const BattleRules> rules, std::shared_ptr<const LevelTable> level_table);
void create_challenge_overlay(size_t template_index, std::shared_ptr<const LevelTable> level_table);
void create_challenge_overlay(GameVersion version, size_t template_index, std::shared_ptr<const LevelTable> level_table);
inline void delete_overlay() {
this->overlay_player_data.reset();
}
Expand Down
Loading

0 comments on commit 138c563

Please sign in to comment.