diff options
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 16 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.h | 5 |
2 files changed, 18 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(); } diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h index f12f9621b..b93fda1b9 100644 --- a/src/gui/windows/skilldialog.h +++ b/src/gui/windows/skilldialog.h @@ -31,6 +31,8 @@ #include "enums/resources/skillowner.h" #include "enums/resources/skilltype.h" +#include "enums/resources/skill/casttype.h" + #include "listeners/actionlistener.h" #include "utils/xml.h" @@ -158,6 +160,9 @@ class SkillDialog final : public Window, void selectSkillLevel(const int skillId, const int level); + void selectSkillCastType(const int skillId, + const CastTypeT type); + private: void addSkillDuration(SkillInfo *const skill); |