summaryrefslogtreecommitdiff
path: root/src/gui/windows/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-22 19:16:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-22 19:25:44 +0300
commit09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df (patch)
tree4d6667c430fa75dd020a0c55272c4a110cfce841 /src/gui/windows/skilldialog.cpp
parentc10c3b3e5ae49719a6f52873b003ef2643df3e60 (diff)
downloadplus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.gz
plus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.bz2
plus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.xz
plus-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.zip
Add chat command /selectskilllevel for select skill level in skills dialog.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r--src/gui/windows/skilldialog.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index bcc023731..49b89c951 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -831,3 +831,16 @@ void SkillDialog::slowLogic()
}
}
}
+
+void SkillDialog::selectSkillLevel(const int skillId,
+ const int level)
+{
+ SkillInfo *const info = getSkill(skillId);
+ if (!info)
+ return;
+ if (level > info->level)
+ info->selectedLevel = info->level;
+ else
+ info->selectedLevel = level;
+ info->update();
+}