diff options
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index c55e9a9385f..7b5b6d1ef55 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -675,15 +675,12 @@ public: // Called when a player's reputation changes (before it is actually changed) virtual void OnReputationChange(Player* /*player*/, uint32 /*factionID*/, int32& /*standing*/, bool /*incremental*/) { } - // Called when a player sends a chat message. param depends on the chat type: - // CHAT_MSG_WHISPER - Player*: receiver; - // CHAT_MSG_PARTY, CHAT_MSG_PARTY_LEADER - Group*: group of player; - // CHAT_MSG_OFFICER, CHAT_MSG_GUILD - Guild*: guild of player; - // CHAT_MSG_RAID, CHAT_MSG_RAID_LEADER, CHAT_MSG_RAID_WARNING - Group*: group of player; - // CHAT_MSG_BATTLEGROUND, CHAT_MSG_BATTLEGROUND_LEADER - Group*: group of player; - // CHAT_MSG_CHANNEL - Channel*: channel player speaks to; - // other - NULL. - virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/, void* /*param*/ = NULL) { } + // 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*/) { } // Both of the below are called on emote opcodes virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { } @@ -887,7 +884,11 @@ class ScriptMgr void OnPlayerMoneyChanged(Player *player, int32& amount); void OnGivePlayerXP(Player *player, uint32& amount, Unit *victim); void OnPlayerReputationChange(Player *player, uint32 factionID, int32& standing, bool incremental); - void OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, void* param = NULL); + 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); |