From 4fb572015ac9f250e00d9894361226c31b7ec5cf Mon Sep 17 00:00:00 2001 From: azazel Date: Wed, 17 Nov 2010 18:14:35 +0600 Subject: Core/Scripts: pass message parameter by reference in OnChat methods to make it possible to be modified inside the script. --HG-- branch : trunk --- src/server/game/Scripting/ScriptMgr.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/server/game/Scripting/ScriptMgr.h') diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 30c82f0b4c5..d55cb79196c 100755 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -692,11 +692,11 @@ class PlayerScript : public ScriptObject virtual void OnDuelEnd(Player* /*winner*/, Player* /*loser*/, DuelCompleteType /*type*/) { } // The following methods are called when a player sends a chat message - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/) { } - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/, Player* /*receiver*/) { } - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/, Group* /*group*/) { } - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/, Guild* /*guild*/) { } - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/, Channel* /*channel*/) { } + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/) { } + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Player* /*receiver*/) { } + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Group* /*group*/) { } + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Guild* /*guild*/) { } + virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string& /*msg*/, Channel* /*channel*/) { } // Both of the below are called on emote opcodes virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { } @@ -935,11 +935,11 @@ class ScriptMgr void OnPlayerDuelRequest(Player* target, Player* challenger); void OnPlayerDuelStart(Player* player1, Player* player2); void OnPlayerDuelEnd(Player* winner, Player* loser, DuelCompleteType type); - void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg); - void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Player* receiver); - void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Group* group); - void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Guild* guild); - void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Channel* channel); + void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg); + void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Player* receiver); + void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group); + void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild); + void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string& msg, Channel* channel); void OnPlayerEmote(Player* player, uint32 emote); void OnPlayerTextEmote(Player* player, uint32 text_emote, uint32 emoteNum, uint64 guid); void OnPlayerSpellCast(Player* player, Spell *spell, bool skipCheck); -- cgit v1.2.3