summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/badgesdb.cpp10
-rw-r--r--src/resources/db/badgesdb.h2
2 files changed, 12 insertions, 0 deletions
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;
+}
diff --git a/src/resources/db/badgesdb.h b/src/resources/db/badgesdb.h
index 7c971e00f..5e53660b9 100644
--- a/src/resources/db/badgesdb.h
+++ b/src/resources/db/badgesdb.h
@@ -35,6 +35,8 @@ namespace BadgesDB
void unload();
+ const std::string getGuildBadge(const std::string &name);
+
const std::string getPartyBadge(const std::string &name);
} // namespace BadgesDB