From f9e7d52ac06bd1047d240f1718ac627e1d70fc6a Mon Sep 17 00:00:00 2001 From: Henrique Date: Fri, 19 Aug 2011 13:25:39 -0300 Subject: [PATCH] protocol speak fix --- src/otclient/net/declarations.h | 34 +++++++++++--------------- src/otclient/net/protocolgameparse.cpp | 8 +++--- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/otclient/net/declarations.h b/src/otclient/net/declarations.h index 63bbc851..96cc8ed0 100644 --- a/src/otclient/net/declarations.h +++ b/src/otclient/net/declarations.h @@ -27,26 +27,20 @@ typedef std::shared_ptr ProtocolLoginPtr; // TODO: place it somewhere else enum SpeakClasses { - SPEAK_SAY = 0x01, //normal talk - SPEAK_WHISPER = 0x02, //whispering - #w text - SPEAK_YELL = 0x03, //yelling - #y text - SPEAK_PRIVATE_PN = 0x04, //Player-to-NPC speaking(NPCs channel) - SPEAK_PRIVATE_NP = 0x05, //NPC-to-Player speaking - SPEAK_PRIVATE = 0x06, //Players speaking privately to players - SPEAK_CHANNEL_Y = 0x07, //Yellow message in chat - SPEAK_CHANNEL_W = 0x08, //White message in chat - SPEAK_RVR_CHANNEL = 0x09, //Reporting rule violation - Ctrl+R - SPEAK_RVR_ANSWER = 0x0A, //Answering report - SPEAK_RVR_CONTINUE = 0x0B, //Answering the answer of the report - SPEAK_BROADCAST = 0x0C, //Broadcast a message - #b - SPEAK_CHANNEL_R1 = 0x0D, //Talk red on chat - #c - SPEAK_PRIVATE_RED = 0x0E, //Red private - @name@ text - SPEAK_CHANNEL_O = 0x0F, //Talk orange on text - //SPEAK_ = 0x10, //? - SPEAK_CHANNEL_R2 = 0x11, //Talk red anonymously on chat - #d - //SPEAK_ = 0x12, //? - SPEAK_MONSTER_SAY = 0x13, //Talk orange - SPEAK_MONSTER_YELL = 0x14 //Yell orange + SPEAK_SAY = 0x01, //normal talk + SPEAK_WHISPER = 0x02, //whispering - #w text + SPEAK_YELL = 0x03, //yelling - #y text + SPEAK_PRIVATE_PN = 0x04, //Player-to-NPC speaking(NPCs channel) + SPEAK_PRIVATE_NP = 0x05, //NPC-to-Player speaking + SPEAK_PRIVATE = 0x06, //Players speaking privately to players + SPEAK_CHANNEL_Y = 0x07, //Yellow message in chat + SPEAK_CHANNEL_W = 0x08, //White message in chat + SPEAK_BROADCAST = 0x09, //Broadcast a message - #b + SPEAK_CHANNEL_R1 = 0x0A, //Talk red on chat - #c + SPEAK_PRIVATE_RED = 0x0B, //Red private - @name@ text + SPEAK_CHANNEL_O = 0x0C, //Talk orange on text + SPEAK_MONSTER_SAY = 0x0D, //Talk orange + SPEAK_MONSTER_YELL = 0x0E //Yell orange }; #endif diff --git a/src/otclient/net/protocolgameparse.cpp b/src/otclient/net/protocolgameparse.cpp index fe4676a8..2695260f 100644 --- a/src/otclient/net/protocolgameparse.cpp +++ b/src/otclient/net/protocolgameparse.cpp @@ -684,16 +684,18 @@ void ProtocolGame::parseCreatureSpeak(InputMessage& msg) parsePosition(msg); // creaturePos break; case SPEAK_CHANNEL_R1: - case SPEAK_CHANNEL_R2: case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_W: msg.getU16(); // channelId break; - case SPEAK_RVR_CHANNEL: - msg.getU32(); // time + case SPEAK_PRIVATE: + case SPEAK_PRIVATE_PN: + case SPEAK_BROADCAST: + case SPEAK_PRIVATE_RED: break; default: + logDebug("[ProtocolGame::parseCreatureSpeak]: Unknown speak type.", (int)type); break; }