summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/beinginfo.cpp2
-rw-r--r--src/resources/beinginfo.h14
-rw-r--r--src/resources/monsterdb.cpp7
-rw-r--r--src/resources/npcdb.cpp6
4 files changed, 28 insertions, 1 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index f54673447..bd45ec9ed 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -49,6 +49,8 @@ BeingInfo::BeingInfo() :
mColors(nullptr),
mTargetOffsetX(0),
mTargetOffsetY(0),
+ mNameOffsetX(0),
+ mNameOffsetY(0),
mMaxHP(0),
mSortOffsetY(0),
mDeadSortOffsetY(31),
diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h
index d94e3db30..c90e3296e 100644
--- a/src/resources/beinginfo.h
+++ b/src/resources/beinginfo.h
@@ -160,6 +160,18 @@ class BeingInfo final
int getTargetOffsetY() const A_WARN_UNUSED
{ return mTargetOffsetY; }
+ void setNameOffsetX(const int n)
+ { mNameOffsetX = n; }
+
+ int getNameOffsetX() const A_WARN_UNUSED
+ { return mNameOffsetX; }
+
+ void setNameOffsetY(const int n)
+ { mNameOffsetY = n; }
+
+ int getNameOffsetY() const A_WARN_UNUSED
+ { return mNameOffsetY; }
+
void setMaxHP(const int n)
{ mMaxHP = n; }
@@ -228,6 +240,8 @@ class BeingInfo final
const std::map <int, ColorDB::ItemColor> *mColors;
int mTargetOffsetX;
int mTargetOffsetY;
+ int mNameOffsetX;
+ int mNameOffsetY;
int mMaxHP;
int mSortOffsetY;
int mDeadSortOffsetY;
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 9e8da1b44..f3c81d52d 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -110,8 +110,13 @@ void MonsterDB::loadXmlFile(const std::string &fileName)
currentInfo->setTargetOffsetY(XML::getProperty(monsterNode,
"targetOffsetY", 0));
- currentInfo->setMaxHP(XML::getProperty(monsterNode, "maxHP", 0));
+ currentInfo->setNameOffsetX(XML::getProperty(monsterNode,
+ "nameOffsetX", 0));
+
+ currentInfo->setNameOffsetY(XML::getProperty(monsterNode,
+ "nameOffsetY", 0));
+ currentInfo->setMaxHP(XML::getProperty(monsterNode, "maxHP", 0));
currentInfo->setSortOffsetY(XML::getProperty(
monsterNode, "sortOffsetY", 0));
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index bafef22c8..103bbb805 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -102,6 +102,12 @@ void NPCDB::loadXmlFile(const std::string &fileName)
currentInfo->setTargetOffsetY(XML::getProperty(npcNode,
"targetOffsetY", 0));
+ currentInfo->setNameOffsetX(XML::getProperty(npcNode,
+ "nameOffsetX", 0));
+
+ currentInfo->setNameOffsetY(XML::getProperty(npcNode,
+ "nameOffsetY", 0));
+
currentInfo->setSortOffsetY(XML::getProperty(npcNode,
"sortOffsetY", 0));