52 logger->
log1(
"Initializing monster database...");
64 XmlNodeConstPtr rootNode = doc.
rootNode();
66 if ((rootNode ==
nullptr) || !xmlNameEqual(rootNode,
"monsters"))
68 logger->
log(
"Monster Database: Error while loading %s!",
80 if (xmlNameEqual(monsterNode,
"include"))
87 if (!xmlNameEqual(monsterNode,
"monster"))
95 logger->
log(
"MonsterDB: Redefinition of monster ID %d",
id);
98 if (currentInfo ==
nullptr)
104 monsterNode,
"name",
_(
"unnamed")));
113 monsterNode,
"deadSortOffsetY", 31));
127 currentInfo,
"MonsterDB");
137 logger->
log1(
"Unloading monster database...");
155 reportAlways(
"MonsterDB: Warning, unknown monster ID %d requested",
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)
static const unsigned int OLD_TMWATHENA_OFFSET
bool readObjectNodes(xmlNode *const &spriteNode, SpriteDisplay &display, BeingInfo *const currentInfo, const std::string &dbName)
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)
int getProperty(const xmlNodePtr node, const char *const name, int def)
const bool SkipError_false
const bool SkipError_true
const bool UseVirtFs_true