From b7c2e8491471af7eaf92f1f93d1cbd394a295ee3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Aug 2015 20:42:07 +0300 Subject: Impliment packet SMSG_SKILL_AUTO_CAST. --- src/net/eathena/beinghandler.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/net') 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) -- cgit v1.2.3-70-g09d2