From f73a170389adb02566e54368c6fe8b5bee0e57d9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Mar 2015 15:51:56 +0300 Subject: eathena: add partial support for packet SMSG_PLAYER_SKILL_AUTO_SPELLS 0x01cd. --- src/net/eathena/protocol.h | 1 + src/net/eathena/skillhandler.cpp | 16 ++++++++++++++++ src/net/eathena/skillhandler.h | 2 ++ 3 files changed, 19 insertions(+) (limited to 'src') diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index a1349c68a..08a6f1ea5 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -101,6 +101,7 @@ #define SMSG_PLAYER_NOTIFY_MAPINFO 0x0189 #define SMSG_PLAYER_SKILL_PRODUCE_MIX_LIST 0x018d #define SMSG_PLAYER_SKILL_PRODUCE_EFFECT 0x018f +#define SMSG_PLAYER_SKILL_AUTO_SPELLS 0x01cd #define SMSG_SKILL_FAILED 0x0110 #define SMSG_SKILL_DAMAGE 0x01de #define SMSG_SKILL_AUTO_CAST 0x0147 diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index d92fd697d..309a66c70 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -31,6 +31,7 @@ #include "gui/windows/skilldialog.h" +#include "net/eathena/menu.h" #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -67,6 +68,7 @@ SkillHandler::SkillHandler() : SMSG_PLAYER_SKILL_PRODUCE_EFFECT, SMSG_SKILL_UNIT_UPDATE, SMSG_SKILL_ARROW_CREATE_LIST, + SMSG_PLAYER_SKILL_AUTO_SPELLS, 0 }; handledMessages = _messages; @@ -137,6 +139,10 @@ void SkillHandler::handleMessage(Net::MessageIn &msg) processSkillArrowCreateList(msg); break; + case SMSG_PLAYER_SKILL_AUTO_SPELLS: + processSkillAutoSpells(msg); + break; + default: break; } @@ -455,4 +461,14 @@ void SkillHandler::processSkillArrowCreateList(Net::MessageIn &msg) msg.readInt16("item id"); } +void SkillHandler::processSkillAutoSpells(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + for (int f = 0; f < 7; f ++) + msg.readInt32("skill id"); + + menu = MenuType::AutoSpell;; +} + } // namespace EAthena diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h index 42fd65021..5a210b989 100644 --- a/src/net/eathena/skillhandler.h +++ b/src/net/eathena/skillhandler.h @@ -79,6 +79,8 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler static void processSkillUnitUpdate(Net::MessageIn &msg); static void processSkillArrowCreateList(Net::MessageIn &msg); + + static void processSkillAutoSpells(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-60-g2f50