summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/skilldialog.cpp25
-rw-r--r--src/gui/windows/skilldialog.h2
-rw-r--r--src/net/eathena/skillrecv.cpp1
3 files changed, 28 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 8ded2a001..e60465367 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -302,6 +302,31 @@ void SkillDialog::updateModels()
}
}
+void SkillDialog::updateModelsHidden()
+{
+ std::set<SkillModel*> models;
+
+ FOR_EACH (SkillMap::const_iterator, it, mSkills)
+ {
+ SkillInfo *const info = (*it).second;
+ if (info != nullptr)
+ {
+ if (info->visible == Visible_false)
+ {
+ SkillModel *const model = info->model;
+ if (model != nullptr)
+ models.insert(model);
+ }
+ }
+ }
+ FOR_EACH (std::set<SkillModel*>::iterator, it, models)
+ {
+ SkillModel *const model = *it;
+ if (model != nullptr)
+ model->updateVisibilities();
+ }
+}
+
void SkillDialog::clearSkills()
{
mTabs->removeAll(true);
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index e5921f82c..41c6b0108 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -81,6 +81,8 @@ class SkillDialog final : public Window,
void updateModels();
+ void updateModelsHidden();
+
void loadXmlFile(const std::string &fileName,
const SkipError skipError);
diff --git a/src/net/eathena/skillrecv.cpp b/src/net/eathena/skillrecv.cpp
index 9fcc41589..2d7bb04a9 100644
--- a/src/net/eathena/skillrecv.cpp
+++ b/src/net/eathena/skillrecv.cpp
@@ -101,6 +101,7 @@ void SkillRecv::processPlayerSkills(Net::MessageIn &msg)
if (skillDialog != nullptr)
{
skillDialog->update();
+ skillDialog->updateModelsHidden();
if (updateSkill != 0)
skillDialog->playUpdateEffect(updateSkill);
}