48 logger->
log1(
"Initializing mercenary database...");
62 XmlNodeConstPtr rootNode = doc.
rootNode();
64 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"mercenaries"))
66 logger->
log(
"MercenaryDB: Error while loading %s!",
77 if (xmlNameEqual(mercenaryNode,
"include"))
80 mercenaryNode,
"name",
"");
85 if (!xmlNameEqual(mercenaryNode,
"mercenary"))
93 logger->
log(
"MercenaryDB: Redefinition of mercenary ID %d",
id);
96 if (currentInfo ==
nullptr)
102 mercenaryNode,
"name",
_(
"unnamed")));
110 mercenaryNode,
"deadSortOffsetY", 31));
124 currentInfo,
"MonsterDB");
134 logger->
log1(
"Unloading mercenary database...");
151 reportAlways(
"MercenaryDB: Warning, unknown mercenary 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
#define reportAlways(...)
void setBlockType(const BlockTypeT &blockType)
void setColorsList(const std::string &name)
void setName(const std::string &name)
void setDisplay(const SpriteDisplay &display)
void setDeadSortOffsetY(const int n)
void setStaticMaxHP(const bool n)
static BeingInfo * unknown
void setMaxHP(const int n)
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)
bool readObjectNodes(xmlNode *const &spriteNode, SpriteDisplay &display, BeingInfo *const currentInfo, const std::string &dbName)
void readAiAttributes(BeingInfo *const info, xmlNode *const node)
void readBasicAttributes(BeingInfo *const info, xmlNode *const node, const std::string &hoverCursor)
void readWalkingAttributes(BeingInfo *const info, xmlNode *const node, const int moreBlockFlags)
BeingInfo * get(const BeingTypeId id)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
int getProperty(const xmlNodePtr node, const char *const name, int def)
BeingInfos mMercenaryInfos
const bool SkipError_false
const bool SkipError_true
const bool UseVirtFs_true