From 21029a5465e42e3820175e474c6860b6349d7c5c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Oct 2014 00:08:10 +0300 Subject: eathena: add partial support for packet SMSG_BEING_SOUND_EFFECT 0x01d3. --- src/net/eathena/beinghandler.cpp | 14 ++++++++++++++ src/net/eathena/beinghandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 3 files changed, 17 insertions(+) diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 3e048d1a4..19200832a 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -75,6 +75,7 @@ BeingHandler::BeingHandler(const bool enableSync) : SMSG_BEING_ACTION2, SMSG_BEING_SELFEFFECT, SMSG_BEING_SPECIAL_EFFECT, + SMSG_BEING_SOUND_EFFECT, SMSG_BEING_EMOTION, SMSG_BEING_CHANGE_LOOKS, SMSG_BEING_CHANGE_LOOKS2, @@ -179,6 +180,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) processBeingSpecialEffect(msg); break; + case SMSG_BEING_SOUND_EFFECT: + processBeingSoundEffect(msg); + break; + case SMSG_BEING_EMOTION: processBeingEmotion(msg); break; @@ -1711,6 +1716,15 @@ void BeingHandler::processBeingSpecialEffect(Net::MessageIn &msg) const msg.readInt32("effect type"); } +void BeingHandler::processBeingSoundEffect(Net::MessageIn &msg) const +{ + // +++ need play this effect. + msg.readString(24, "sound effect name"); + msg.readUInt8("type"); + msg.readInt32("unused"); + msg.readInt32("source being id"); +} + void BeingHandler::setServerGender(Being *const being, const uint8_t gender) { switch (gender) diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 065614ecf..881b426d7 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -96,6 +96,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processBeingSpecialEffect(Net::MessageIn &msg) const; + void processBeingSoundEffect(Net::MessageIn &msg) const; + static void setServerGender(Being *const being, const uint8_t gender); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 65bc4c2f5..f9a4f0112 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -110,6 +110,7 @@ #define SMSG_BEING_CHANGE_LOOKS2 0x01d7 #define SMSG_BEING_SELFEFFECT 0x019b #define SMSG_BEING_SPECIAL_EFFECT 0x01f3 +#define SMSG_BEING_SOUND_EFFECT 0x01d3 #define SMSG_BEING_EMOTION 0x00c0 #define SMSG_BEING_ACTION 0x008a /**< Attack, sit, stand up, ... */ #define SMSG_BEING_ACTION2 0x02e1 -- cgit v1.2.3-70-g09d2