diff options
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 65134aac1..bbefbd5a7 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -389,6 +389,24 @@ void SkillDialog::loadXmlFile(const std::string &fileName) } } +void SkillDialog::removeSkill(const int id) +{ + const SkillMap::const_iterator it = mSkills.find(id); + + if (it != mSkills.end()) + { + SkillInfo *const info = it->second; + if (info) + { + info->level = 0; + info->update(); + PlayerInfo::setSkillLevel(id, 0); + if (!info->alwaysVisible) + info->visible = false; + } + } +} + bool SkillDialog::updateSkill(const int id, const int range, const bool modifiable, |