summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-22 20:42:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-22 20:42:07 +0300
commitb7c2e8491471af7eaf92f1f93d1cbd394a295ee3 (patch)
tree7443d0134f7334179fd8c0888c3fd5b16c119963 /src/net
parent4873453c6b49c8181cb4ad65393fcf2da4b6e02a (diff)
downloadmanaplus-b7c2e8491471af7eaf92f1f93d1cbd394a295ee3.tar.gz
manaplus-b7c2e8491471af7eaf92f1f93d1cbd394a295ee3.tar.bz2
manaplus-b7c2e8491471af7eaf92f1f93d1cbd394a295ee3.tar.xz
manaplus-b7c2e8491471af7eaf92f1f93d1cbd394a295ee3.zip
Impliment packet SMSG_SKILL_AUTO_CAST.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/beinghandler.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index b7d2a94d8..95800dc0d 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1431,15 +1431,20 @@ void BeingHandler::processMonsterHp(Net::MessageIn &msg)
void BeingHandler::processSkillAutoCast(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readInt16("skill id");
- msg.readInt16("inf");
+ const int id = msg.readInt16("skill id");
+ const int type = msg.readInt16("inf");
msg.readInt16("unused");
- msg.readInt16("skill level");
- msg.readInt16("sp");
- msg.readInt16("range");
+ const int level = msg.readInt16("skill level");
+ const int sp = msg.readInt16("sp");
+ const int range = msg.readInt16("range");
msg.readString(24, "skill name");
msg.readInt8("unused");
+
+ if (localPlayer)
+ {
+ localPlayer->handleSkill(localPlayer, 0, id, level);
+ localPlayer->takeDamage(localPlayer, 0, AttackType::SKILL, id, level);
+ }
}
void BeingHandler::processRanksList(Net::MessageIn &msg)