summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-25 15:54:55 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-25 15:54:55 +0300
commit44db10623278632b890b0e2cea4fe7add7d4cc74 (patch)
treee4166d8d595aeb4baf3bde1f201bebf42287a4be /src/gui
parent731cbd052d5d684686a7edff54f0653c3378f067 (diff)
downloadplus-44db10623278632b890b0e2cea4fe7add7d4cc74.tar.gz
plus-44db10623278632b890b0e2cea4fe7add7d4cc74.tar.bz2
plus-44db10623278632b890b0e2cea4fe7add7d4cc74.tar.xz
plus-44db10623278632b890b0e2cea4fe7add7d4cc74.zip
eathena: impliment packet SMSG_PLAYER_DELETE_SKILL.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/skilldialog.cpp18
-rw-r--r--src/gui/windows/skilldialog.h2
2 files changed, 20 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,
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 6c3ab71a3..2628a3d80 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -118,6 +118,8 @@ class SkillDialog final : public Window,
void slowLogic();
+ void removeSkill(const int id);
+
static void useSkill(const SkillInfo *const info);
private: