diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-20 21:09:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-20 21:09:46 +0300 |
commit | 8f24400fc10658db9636e6cdd315504d75c71a5d (patch) | |
tree | f2f5a1094f6c48040b87238612d4042704846e40 /src/resources/db/petdb.cpp | |
parent | 1f2dd660dad937a3c1f2a2dfc07b756965e4ddae (diff) | |
download | mv-8f24400fc10658db9636e6cdd315504d75c71a5d.tar.gz mv-8f24400fc10658db9636e6cdd315504d75c71a5d.tar.bz2 mv-8f24400fc10658db9636e6cdd315504d75c71a5d.tar.xz mv-8f24400fc10658db9636e6cdd315504d75c71a5d.zip |
add attack action for pets.
New pets db attributes:
attackOffsetX
attackOffsetY
attaclDirectionType
Diffstat (limited to 'src/resources/db/petdb.cpp')
-rw-r--r-- | src/resources/db/petdb.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index c9f3bdbeb..7af3c5d09 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -132,6 +132,10 @@ void PETDB::loadXmlFile(const std::string &fileName) "deadOffsetX", 0)); currentInfo->setDeadOffsetY(XML::getProperty(petNode, "deadOffsetY", 1)); + currentInfo->setAttackOffsetX(XML::getProperty(petNode, + "attackOffsetX", currentInfo->getTargetOffsetX())); + currentInfo->setAttackOffsetY(XML::getProperty(petNode, + "attackOffsetY", currentInfo->getTargetOffsetY())); currentInfo->setThinkTime(XML::getProperty(petNode, "thinkTime", 500) / 10); @@ -142,6 +146,8 @@ void PETDB::loadXmlFile(const std::string &fileName) "sitDirectionType", 1)); currentInfo->setDeadDirectionType(XML::getProperty(petNode, "deadDirectionType", 1)); + currentInfo->setAttackDirectionType(XML::getProperty(petNode, + "attackDirectionType", 4)); SpriteDisplay display; for_each_xml_child_node(spriteNode, petNode) |