summaryrefslogtreecommitdiff
path: root/src/gui/windows/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-14 19:25:00 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-14 19:25:00 +0300
commit8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f (patch)
treebda5dc8f66925aed8a1671a9d806a407af7bef3f /src/gui/windows/skilldialog.cpp
parentf3781554bf946a22ac307d1c8fe6154db05bbf2e (diff)
downloadplus-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.gz
plus-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.bz2
plus-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.xz
plus-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.zip
Add skill cast type option in skills window.
Can be changed, but for now unused.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r--src/gui/windows/skilldialog.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 66ffb6378..5df9428ce 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -176,7 +176,7 @@ void SkillDialog::action(const ActionEvent &event)
const SkillInfo *const info = tab->getSelectedInfo();
useSkill(info,
fromBool(config.getBoolValue("skillAutotarget"), AutoTarget),
- info->selectedLevel);
+ info->customSelectedLevel);
}
}
else if (eventId == "close")
@@ -908,8 +908,18 @@ void SkillDialog::selectSkillLevel(const int skillId,
if (!info)
return;
if (level > info->level)
- info->selectedLevel = info->level;
+ info->customSelectedLevel = info->level;
else
- info->selectedLevel = level;
+ info->customSelectedLevel = level;
+ info->update();
+}
+
+void SkillDialog::selectSkillCastType(const int skillId,
+ const CastTypeT type)
+{
+ SkillInfo *const info = getSkill(skillId);
+ if (!info)
+ return;
+ info->customCastType = type;
info->update();
}