summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/beingcommon.cpp7
-rw-r--r--src/resources/beingcommon.h4
-rw-r--r--src/resources/db/elementaldb.cpp3
-rw-r--r--src/resources/db/homunculusdb.cpp3
-rw-r--r--src/resources/db/mercenarydb.cpp1
-rw-r--r--src/resources/db/monsterdb.cpp4
-rw-r--r--src/resources/db/npcdb.cpp1
-rw-r--r--src/resources/db/petdb.cpp1
-rw-r--r--src/resources/db/skillunitdb.cpp1
9 files changed, 24 insertions, 1 deletions
diff --git a/src/resources/beingcommon.cpp b/src/resources/beingcommon.cpp
index 1daae68d5..6f9c3aa6d 100644
--- a/src/resources/beingcommon.cpp
+++ b/src/resources/beingcommon.cpp
@@ -52,7 +52,12 @@ void BeingCommon::readBasicAttributes(BeingInfo *const info,
info->setQuickActionEffectId(XML::getProperty(node,
"quickActionEffect", -1));
+}
+void BeingCommon::readWalkingAttributes(BeingInfo *const info,
+ XmlNodePtrConst node,
+ const int moreBlockFlags)
+{
unsigned char block = 0;
std::string walkStr = XML::getProperty(
node, "walkType", "walk");
@@ -61,7 +66,7 @@ void BeingCommon::readBasicAttributes(BeingInfo *const info,
BlockMask::WALL |
BlockMask::WATER |
BlockMask::AIR |
- BlockMask::MONSTERWALL;
+ moreBlockFlags;
StringVect tokens;
splitToStringVector(tokens, walkStr, ',');
FOR_EACH (StringVectCIter, it, tokens)
diff --git a/src/resources/beingcommon.h b/src/resources/beingcommon.h
index d9de6b783..159cc4518 100644
--- a/src/resources/beingcommon.h
+++ b/src/resources/beingcommon.h
@@ -53,6 +53,10 @@ namespace BeingCommon
XmlNodePtrConst node,
const std::string &hoverCursor) A_NONNULL(1);
+ void readWalkingAttributes(BeingInfo *const info,
+ XmlNodePtrConst node,
+ const int moreBlockFlags) A_NONNULL(1);
+
void getIncludeFiles(const std::string &dir,
StringVect &list,
const std::string &ext);
diff --git a/src/resources/db/elementaldb.cpp b/src/resources/db/elementaldb.cpp
index ecfbbcef3..6706c0acb 100644
--- a/src/resources/db/elementaldb.cpp
+++ b/src/resources/db/elementaldb.cpp
@@ -95,6 +95,9 @@ void ElementalDb::loadXmlFile(const std::string &fileName,
currentInfo->setBlockType(BlockType::NONE);
BeingCommon::readBasicAttributes(currentInfo,
elementalNode, "attack");
+ BeingCommon::readWalkingAttributes(currentInfo,
+ elementalNode,
+ 0);
currentInfo->setMaxHP(XML::getProperty(elementalNode, "maxHP", 0));
diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp
index c01c4c2bf..4fe6f65ef 100644
--- a/src/resources/db/homunculusdb.cpp
+++ b/src/resources/db/homunculusdb.cpp
@@ -95,6 +95,9 @@ void HomunculusDB::loadXmlFile(const std::string &fileName,
currentInfo->setBlockType(BlockType::NONE);
BeingCommon::readBasicAttributes(currentInfo,
homunculusNode, "attack");
+ BeingCommon::readWalkingAttributes(currentInfo,
+ homunculusNode,
+ 0);
currentInfo->setMaxHP(XML::getProperty(homunculusNode, "maxHP", 0));
diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp
index 7d481403c..8e3d1f913 100644
--- a/src/resources/db/mercenarydb.cpp
+++ b/src/resources/db/mercenarydb.cpp
@@ -96,6 +96,7 @@ void MercenaryDB::loadXmlFile(const std::string &fileName,
currentInfo->setBlockType(BlockType::NONE);
BeingCommon::readBasicAttributes(currentInfo, mercenaryNode, "attack");
+ BeingCommon::readWalkingAttributes(currentInfo, mercenaryNode, 0);
currentInfo->setMaxHP(XML::getProperty(mercenaryNode, "maxHP", 0));
diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp
index f4196ec08..e950072dd 100644
--- a/src/resources/db/monsterdb.cpp
+++ b/src/resources/db/monsterdb.cpp
@@ -22,6 +22,8 @@
#include "resources/db/monsterdb.h"
+#include "enums/resources/map/blockmask.h"
+
#include "resources/beingcommon.h"
#include "resources/beinginfo.h"
@@ -101,6 +103,8 @@ void MonsterDB::loadXmlFile(const std::string &fileName,
monsterNode, "name", _("unnamed")));
BeingCommon::readBasicAttributes(currentInfo, monsterNode, "attack");
+ BeingCommon::readWalkingAttributes(currentInfo, monsterNode,
+ BlockMask::MONSTERWALL);
currentInfo->setMaxHP(XML::getProperty(monsterNode, "maxHP", 0));
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp
index 041306df8..9efcb67a4 100644
--- a/src/resources/db/npcdb.cpp
+++ b/src/resources/db/npcdb.cpp
@@ -104,6 +104,7 @@ void NPCDB::loadXmlFile(const std::string &fileName,
"targetSelection", true));
BeingCommon::readBasicAttributes(currentInfo, npcNode, "talk");
+ BeingCommon::readWalkingAttributes(currentInfo, npcNode, 0);
currentInfo->setDeadSortOffsetY(XML::getProperty(npcNode,
"deadSortOffsetY", 31));
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp
index c89d1bf65..27bd9e89f 100644
--- a/src/resources/db/petdb.cpp
+++ b/src/resources/db/petdb.cpp
@@ -106,6 +106,7 @@ void PETDB::loadXmlFile(const std::string &fileName,
"targetSelection", true));
BeingCommon::readBasicAttributes(currentInfo, petNode, "talk");
+ BeingCommon::readWalkingAttributes(currentInfo, petNode, 0);
currentInfo->setDeadSortOffsetY(XML::getProperty(petNode,
"deadSortOffsetY", 31));
diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp
index 6a742e230..d5657596b 100644
--- a/src/resources/db/skillunitdb.cpp
+++ b/src/resources/db/skillunitdb.cpp
@@ -105,6 +105,7 @@ void SkillUnitDb::loadXmlFile(const std::string &fileName,
"targetSelection", true));
BeingCommon::readBasicAttributes(currentInfo, skillUnitNode, "attack");
+ BeingCommon::readWalkingAttributes(currentInfo, skillUnitNode, 0);
currentInfo->setDeadSortOffsetY(XML::getProperty(skillUnitNode,
"deadSortOffsetY", 31));