diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-18 19:20:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-18 19:20:57 +0300 |
commit | 4de24231be93c6194801c8962d7bf00ed6c339ff (patch) | |
tree | 59e622c6e59a71a976d558f16d454ddce2af85e5 /src/resources/petdb.cpp | |
parent | 30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c (diff) | |
download | manaplus-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.gz manaplus-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.bz2 manaplus-4de24231be93c6194801c8962d7bf00ed6c339ff.tar.xz manaplus-4de24231be93c6194801c8962d7bf00ed6c339ff.zip |
move shared code for reading being info attributes to separate class.
Also fix name offsets for pets.
Diffstat (limited to 'src/resources/petdb.cpp')
-rw-r--r-- | src/resources/petdb.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/resources/petdb.cpp b/src/resources/petdb.cpp index 806e20e72..a85480e7b 100644 --- a/src/resources/petdb.cpp +++ b/src/resources/petdb.cpp @@ -24,6 +24,7 @@ #include "logger.h" +#include "resources/beingcommon.h" #include "resources/beinginfo.h" #include "utils/dtor.h" @@ -76,20 +77,7 @@ void PETDB::load() currentInfo->setTargetSelection(XML::getBoolProperty(petNode, "targetSelection", false)); - currentInfo->setTargetCursorSize(XML::getProperty(petNode, - "targetCursor", "medium")); - - currentInfo->setHoverCursor(XML::getProperty(petNode, - "hoverCursor", "talk")); - - currentInfo->setTargetOffsetX(XML::getProperty(petNode, - "targetOffsetX", 0)); - - currentInfo->setTargetOffsetY(XML::getProperty(petNode, - "targetOffsetY", 0)); - - currentInfo->setSortOffsetY(XML::getProperty(petNode, - "sortOffsetY", 0)); + BeingCommon::readBasicAttributes(currentInfo, petNode, "talk"); currentInfo->setDeadSortOffsetY(XML::getProperty(petNode, "deadSortOffsetY", 31)); |