Skip to content

Instantly share code, notes, and snippets.

@eilo
Created April 14, 2012 23:47
Show Gist options
  • Save eilo/2388764 to your computer and use it in GitHub Desktop.
Save eilo/2388764 to your computer and use it in GitHub Desktop.
No emotes (1 file inside)
From 2ced30432aa2a824e3e78953555f29cd36557442 Mon Sep 17 00:00:00 2001
From: Eilo <[email protected]>
Date: Tue, 3 Apr 2012 19:44:02 +0100
Subject: [PATCH] Arena Espectador: varios cambios para que no usen emotes
/lol /lick etc etc
---
src/server/game/Entities/Player/Player.cpp | 3 ---
.../game/Server/Protocol/Handlers/ChatHandler.cpp | 7 +++++++
1 files changed, 7 insertions(+)
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
index d25271e..b20cdb6 100755
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
@@ -491,6 +491,13 @@ void WorldSession::HandleEmoteOpcode(WorldPacket & recv_data)
if (!GetPlayer()->isAlive() || GetPlayer()->HasUnitState(UNIT_STAT_DIED))
return;
+ // Esta parte es del arena espectador
+ if (GetPlayer()->IsEspectador())
+ {
+ SendNotification(LANG_SPEC_CAN_NOT_CHAT); // Para que no pueda hacer emotes jeje :)
+ return;
+ }
+
uint32 emote;
recv_data >> emote;
sScriptMgr->OnPlayerEmote(GetPlayer(), emote);
--
1.7.8.msysgit.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment