summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-08 23:14:24 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-08 23:14:24 +0300
commit86cb4a51351b8217ede6672703a1b39b91ddb572 (patch)
tree44b153d699f406f58ebd1f9b100e3bfb23e16b02 /src/utils
parent70fc4db1b5570beceda662e9f34ec1729610512e (diff)
downloadmv-86cb4a51351b8217ede6672703a1b39b91ddb572.tar.gz
mv-86cb4a51351b8217ede6672703a1b39b91ddb572.tar.bz2
mv-86cb4a51351b8217ede6672703a1b39b91ddb572.tar.xz
mv-86cb4a51351b8217ede6672703a1b39b91ddb572.zip
Add support for quest links in browserbox.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/browserboxtools.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils/browserboxtools.cpp b/src/utils/browserboxtools.cpp
index e049e220d..8a1fb42bb 100644
--- a/src/utils/browserboxtools.cpp
+++ b/src/utils/browserboxtools.cpp
@@ -38,6 +38,7 @@
#include "resources/db/itemdb.h"
#include "resources/db/mercenarydb.h"
#include "resources/db/monsterdb.h"
+#include "resources/db/questdb.h"
#include "resources/db/petdb.h"
#endif // DYECMD
@@ -99,13 +100,18 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link)
data = info->getName();
}
else if (!link.empty() && link[0] == 'M')
- { // homunculus link
+ { // mercenary link
const BeingTypeId id = static_cast<BeingTypeId>(
atoi(link.substr(1).c_str()));
BeingInfo *info = MercenaryDB::get(id);
if (info)
data = info->getName();
}
+ else if (!link.empty() && link[0] == 'q')
+ { // quest link
+ data = QuestDb::getName(
+ atoi(link.substr(1).c_str()));
+ }
else
{ // item link
size_t idx = link.find(',');