diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-13 05:24:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-02-13 05:24:46 +0300 |
commit | 869cb1c660310140f02a0b3804e02a2f3c4a0326 (patch) | |
tree | 2f0df222ebf1292d17aba1f8b0fe66866a18b330 /src/resources/db/badgesdb.cpp | |
parent | 3a4d8f947b0358c636f983b4248777e8371678dd (diff) | |
download | manaplus-869cb1c660310140f02a0b3804e02a2f3c4a0326.tar.gz manaplus-869cb1c660310140f02a0b3804e02a2f3c4a0326.tar.bz2 manaplus-869cb1c660310140f02a0b3804e02a2f3c4a0326.tar.xz manaplus-869cb1c660310140f02a0b3804e02a2f3c4a0326.zip |
Add support for show clan badge.
But for now clan unset for players.
Diffstat (limited to 'src/resources/db/badgesdb.cpp')
-rw-r--r-- | src/resources/db/badgesdb.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/db/badgesdb.cpp b/src/resources/db/badgesdb.cpp index aff03fc4f..4a9ded0d8 100644 --- a/src/resources/db/badgesdb.cpp +++ b/src/resources/db/badgesdb.cpp @@ -35,6 +35,7 @@ namespace BadgesInfos mGuilds; BadgesInfos mNames; BadgesInfos mParties; + BadgesInfos mClans; bool mLoaded = false; } // namespace @@ -78,12 +79,14 @@ void BadgesDB::load() loadDB("guild", mGuilds); loadDB("name", mNames); loadDB("party", mParties); + loadDB("clan", mClans); } void BadgesDB::unload() { logger->log1("Unloading Badges database..."); mParties.clear(); + mClans.clear(); mGuilds.clear(); mNames.clear(); mLoaded = false; @@ -112,3 +115,11 @@ const std::string BadgesDB::getGuildBadge(const std::string &name) return std::string(); return (*it).second; } + +const std::string BadgesDB::getClanBadge(const std::string &name) +{ + const BadgesInfosIter it = mClans.find(name); + if (it == mClans.end()) + return std::string(); + return (*it).second; +} |