20#ifndef HEADER_ACHIEVEMENT_INFO_HPP
21#define HEADER_ACHIEVEMENT_INFO_HPP
56 operationType operation;
57 std::vector<goalTree> children;
74 int recursiveGoalCount(
goalTree &parent);
75 int recursiveProgressCount(
goalTree &parent);
90 int getProgressTarget() {
return recursiveProgressCount(
m_goal_tree); }
91 int getGoalCount() {
return recursiveGoalCount(
m_goal_tree); }
93 uint32_t getID()
const {
return m_id; }
94 irr::core::stringw getDescription()
const;
95 irr::core::stringw getName()
const;
96 std::string getRawName()
const {
return m_name; }
97 std::string getRawDescription()
const {
return m_description; }
101 void copyGoalTree(goalTree ©, goalTree &model,
bool set_values_to_zero);
This class stores an achievement definition from the xml file, including title, description,...
Definition: achievement_info.hpp:41
virtual irr::core::stringw goalString()
Returns a string with the number of goals to fullfil to get this achievements.
Definition: achievement_info.cpp:187
std::string m_description
The description of this achievement.
Definition: achievement_info.hpp:68
void parseGoals(const XMLNode *input, goalTree &parent)
Parses recursively the list of goals, to construct the tree of goals.
Definition: achievement_info.cpp:67
virtual irr::core::stringw progressString()
Returns a string with the target of the goal if the achievement has only one goal (a sum counts as on...
Definition: achievement_info.cpp:215
int getRecursiveDepth(goalTree &parent)
Returns the goal tree's depth.
Definition: achievement_info.cpp:159
std::string m_name
The title of this achievement.
Definition: achievement_info.hpp:65
goalTree m_goal_tree
The tree storing all goals.
Definition: achievement_info.hpp:81
bool m_is_secret
A secret achievement has its progress not shown.
Definition: achievement_info.hpp:71
void copyGoalTree(goalTree ©, goalTree &model, bool set_values_to_zero)
Copy a goal tree to an EMPTY goal tree by recursion.
Definition: achievement_info.cpp:141
uint32_t m_id
The id of this Achievement.
Definition: achievement_info.hpp:62
Dialog that shows an achievement description and progress.
Definition: achievement_progress_dialog.hpp:42
Definition: achievement.hpp:42
utility class used to parse XML files
Definition: xml_node.hpp:48
Definition: achievement_info.hpp:53
Declares the general types that are used by the network.