From 17089d38f3624d592f36befe5f5cedfb08b3bbff Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Sun, 11 Apr 2010 11:18:20 +0400 Subject: Implement some opcodes. Big thx to TOM_RUS. --HG-- branch : trunk --- src/game/ChatHandler.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/game/ChatHandler.cpp') diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp index 30aaca4a6e8..ca17e1868f4 100644 --- a/src/game/ChatHandler.cpp +++ b/src/game/ChatHandler.cpp @@ -258,7 +258,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) uint32 sideb = player->GetTeam(); if (sidea != sideb) { - SendPlayerNotFoundNotice(to); + SendWrongFactionNotice(); return; } } @@ -734,3 +734,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); +} -- cgit v1.2.3