From cd2a71bfc4d3339dd6cf18b5a311e57d58fb548c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Jul 2015 03:23:59 +0300 Subject: Add support for guild badges. --- src/resources/db/badgesdb.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/resources/db/badgesdb.cpp') diff --git a/src/resources/db/badgesdb.cpp b/src/resources/db/badgesdb.cpp index 80b480ee0..cdf61b406 100644 --- a/src/resources/db/badgesdb.cpp +++ b/src/resources/db/badgesdb.cpp @@ -26,6 +26,7 @@ namespace { + BadgesInfos mGuilds; BadgesInfos mParties; bool mLoaded = false; } @@ -46,6 +47,7 @@ void BadgesDB::load() if (mLoaded) unload(); + loadDB("guild", mGuilds); loadDB("party", mParties); } @@ -62,3 +64,11 @@ const std::string BadgesDB::getPartyBadge(const std::string &name) return std::string(); return (*it).second; } + +const std::string BadgesDB::getGuildBadge(const std::string &name) +{ + BadgesInfosIter it = mGuilds.find(name); + if (it == mGuilds.end()) + return std::string(); + return (*it).second; +} -- cgit v1.2.3-70-g09d2