Core/Scripts: pass message parameter by reference in OnChat methods to make it possible to be modified inside the script.

--HG--
branch : trunk
This commit is contained in:
azazel committed 2010-11-17 18:14:35 +06:00
1 parent 169c2ef87a
commit 4fb572015a
9 files changed
+33 -33

No files matched your search

+10 -10
View File
@@ -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);