summaryrefslogtreecommitdiff
path: root/src/resources/db/monsterdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 16:19:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 16:19:21 +0300
commit7bdb50605562e47f1d6ae134881c09bd42293be5 (patch)
tree935228722e4eb48f5856abec53be1ec985a0b9d6 /src/resources/db/monsterdb.cpp
parent0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (diff)
downloadmanaverse-7bdb50605562e47f1d6ae134881c09bd42293be5.tar.gz
manaverse-7bdb50605562e47f1d6ae134881c09bd42293be5.tar.bz2
manaverse-7bdb50605562e47f1d6ae134881c09bd42293be5.tar.xz
manaverse-7bdb50605562e47f1d6ae134881c09bd42293be5.zip
Add strong typed int type BeingTypeId.
Diffstat (limited to 'src/resources/db/monsterdb.cpp')
-rw-r--r--src/resources/db/monsterdb.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp
index de72f487f..2e2256b58 100644
--- a/src/resources/db/monsterdb.cpp
+++ b/src/resources/db/monsterdb.cpp
@@ -88,11 +88,11 @@ void MonsterDB::loadXmlFile(const std::string &fileName)
const int id = XML::getProperty(monsterNode, "id", 0);
BeingInfo *currentInfo = nullptr;
- if (mMonsterInfos.find(fromInt(id + offset, BeingId))
+ if (mMonsterInfos.find(fromInt(id + offset, BeingTypeId))
!= mMonsterInfos.end())
{
logger->log("MonsterDB: Redefinition of monster ID %d", id);
- currentInfo = mMonsterInfos[fromInt(id + offset, BeingId)];
+ currentInfo = mMonsterInfos[fromInt(id + offset, BeingTypeId)];
}
if (!currentInfo)
currentInfo = new BeingInfo;
@@ -140,7 +140,7 @@ void MonsterDB::loadXmlFile(const std::string &fileName)
}
currentInfo->setDisplay(display);
- mMonsterInfos[fromInt(id + offset, BeingId)] = currentInfo;
+ mMonsterInfos[fromInt(id + offset, BeingTypeId)] = currentInfo;
}
}
@@ -153,14 +153,14 @@ void MonsterDB::unload()
}
-BeingInfo *MonsterDB::get(const BeingId id)
+BeingInfo *MonsterDB::get(const BeingTypeId id)
{
BeingInfoIterator i = mMonsterInfos.find(id);
if (i == mMonsterInfos.end())
{
i = mMonsterInfos.find(fromInt(toInt(
- id, int) + OLD_TMWATHENA_OFFSET, BeingId));
+ id, int) + OLD_TMWATHENA_OFFSET, BeingTypeId));
if (i == mMonsterInfos.end())
{
logger->log("MonsterDB: Warning, unknown monster ID %d requested",