summaryrefslogtreecommitdiff
path: root/src/resources/db/badgesdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-30 14:40:15 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-30 14:40:15 +0300
commitfadafe160a52f47d9eeca88517562964a85499c2 (patch)
tree57dd234149a5100ba1adde53ebe2794d267790e1 /src/resources/db/badgesdb.cpp
parent4eeb20aae588b9c3d1c4ed4462306391e20e58fc (diff)
downloadmv-fadafe160a52f47d9eeca88517562964a85499c2.tar.gz
mv-fadafe160a52f47d9eeca88517562964a85499c2.tar.bz2
mv-fadafe160a52f47d9eeca88517562964a85499c2.tar.xz
mv-fadafe160a52f47d9eeca88517562964a85499c2.zip
Add badges for player names.
Diffstat (limited to 'src/resources/db/badgesdb.cpp')
-rw-r--r--src/resources/db/badgesdb.cpp12
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);