summaryrefslogtreecommitdiff
path: root/src/resources/monsterdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-18 19:20:57 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-18 19:20:57 +0300
commit4de24231be93c6194801c8962d7bf00ed6c339ff (patch)
tree59e622c6e59a71a976d558f16d454ddce2af85e5 /src/resources/monsterdb.cpp
parent30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c (diff)
downloadmanaverse-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.gz
manaverse-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.bz2
manaverse-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.xz
manaverse-4de24231be93c6194801c8962d7bf00ed6c339ff.zip
move shared code for reading being info attributes to separate class.
Also fix name offsets for pets.
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r--src/resources/monsterdb.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index f3c81d52d..769678ca6 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -26,6 +26,7 @@
#include "net/net.h"
+#include "resources/beingcommon.h"
#include "resources/beinginfo.h"
#include "utils/dtor.h"
@@ -98,29 +99,10 @@ void MonsterDB::loadXmlFile(const std::string &fileName)
// TRANSLATORS: unknown info name
monsterNode, "name", _("unnamed")));
- currentInfo->setTargetCursorSize(XML::getProperty(monsterNode,
- "targetCursor", "medium"));
-
- currentInfo->setHoverCursor(XML::getProperty(monsterNode,
- "hoverCursor", "attack"));
-
- currentInfo->setTargetOffsetX(XML::getProperty(monsterNode,
- "targetOffsetX", 0));
-
- currentInfo->setTargetOffsetY(XML::getProperty(monsterNode,
- "targetOffsetY", 0));
-
- currentInfo->setNameOffsetX(XML::getProperty(monsterNode,
- "nameOffsetX", 0));
-
- currentInfo->setNameOffsetY(XML::getProperty(monsterNode,
- "nameOffsetY", 0));
+ BeingCommon::readBasicAttributes(currentInfo, monsterNode, "attack");
currentInfo->setMaxHP(XML::getProperty(monsterNode, "maxHP", 0));
- currentInfo->setSortOffsetY(XML::getProperty(
- monsterNode, "sortOffsetY", 0));
-
currentInfo->setDeadSortOffsetY(XML::getProperty(
monsterNode, "deadSortOffsetY", 31));