summaryrefslogtreecommitdiff
path: root/src/gui/windows/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-06 13:29:42 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 13:29:42 +0300
commit83a6463a88b4b5eda003f55b419995c13476d917 (patch)
tree94df4a85319146e17ebe89ce82c6c3a0e1d9b138 /src/gui/windows/skilldialog.cpp
parent8a23a928d99d79b0d48961a225c3656ca42f34f0 (diff)
downloadmv-83a6463a88b4b5eda003f55b419995c13476d917.tar.gz
mv-83a6463a88b4b5eda003f55b419995c13476d917.tar.bz2
mv-83a6463a88b4b5eda003f55b419995c13476d917.tar.xz
mv-83a6463a88b4b5eda003f55b419995c13476d917.zip
In skills add support for reading mana cost from server.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r--src/gui/windows/skilldialog.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 35f33f63d..842292e2e 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -346,7 +346,8 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
bool SkillDialog::updateSkill(const int id,
const int range,
const bool modifiable,
- const SkillType::SkillType type)
+ const SkillType::SkillType type,
+ const int sp)
{
const SkillMap::const_iterator it = mSkills.find(id);
@@ -358,6 +359,7 @@ bool SkillDialog::updateSkill(const int id,
info->modifiable = modifiable;
info->range = range;
info->type = type;
+ info->sp = sp;
info->update();
}
return true;
@@ -370,7 +372,8 @@ void SkillDialog::addSkill(const int id,
const int level,
const int range,
const bool modifiable,
- const SkillType::SkillType type)
+ const SkillType::SkillType type,
+ const int sp)
{
if (mDefaultModel)
{
@@ -398,6 +401,7 @@ void SkillDialog::addSkill(const int id,
// TRANSLATORS: skills dialog. skill level
skill->skillLevel = strprintf(_("Lvl: %d"), level);
skill->range = range;
+ skill->sp = sp;
skill->update();
skill->useButton = _("Use");
mDefaultModel->addSkill(skill);