50 logger->
log1(
"Initializing skill unit database...");
61 XmlNodeConstPtrConst rootNode = doc.
rootNode();
63 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"skillunits"))
65 logger->
log(
"SkillUnitDb: Error while loading %s!",
73 if (xmlNameEqual(skillUnitNode,
"include"))
81 else if (!xmlNameEqual(skillUnitNode,
"skillunit"))
90 reportAlways(
"SkillUnitDb: skill unit with missing ID in %s!",
98 if (currentInfo ==
nullptr)
103 "name",
_(
"skill")));
106 "targetSelection",
true));
112 "deadSortOffsetY", 31));
117 if (!XmlHaveChildContent(spriteNode))
120 if (xmlNameEqual(spriteNode,
"sprite"))
123 currentSprite->
sprite = XmlChildContent(spriteNode);
126 display.
sprites.push_back(currentSprite);
128 else if (xmlNameEqual(spriteNode,
"particlefx"))
130 std::string particlefx = XmlChildContent(spriteNode);
143 logger->
log1(
"Unloading skill unit database...");
156 reportAlways(
"SkillUnitDb: Warning, unknown skill unit id "
static void loadXmlFile(const std::string &file, const std::string &name, BadgesInfos &arr, const SkipError skipError)
#define loadXmlDir(name, function)
BeingInfos::iterator BeingInfoIterator
std::map< BeingTypeId, BeingInfo * > BeingInfos
const BeingTypeId BeingTypeId_negOne
#define reportAlways(...)
void setTargetSelection(const bool n)
void setName(const std::string &name)
void setDisplay(const SpriteDisplay &display)
void setDeadSortOffsetY(const int n)
static BeingInfo * unknown
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
void delete_all(Container &c)
#define fromInt(val, name)
#define for_each_xml_child_node(var, parent)
void readBasicAttributes(BeingInfo *const info, xmlNode *const node, const std::string &hoverCursor)
void readWalkingAttributes(BeingInfo *const info, xmlNode *const node, const int moreBlockFlags)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
BeingInfo * get(const BeingTypeId id)
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
bool getBoolProperty(const xmlNodePtr node, const char *const name, const bool def)
int getProperty(const xmlNodePtr node, const char *const name, int def)
BeingInfos mSkillUnitInfos
const bool SkipError_false
const bool SkipError_true
std::vector< SpriteReference * > sprites
const bool UseVirtFs_true