summaryrefslogtreecommitdiff
path: root/src/resources/npcdb.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/npcdb.cpp
parent30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c (diff)
downloadplus-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.gz
plus-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.bz2
plus-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.xz
plus-4de24231be93c6194801c8962d7bf00ed6c339ff.zip
move shared code for reading being info attributes to separate class.
Also fix name offsets for pets.
Diffstat (limited to 'src/resources/npcdb.cpp')
-rw-r--r--src/resources/npcdb.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index 103bbb805..f9d9295d6 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -24,6 +24,7 @@
#include "logger.h"
+#include "resources/beingcommon.h"
#include "resources/beinginfo.h"
#include "utils/dtor.h"
@@ -90,26 +91,7 @@ void NPCDB::loadXmlFile(const std::string &fileName)
currentInfo->setTargetSelection(XML::getBoolProperty(npcNode,
"targetSelection", true));
- currentInfo->setTargetCursorSize(XML::getProperty(npcNode,
- "targetCursor", "medium"));
-
- currentInfo->setHoverCursor(XML::getProperty(npcNode,
- "hoverCursor", "talk"));
-
- currentInfo->setTargetOffsetX(XML::getProperty(npcNode,
- "targetOffsetX", 0));
-
- currentInfo->setTargetOffsetY(XML::getProperty(npcNode,
- "targetOffsetY", 0));
-
- currentInfo->setNameOffsetX(XML::getProperty(npcNode,
- "nameOffsetX", 0));
-
- currentInfo->setNameOffsetY(XML::getProperty(npcNode,
- "nameOffsetY", 0));
-
- currentInfo->setSortOffsetY(XML::getProperty(npcNode,
- "sortOffsetY", 0));
+ BeingCommon::readBasicAttributes(currentInfo, npcNode, "talk");
currentInfo->setDeadSortOffsetY(XML::getProperty(npcNode,
"deadSortOffsetY", 31));