From 44db10623278632b890b0e2cea4fe7add7d4cc74 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Mar 2015 15:54:55 +0300 Subject: eathena: impliment packet SMSG_PLAYER_DELETE_SKILL. --- src/gui/windows/skilldialog.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/gui/windows/skilldialog.cpp') 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, -- cgit v1.2.3-70-g09d2