summaryrefslogtreecommitdiff
path: root/src/resources/db/mercenarydb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-24 20:46:41 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-24 20:46:41 +0300
commitb86d61e2e86f93f86c500eb578342af34d75eab1 (patch)
tree05bb3be097bfeda0177cf373acb3a9b44d7563e0 /src/resources/db/mercenarydb.cpp
parentf45bd8e9a3274bcdafff7f5704af275c31638607 (diff)
downloadplus-b86d61e2e86f93f86c500eb578342af34d75eab1.tar.gz
plus-b86d61e2e86f93f86c500eb578342af34d75eab1.tar.bz2
plus-b86d61e2e86f93f86c500eb578342af34d75eab1.tar.xz
plus-b86d61e2e86f93f86c500eb578342af34d75eab1.zip
Move ai attributes reading into BeingCommon.
Diffstat (limited to 'src/resources/db/mercenarydb.cpp')
-rw-r--r--src/resources/db/mercenarydb.cpp41
1 files changed, 1 insertions, 40 deletions
diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp
index bb582dc92..9e7ccf511 100644
--- a/src/resources/db/mercenarydb.cpp
+++ b/src/resources/db/mercenarydb.cpp
@@ -97,52 +97,13 @@ void MercenaryDB::loadXmlFile(const std::string &fileName,
currentInfo->setBlockType(BlockType::NONE);
BeingCommon::readBasicAttributes(currentInfo, mercenaryNode, "attack");
BeingCommon::readWalkingAttributes(currentInfo, mercenaryNode, 0);
+ BeingCommon::readAiAttributes(currentInfo, mercenaryNode);
currentInfo->setMaxHP(XML::getProperty(mercenaryNode, "maxHP", 0));
currentInfo->setDeadSortOffsetY(XML::getProperty(
mercenaryNode, "deadSortOffsetY", 31));
- currentInfo->setStartFollowDist(XML::getProperty(mercenaryNode,
- "startFollowDistance", 3));
- currentInfo->setFollowDist(XML::getProperty(mercenaryNode,
- "followDistance", 0));
- currentInfo->setWarpDist(XML::getProperty(mercenaryNode,
- "warpDistance", 11));
-
- currentInfo->setTargetOffsetX(XML::getProperty(mercenaryNode,
- "offsetX", 0));
- currentInfo->setTargetOffsetY(XML::getProperty(mercenaryNode,
- "offsetY", 1));
- currentInfo->setSitOffsetX(XML::getProperty(mercenaryNode,
- "sitOffsetX", 0));
- currentInfo->setSitOffsetY(XML::getProperty(mercenaryNode,
- "sitOffsetY", 1));
- currentInfo->setMoveOffsetX(XML::getProperty(mercenaryNode,
- "moveOffsetX", 0));
- currentInfo->setMoveOffsetY(XML::getProperty(mercenaryNode,
- "moveOffsetY", 1));
- currentInfo->setDeadOffsetX(XML::getProperty(mercenaryNode,
- "deadOffsetX", 0));
- currentInfo->setDeadOffsetY(XML::getProperty(mercenaryNode,
- "deadOffsetY", 1));
- currentInfo->setAttackOffsetX(XML::getProperty(mercenaryNode,
- "attackOffsetX", currentInfo->getTargetOffsetX()));
- currentInfo->setAttackOffsetY(XML::getProperty(mercenaryNode,
- "attackOffsetY", currentInfo->getTargetOffsetY()));
-
- currentInfo->setThinkTime(XML::getProperty(mercenaryNode,
- "thinkTime", 500) / 10);
-
- currentInfo->setDirectionType(XML::getProperty(mercenaryNode,
- "directionType", 1));
- currentInfo->setSitDirectionType(XML::getProperty(mercenaryNode,
- "sitDirectionType", 1));
- currentInfo->setDeadDirectionType(XML::getProperty(mercenaryNode,
- "deadDirectionType", 1));
- currentInfo->setAttackDirectionType(XML::getProperty(mercenaryNode,
- "attackDirectionType", 4));
-
currentInfo->setColorsList(XML::getProperty(mercenaryNode,
"colors", ""));