diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-14 19:25:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-14 19:25:00 +0300 |
commit | 8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f (patch) | |
tree | bda5dc8f66925aed8a1671a9d806a407af7bef3f /src/gui/windows/skilldialog.cpp | |
parent | f3781554bf946a22ac307d1c8fe6154db05bbf2e (diff) | |
download | mv-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.gz mv-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.bz2 mv-8ea20d3e1f61bcfeccf6885e11cacddeb014fe0f.tar.xz mv-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.cpp | 16 |
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(); } |