summaryrefslogtreecommitdiff
path: root/src/resources/db/homunculusdb.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/homunculusdb.cpp
parentf45bd8e9a3274bcdafff7f5704af275c31638607 (diff)
downloadmv-b86d61e2e86f93f86c500eb578342af34d75eab1.tar.gz
mv-b86d61e2e86f93f86c500eb578342af34d75eab1.tar.bz2
mv-b86d61e2e86f93f86c500eb578342af34d75eab1.tar.xz
mv-b86d61e2e86f93f86c500eb578342af34d75eab1.zip
Move ai attributes reading into BeingCommon.
Diffstat (limited to 'src/resources/db/homunculusdb.cpp')
-rw-r--r--src/resources/db/homunculusdb.cpp42
1 files changed, 2 insertions, 40 deletions
diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp
index 26ac28591..38ce44efe 100644
--- a/src/resources/db/homunculusdb.cpp
+++ b/src/resources/db/homunculusdb.cpp
@@ -98,52 +98,14 @@ void HomunculusDB::loadXmlFile(const std::string &fileName,
BeingCommon::readWalkingAttributes(currentInfo,
homunculusNode,
0);
+ BeingCommon::readAiAttributes(currentInfo,
+ homunculusNode);
currentInfo->setMaxHP(XML::getProperty(homunculusNode, "maxHP", 0));
currentInfo->setDeadSortOffsetY(XML::getProperty(
homunculusNode, "deadSortOffsetY", 31));
- currentInfo->setStartFollowDist(XML::getProperty(homunculusNode,
- "startFollowDistance", 3));
- currentInfo->setFollowDist(XML::getProperty(homunculusNode,
- "followDistance", 0));
- currentInfo->setWarpDist(XML::getProperty(homunculusNode,
- "warpDistance", 11));
-
- currentInfo->setTargetOffsetX(XML::getProperty(homunculusNode,
- "offsetX", 0));
- currentInfo->setTargetOffsetY(XML::getProperty(homunculusNode,
- "offsetY", 1));
- currentInfo->setSitOffsetX(XML::getProperty(homunculusNode,
- "sitOffsetX", 0));
- currentInfo->setSitOffsetY(XML::getProperty(homunculusNode,
- "sitOffsetY", 1));
- currentInfo->setMoveOffsetX(XML::getProperty(homunculusNode,
- "moveOffsetX", 0));
- currentInfo->setMoveOffsetY(XML::getProperty(homunculusNode,
- "moveOffsetY", 1));
- currentInfo->setDeadOffsetX(XML::getProperty(homunculusNode,
- "deadOffsetX", 0));
- currentInfo->setDeadOffsetY(XML::getProperty(homunculusNode,
- "deadOffsetY", 1));
- currentInfo->setAttackOffsetX(XML::getProperty(homunculusNode,
- "attackOffsetX", currentInfo->getTargetOffsetX()));
- currentInfo->setAttackOffsetY(XML::getProperty(homunculusNode,
- "attackOffsetY", currentInfo->getTargetOffsetY()));
-
- currentInfo->setThinkTime(XML::getProperty(homunculusNode,
- "thinkTime", 500) / 10);
-
- currentInfo->setDirectionType(XML::getProperty(homunculusNode,
- "directionType", 1));
- currentInfo->setSitDirectionType(XML::getProperty(homunculusNode,
- "sitDirectionType", 1));
- currentInfo->setDeadDirectionType(XML::getProperty(homunculusNode,
- "deadDirectionType", 1));
- currentInfo->setAttackDirectionType(XML::getProperty(homunculusNode,
- "attackDirectionType", 4));
-
currentInfo->setColorsList(XML::getProperty(homunculusNode,
"colors", ""));