diff options
Diffstat (limited to 'src/resources/db/questdb.cpp')
-rw-r--r-- | src/resources/db/questdb.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp index 9df240f92..93bcada6e 100644 --- a/src/resources/db/questdb.cpp +++ b/src/resources/db/questdb.cpp @@ -241,3 +241,21 @@ std::vector<QuestEffect*> *QuestDb::getAllEffects() { return &mAllEffects; } + +std::string QuestDb::getName(const int id) +{ + std::map<int, std::vector<QuestItem*> >::const_iterator it = + mQuests.find(id); + if (it == mQuests.end()) + { + // TRANSLATORS: quests window quest name + return _("unknown"); + } + const std::vector<QuestItem*> &items = (*it).second; + if (items.empty()) + { + // TRANSLATORS: quests window quest name + return _("unknown"); + } + return items[0]->name; +} |