summaryrefslogtreecommitdiff
path: root/src/utils/xml.hpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-02-20 23:15:54 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-02-20 23:15:54 +0000
commitd1649dfdf5628fb49d1c2c50085cd318a87a515f (patch)
tree8259e3fd44d3f9ac6527d3e6ada98aa017c7a7ad /src/utils/xml.hpp
parent21a8c4c0eb44513f89aede04504c2ee67bcea175 (diff)
downloadmanaserv-d1649dfdf5628fb49d1c2c50085cd318a87a515f.tar.gz
manaserv-d1649dfdf5628fb49d1c2c50085cd318a87a515f.tar.bz2
manaserv-d1649dfdf5628fb49d1c2c50085cd318a87a515f.tar.xz
manaserv-d1649dfdf5628fb49d1c2c50085cd318a87a515f.zip
Implemented different monster attacks read from monsters.xml
Diffstat (limited to 'src/utils/xml.hpp')
-rw-r--r--src/utils/xml.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/utils/xml.hpp b/src/utils/xml.hpp
index ace8d64d..d2ab62e7 100644
--- a/src/utils/xml.hpp
+++ b/src/utils/xml.hpp
@@ -27,6 +27,9 @@
#include <string>
#include <libxml/tree.h>
+#include "defines.h"
+#include "../game-server/item.hpp"
+
namespace XML
{
/**
@@ -38,6 +41,26 @@ namespace XML
* Gets a string property from an xmlNodePtr.
*/
std::string getProperty(xmlNodePtr node, char const *name, std::string const &def);
+
+ /**
+ * Gets an floating point property from an xmlNodePtr.
+ */
+ double
+ getFloatProperty(xmlNodePtr node, const char *name, double def);
+
+
+ /**
+ * Converts a string into an element number
+ */
+ unsigned int elementFromString(std::string name);
+ /**
+ * Converts a string into an ItemType number
+ */
+ ItemType itemTypeFromString (std::string name);
+ /**
+ * Converts a string into a weaponType number
+ */
+ WeaponType weaponTypeFromString (std::string name);
}
#define for_each_xml_child_node(var, parent) \