summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-24 02:02:34 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-24 02:02:34 +0300
commitf1b5d66496f2f46f6618481bbeea6f33cf82f698 (patch)
treed64ba38a870a113fdce1a87883f11ad0f3a759bb /src/resources
parent2aa9b09d4dfa139941c5a0e1e72acd11f9f4fca2 (diff)
downloadplus-f1b5d66496f2f46f6618481bbeea6f33cf82f698.tar.gz
plus-f1b5d66496f2f46f6618481bbeea6f33cf82f698.tar.bz2
plus-f1b5d66496f2f46f6618481bbeea6f33cf82f698.tar.xz
plus-f1b5d66496f2f46f6618481bbeea6f33cf82f698.zip
Move custom ai options from petdb into homunculusdb and mercenarydb.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/homunculusdb.cpp40
-rw-r--r--src/resources/db/mercenarydb.cpp40
-rw-r--r--src/resources/db/petdb.cpp43
3 files changed, 80 insertions, 43 deletions
diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp
index 4fe6f65ef..26ac28591 100644
--- a/src/resources/db/homunculusdb.cpp
+++ b/src/resources/db/homunculusdb.cpp
@@ -104,6 +104,46 @@ void HomunculusDB::loadXmlFile(const std::string &fileName,
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", ""));
diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp
index 8e3d1f913..bb582dc92 100644
--- a/src/resources/db/mercenarydb.cpp
+++ b/src/resources/db/mercenarydb.cpp
@@ -103,6 +103,46 @@ void MercenaryDB::loadXmlFile(const std::string &fileName,
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", ""));
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp
index 27bd9e89f..bd6f93ec2 100644
--- a/src/resources/db/petdb.cpp
+++ b/src/resources/db/petdb.cpp
@@ -111,49 +111,6 @@ void PETDB::loadXmlFile(const std::string &fileName,
currentInfo->setDeadSortOffsetY(XML::getProperty(petNode,
"deadSortOffsetY", 31));
- currentInfo->setStartFollowDist(XML::getProperty(petNode,
- "startFollowDistance", 3));
- currentInfo->setFollowDist(XML::getProperty(petNode,
- "followDistance", 0));
- currentInfo->setWarpDist(XML::getProperty(petNode,
- "warpDistance", 11));
-
- currentInfo->setWalkSpeed(XML::getProperty(petNode,
- "walkSpeed", 0));
-
- currentInfo->setTargetOffsetX(XML::getProperty(petNode,
- "offsetX", 0));
- currentInfo->setTargetOffsetY(XML::getProperty(petNode,
- "offsetY", 1));
- currentInfo->setSitOffsetX(XML::getProperty(petNode,
- "sitOffsetX", 0));
- currentInfo->setSitOffsetY(XML::getProperty(petNode,
- "sitOffsetY", 1));
- currentInfo->setMoveOffsetX(XML::getProperty(petNode,
- "moveOffsetX", 0));
- currentInfo->setMoveOffsetY(XML::getProperty(petNode,
- "moveOffsetY", 1));
- currentInfo->setDeadOffsetX(XML::getProperty(petNode,
- "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);
-
- currentInfo->setDirectionType(XML::getProperty(petNode,
- "directionType", 1));
- currentInfo->setSitDirectionType(XML::getProperty(petNode,
- "sitDirectionType", 1));
- currentInfo->setDeadDirectionType(XML::getProperty(petNode,
- "deadDirectionType", 1));
- currentInfo->setAttackDirectionType(XML::getProperty(petNode,
- "attackDirectionType", 4));
-
const std::string returnMessage = XML::langProperty(petNode,
// TRANSLATORS: popup menu item
// TRANSLATORS: pet return to egg