diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-18 12:35:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-18 12:35:51 +0300 |
commit | 30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c (patch) | |
tree | 7d3b15f4e42b22e329c632d61e11a16ff0932b58 /src/resources/monsterdb.cpp | |
parent | 923bd5817bad530de2652529eaf7f5366188034c (diff) | |
download | plus-30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c.tar.gz plus-30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c.tar.bz2 plus-30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c.tar.xz plus-30a2658b93cebebeddf9aa9e7d9d37cc4fc80d3c.zip |
add name offsets for npc and monster names.
New attributes: nameOffsetX, nameOffsetY
Example for monsters.xml:
<monster id="0" name="Piou" targetCursor="small" walkType="fly" nameOffsetX="10">
Example for npcs.xml:
<npc id="304" nameOffsetX="-10" nameOffsetY="-5">
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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)); |