summaryrefslogtreecommitdiff
path: root/src/net
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/net
parent731cbd052d5d684686a7edff54f0653c3378f067 (diff)
downloadmv-44db10623278632b890b0e2cea4fe7add7d4cc74.tar.gz
mv-44db10623278632b890b0e2cea4fe7add7d4cc74.tar.bz2
mv-44db10623278632b890b0e2cea4fe7add7d4cc74.tar.xz
mv-44db10623278632b890b0e2cea4fe7add7d4cc74.zip
eathena: impliment packet SMSG_PLAYER_DELETE_SKILL.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/skillhandler.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp
index 374952014..742b3f0f6 100644
--- a/src/net/eathena/skillhandler.cpp
+++ b/src/net/eathena/skillhandler.cpp
@@ -292,9 +292,19 @@ void SkillHandler::processSkillUpdate(Net::MessageIn &msg)
void SkillHandler::processSkillDelete(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- // ignored, because after this packet server will send all skills.
- msg.readInt32("skill id");
+ int updateSkill = 0;
+ const int skillId = msg.readInt16("skill id");
+ const int oldLevel = PlayerInfo::getSkillLevel(skillId);
+ if (oldLevel && oldLevel != 0)
+ updateSkill = skillId;
+ PlayerInfo::setSkillLevel(skillId, 0);
+ if (skillDialog)
+ {
+ skillDialog->removeSkill(skillId);
+ skillDialog->update();
+ if (updateSkill)
+ skillDialog->playUpdateEffect(updateSkill);
+ }
}
void SkillHandler::processSkillCoolDown(Net::MessageIn &msg)