summaryrefslogtreecommitdiff
path: root/src/gui/windows
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
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')
-rw-r--r--src/gui/windows/skilldialog.cpp16
-rw-r--r--src/gui/windows/skilldialog.h5
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);