From 20f5a9d3754bd598f091ae7e66fa0294800f9b30 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Aug 2017 23:39:12 +0300 Subject: Add skill option for allow/prevent adding skill to auto skills shortcuts tab. --- src/gui/windows/skilldialog.cpp | 5 ++++- src/resources/skill/skilldata.cpp | 4 +++- src/resources/skill/skilldata.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 2305cd58b..737fdfdf3 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -253,7 +253,8 @@ void SkillDialog::update() if (info->modifiable == Modifiable_true) info->update(); if (info->visible == Visible_false || - idx >= SHORTCUT_ITEMS) + idx >= SHORTCUT_ITEMS || + !info->data->autoTab) { continue; } @@ -598,6 +599,8 @@ void SkillDialog::loadSkillData(XmlNodeConstPtr node, node, "dstEffectId", -1); data->castingGroundEffectId = XML::getProperty( node, "castingGroundEffectId", -1); + data->autoTab = XML::getBoolProperty( + node, "autoTab", true); skill->addData(level, data); } diff --git a/src/resources/skill/skilldata.cpp b/src/resources/skill/skilldata.cpp index d16aefd8b..fb97a6aef 100644 --- a/src/resources/skill/skilldata.cpp +++ b/src/resources/skill/skilldata.cpp @@ -52,7 +52,9 @@ SkillData::SkillData() : castingDstEffectId(-1), castingGroundEffectId(-1), srcEffectId(-1), - dstEffectId(-1) + dstEffectId(-1), + haveIcon(false), + autoTab(true) { } diff --git a/src/resources/skill/skilldata.h b/src/resources/skill/skilldata.h index bb52b31cd..c4cc1124a 100644 --- a/src/resources/skill/skilldata.h +++ b/src/resources/skill/skilldata.h @@ -54,6 +54,7 @@ struct SkillData final int srcEffectId; int dstEffectId; bool haveIcon; + bool autoTab; SkillData(); A_DELETE_COPY(SkillData) -- cgit v1.2.3-60-g2f50