diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-12 15:07:42 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-12 18:22:42 -0700 |
commit | ef3685ef63999b7132fa7b6f8ebc9a3387972e53 (patch) | |
tree | b770f306cf37b25fd2424391b7f225ee0b517134 /src/resources | |
parent | 781b3c9f17708cc5fe08eb3c9ee38d596364d97c (diff) | |
download | mana-ef3685ef63999b7132fa7b6f8ebc9a3387972e53.tar.gz mana-ef3685ef63999b7132fa7b6f8ebc9a3387972e53.tar.bz2 mana-ef3685ef63999b7132fa7b6f8ebc9a3387972e53.tar.xz mana-ef3685ef63999b7132fa7b6f8ebc9a3387972e53.zip |
Add an optional offset property to monsters.xml
And remove the hardcoded offset from eAthena's BeingHandler.
Reviewed-by: Freeyorp
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/monsterdb.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index f574053a..21f15a90 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -54,6 +54,8 @@ void MonsterDB::load() logger->error("Monster Database: Error while loading monster.xml!"); } + int offset = XML::getProperty(rootNode, "offset", 0); + //iterate <monster>s for_each_xml_child_node(monsterNode, rootNode) { @@ -143,7 +145,7 @@ void MonsterDB::load() (const char*) spriteNode->xmlChildrenNode->content); } } - mMonsterInfos[XML::getProperty(monsterNode, "id", 0)] = currentInfo; + mMonsterInfos[XML::getProperty(monsterNode, "id", 0) + offset] = currentInfo; } mLoaded = true; |