mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/ScriptSystem: Refactor ScriptMgr::OnPlayerChat to no longer accept a C-style parameter of type void*.
Instead, use overloaded methods for the different types. --HG-- branch : trunk
This commit is contained in:
@@ -1117,9 +1117,29 @@ void ScriptMgr::OnPlayerReputationChange(Player *player, uint32 factionID, int32
|
||||
FOREACH_SCRIPT(PlayerScript)->OnReputationChange(player, factionID, standing, incremental);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, void* param)
|
||||
void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, param);
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Player* receiver)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, receiver);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Group* group)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, group);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Guild* guild)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, guild);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, Channel* channel)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, channel);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerEmote(Player* player, uint32 emote)
|
||||
|
||||
Reference in New Issue
Block a user