summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-04 01:09:39 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-04 01:11:34 +0300
commit310e966a513f456538d8fd1bb02e5878ce24bc2d (patch)
tree2673cd202f6de11cbd003e73cf4374ed43274517 /src/gui
parentccec760783c589bf7be58be75522ad985fd98210 (diff)
downloadplus-310e966a513f456538d8fd1bb02e5878ce24bc2d.tar.gz
plus-310e966a513f456538d8fd1bb02e5878ce24bc2d.tar.bz2
plus-310e966a513f456538d8fd1bb02e5878ce24bc2d.tar.xz
plus-310e966a513f456538d8fd1bb02e5878ce24bc2d.zip
Add new tags for quests questgiver, npc.
Also improver existing tag reward.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/questswindow.cpp42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index e117a8e00..5bdf85b36 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -234,11 +234,30 @@ void QuestsWindow::loadQuest(const int var, const XmlNodePtr node)
replaceItemLinks(str);
if (xmlNameEqual(dataNode, "text"))
+ {
quest->texts.push_back(QuestItemText(str, QuestType::TEXT));
+ }
else if (xmlNameEqual(dataNode, "name"))
+ {
quest->texts.push_back(QuestItemText(str, QuestType::NAME));
+ }
else if (xmlNameEqual(dataNode, "reward"))
+ {
quest->texts.push_back(QuestItemText(str, QuestType::REWARD));
+ }
+ else if (xmlNameEqual(dataNode, "questgiver") ||
+ xmlNameEqual(dataNode, "giver"))
+ {
+ quest->texts.push_back(QuestItemText(str, QuestType::GIVER));
+ }
+ else if (xmlNameEqual(dataNode, "coordinates"))
+ {
+ quest->texts.push_back(QuestItemText(str, QuestType::COORDINATES));
+ }
+ else if (xmlNameEqual(dataNode, "npc"))
+ {
+ quest->texts.push_back(QuestItemText(str, QuestType::NPC));
+ }
}
mQuests[var].push_back(quest);
}
@@ -409,14 +428,35 @@ void QuestsWindow::showQuest(const QuestItem *const quest)
const QuestItemText &data = *it;
switch (data.type)
{
+ case QuestType::COORDINATES:
case QuestType::TEXT:
- case QuestType::REWARD:
default:
mText->addRow(data.text);
break;
case QuestType::NAME:
mText->addRow(std::string("[").append(data.text).append("]"));
break;
+ case QuestType::REWARD:
+ mText->addRow(std::string(
+ // TRANSLATORS: quest reward
+ _("Reward:")).append(
+ " ").append(
+ data.text));
+ break;
+ case QuestType::GIVER:
+ mText->addRow(std::string(
+ // TRANSLATORS: quest giver name
+ _("Quest Giver:")).append(
+ " ").append(
+ data.text));
+ break;
+ case QuestType::NPC:
+ mText->addRow(std::string(
+ // TRANSLATORS: npc name
+ _("Npc:")).append(
+ " ").append(
+ data.text));
+ break;
}
}
}