diff options
Diffstat (limited to 'src/resources/db/badgesdb.cpp')
-rw-r--r-- | src/resources/db/badgesdb.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/resources/db/badgesdb.cpp b/src/resources/db/badgesdb.cpp index cdf61b406..d7476c7f0 100644 --- a/src/resources/db/badgesdb.cpp +++ b/src/resources/db/badgesdb.cpp @@ -27,6 +27,7 @@ namespace { BadgesInfos mGuilds; + BadgesInfos mNames; BadgesInfos mParties; bool mLoaded = false; } @@ -48,12 +49,15 @@ void BadgesDB::load() unload(); loadDB("guild", mGuilds); + loadDB("name", mNames); loadDB("party", mParties); } void BadgesDB::unload() { mParties.clear(); + mGuilds.clear(); + mNames.clear(); mLoaded = false; } @@ -65,6 +69,14 @@ const std::string BadgesDB::getPartyBadge(const std::string &name) return (*it).second; } +const std::string BadgesDB::getNameBadge(const std::string &name) +{ + BadgesInfosIter it = mNames.find(name); + if (it == mNames.end()) + return std::string(); + return (*it).second; +} + const std::string BadgesDB::getGuildBadge(const std::string &name) { BadgesInfosIter it = mGuilds.find(name); |