protocol speak fix

This commit is contained in:
Henrique 2011-08-19 13:25:39 -03:00
parent 09548488fa
commit f9e7d52ac0
2 changed files with 19 additions and 23 deletions

View File

@ -27,26 +27,20 @@ typedef std::shared_ptr<ProtocolLogin> ProtocolLoginPtr;
// TODO: place it somewhere else // TODO: place it somewhere else
enum SpeakClasses { enum SpeakClasses {
SPEAK_SAY = 0x01, //normal talk SPEAK_SAY = 0x01, //normal talk
SPEAK_WHISPER = 0x02, //whispering - #w text SPEAK_WHISPER = 0x02, //whispering - #w text
SPEAK_YELL = 0x03, //yelling - #y text SPEAK_YELL = 0x03, //yelling - #y text
SPEAK_PRIVATE_PN = 0x04, //Player-to-NPC speaking(NPCs channel) SPEAK_PRIVATE_PN = 0x04, //Player-to-NPC speaking(NPCs channel)
SPEAK_PRIVATE_NP = 0x05, //NPC-to-Player speaking SPEAK_PRIVATE_NP = 0x05, //NPC-to-Player speaking
SPEAK_PRIVATE = 0x06, //Players speaking privately to players SPEAK_PRIVATE = 0x06, //Players speaking privately to players
SPEAK_CHANNEL_Y = 0x07, //Yellow message in chat SPEAK_CHANNEL_Y = 0x07, //Yellow message in chat
SPEAK_CHANNEL_W = 0x08, //White message in chat SPEAK_CHANNEL_W = 0x08, //White message in chat
SPEAK_RVR_CHANNEL = 0x09, //Reporting rule violation - Ctrl+R SPEAK_BROADCAST = 0x09, //Broadcast a message - #b
SPEAK_RVR_ANSWER = 0x0A, //Answering report SPEAK_CHANNEL_R1 = 0x0A, //Talk red on chat - #c
SPEAK_RVR_CONTINUE = 0x0B, //Answering the answer of the report SPEAK_PRIVATE_RED = 0x0B, //Red private - @name@ text
SPEAK_BROADCAST = 0x0C, //Broadcast a message - #b SPEAK_CHANNEL_O = 0x0C, //Talk orange on text
SPEAK_CHANNEL_R1 = 0x0D, //Talk red on chat - #c SPEAK_MONSTER_SAY = 0x0D, //Talk orange
SPEAK_PRIVATE_RED = 0x0E, //Red private - @name@ text SPEAK_MONSTER_YELL = 0x0E //Yell orange
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
}; };
#endif #endif

View File

@ -684,16 +684,18 @@ void ProtocolGame::parseCreatureSpeak(InputMessage& msg)
parsePosition(msg); // creaturePos parsePosition(msg); // creaturePos
break; break;
case SPEAK_CHANNEL_R1: case SPEAK_CHANNEL_R1:
case SPEAK_CHANNEL_R2:
case SPEAK_CHANNEL_O: case SPEAK_CHANNEL_O:
case SPEAK_CHANNEL_Y: case SPEAK_CHANNEL_Y:
case SPEAK_CHANNEL_W: case SPEAK_CHANNEL_W:
msg.getU16(); // channelId msg.getU16(); // channelId
break; break;
case SPEAK_RVR_CHANNEL: case SPEAK_PRIVATE:
msg.getU32(); // time case SPEAK_PRIVATE_PN:
case SPEAK_BROADCAST:
case SPEAK_PRIVATE_RED:
break; break;
default: default:
logDebug("[ProtocolGame::parseCreatureSpeak]: Unknown speak type.", (int)type);
break; break;
} }