diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-22 19:16:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-22 19:25:44 +0300 |
commit | 09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df (patch) | |
tree | 4d6667c430fa75dd020a0c55272c4a110cfce841 /src/gui/windows/skilldialog.cpp | |
parent | c10c3b3e5ae49719a6f52873b003ef2643df3e60 (diff) | |
download | mv-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.gz mv-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.bz2 mv-09e8d7ba7a5e29e4991b21056e358a7dcf0dd2df.tar.xz mv-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.cpp | 13 |
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(); +} |