Fixed few opcodes.

This commit is contained in:
tomrus88 2010-04-03 17:49:12 +04:00
parent a248015501
commit 4f6006b9db
5 changed files with 101 additions and 44 deletions

View file

@ -219,7 +219,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
uint32 sideb = player->GetTeam();
if( sidea != sideb )
{
SendPlayerNotFoundNotice(to);
SendWrongFactionNotice();
return;
}
}
@ -615,3 +615,23 @@ void WorldSession::SendPlayerNotFoundNotice(std::string name)
data << name;
SendPacket(&data);
}
void WorldSession::SendPlayerAmbiguousNotice(std::string name)
{
WorldPacket data(SMSG_CHAT_PLAYER_AMBIGUOUS, name.size()+1);
data << name;
SendPacket(&data);
}
void WorldSession::SendWrongFactionNotice()
{
WorldPacket data(SMSG_CHAT_WRONG_FACTION, 0);
SendPacket(&data);
}
void WorldSession::SendChatRestrictedNotice(ChatRestrictionType restriction)
{
WorldPacket data(SMSG_CHAT_RESTRICTED, 1);
data << uint8(restriction);
SendPacket(&data);
}