diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 16:19:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 16:19:21 +0300 |
commit | 7bdb50605562e47f1d6ae134881c09bd42293be5 (patch) | |
tree | 935228722e4eb48f5856abec53be1ec985a0b9d6 /src/resources/db/mercenarydb.cpp | |
parent | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (diff) | |
download | ManaVerse-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/mercenarydb.cpp')
-rw-r--r-- | src/resources/db/mercenarydb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp index 13dfbbd45..a6950e9fb 100644 --- a/src/resources/db/mercenarydb.cpp +++ b/src/resources/db/mercenarydb.cpp @@ -85,11 +85,11 @@ void MercenaryDB::loadXmlFile(const std::string &fileName) const int id = XML::getProperty(mercenaryNode, "id", 0); BeingInfo *currentInfo = nullptr; - if (mMercenaryInfos.find(fromInt(id + offset, BeingId)) + if (mMercenaryInfos.find(fromInt(id + offset, BeingTypeId)) != mMercenaryInfos.end()) { logger->log("MercenaryDB: Redefinition of mercenary ID %d", id); - currentInfo = mMercenaryInfos[fromInt(id + offset, BeingId)]; + currentInfo = mMercenaryInfos[fromInt(id + offset, BeingTypeId)]; } if (!currentInfo) currentInfo = new BeingInfo; @@ -133,7 +133,7 @@ void MercenaryDB::loadXmlFile(const std::string &fileName) } currentInfo->setDisplay(display); - mMercenaryInfos[fromInt(id + offset, BeingId)] = currentInfo; + mMercenaryInfos[fromInt(id + offset, BeingTypeId)] = currentInfo; } } @@ -146,7 +146,7 @@ void MercenaryDB::unload() } -BeingInfo *MercenaryDB::get(const BeingId id) +BeingInfo *MercenaryDB::get(const BeingTypeId id) { BeingInfoIterator i = mMercenaryInfos.find(id); |