diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-23 20:15:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-23 20:15:42 +0300 |
commit | 06ffa695ca77de549520fa03c500c7d88f21c0c4 (patch) | |
tree | 0a7f3e1ba617393655295e7b50e6aa19eb967ded /src/gui/windows/skilldialog.cpp | |
parent | 0cb2889cdef920918d3697fad42f83e83602d630 (diff) | |
download | mv-06ffa695ca77de549520fa03c500c7d88f21c0c4.tar.gz mv-06ffa695ca77de549520fa03c500c7d88f21c0c4.tar.bz2 mv-06ffa695ca77de549520fa03c500c7d88f21c0c4.tar.xz mv-06ffa695ca77de549520fa03c500c7d88f21c0c4.zip |
Add field errorText into skills.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index d08ee4d1a..1fb07e37d 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -306,6 +306,10 @@ void SkillDialog::loadXmlFile(const std::string &fileName) id += SKILL_VAR_MIN_ID; } + std::string name = XML::langProperty(node, "name", + // TRANSLATORS: skills dialog. skill id + strprintf(_("Skill %d"), id)); + SkillInfo *skill = getSkill(id); if (!skill) { @@ -319,13 +323,12 @@ void SkillDialog::loadXmlFile(const std::string &fileName) node, "useButton", _("Use")); skill->owner = parseOwner(XML::getProperty( node, "owner", "player")); + skill->errorText = XML::getProperty( + node, "errorText", name); model->addSkill(skill); mSkills[id] = skill; } - std::string name = XML::langProperty(node, "name", - // TRANSLATORS: skills dialog. skill id - strprintf(_("Skill %d"), id)); std::string icon = XML::getProperty(node, "icon", ""); const int level = XML::getProperty(node, "level", 0); SkillData *data = skill->getData(level); @@ -445,6 +448,7 @@ void SkillDialog::addSkill(const SkillOwner::Type owner, skill->sp = sp; skill->update(); skill->useButton = _("Use"); + skill->errorText = name; mDefaultModel->addSkill(skill); mSkills[id] = skill; |