Replaced hardcoded value with enum.

Added some comments.
This commit is contained in:
tomrus88 2010-04-14 17:41:58 +04:00
parent a4c5734256
commit 8bc9aa6a92
3 changed files with 46 additions and 45 deletions

View file

@ -877,7 +877,7 @@ void Channel::MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good)
void Channel::MakePlayerNotBanned(WorldPacket *data, uint64 guid)
{
MakeNotifyPacket(data, CHAT_PLAYER_NOT_BANNED_NOTICE);
*data << uint64(guid);
*data << uint64(guid); // should be string!!
}
// done 0x17
@ -929,7 +929,7 @@ void Channel::MakePlayerInvited(WorldPacket *data, const std::string& name)
void Channel::MakePlayerInviteBanned(WorldPacket *data, uint64 guid)
{
MakeNotifyPacket(data, CHAT_PLAYER_INVITE_BANNED_NOTICE);
*data << uint64(guid);
*data << uint64(guid); // should be string!!
}
// done 0x1F

View file

@ -28,10 +28,8 @@
#include <map>
#include <string>
class Channel
enum ChatNotify
{
enum ChatNotify
{
CHAT_JOINED_NOTICE = 0x00, //+ "%s joined channel.";
CHAT_LEFT_NOTICE = 0x01, //+ "%s left channel.";
//CHAT_SUSPENDED_NOTICE = 0x01, // "%s left channel.";
@ -69,9 +67,12 @@ class Channel
CHAT_NOT_IN_AREA_NOTICE = 0x20, //+ "[%s] You are not in the correct area for this channel."; -- The user is trying to send a chat to a zone specific channel, and they're not physically in that zone.
CHAT_NOT_IN_LFG_NOTICE = 0x21, //+ "[%s] You must be queued in looking for group before joining this channel."; -- The user must be in the looking for group system to join LFG chat channels.
CHAT_VOICE_ON_NOTICE = 0x22, //+ "[%s] Channel voice enabled by %s.";
CHAT_VOICE_OFF_NOTICE = 0x23, //+ "[%s] Channel voice disabled by %s.";
};
CHAT_VOICE_OFF_NOTICE = 0x23 //+ "[%s] Channel voice disabled by %s.";
// 0x24 enable voice?
};
class Channel
{
enum ChannelFlags
{
CHANNEL_FLAG_NONE = 0x00,

View file

@ -106,5 +106,5 @@ void ChannelMgr::LeftChannel(std::string name)
void ChannelMgr::MakeNotOnPacket(WorldPacket *data, std::string name)
{
data->Initialize(SMSG_CHANNEL_NOTIFY, (1+10)); // we guess size
(*data) << (uint8)0x05 << name;
(*data) << (uint8)CHAT_NOT_MEMBER_NOTICE << name;
}