aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.cpp
diff options
context:
space:
mode:
authorazazel <none@none>2010-08-12 22:33:45 +0600
committerazazel <none@none>2010-08-12 22:33:45 +0600
commited08bedc6e51bd7ee1bf99170d4b0b63fef7e45d (patch)
treeaead20f6a299023b3b1e7cf81c35d4d5bd5206e1 /src/server/game/Scripting/ScriptMgr.cpp
parentf9997b7eb34004c9d60662c3d87b52b5efd149ce (diff)
* Modify PlayerScript::OnChat hook. Now it takes one optional parameter of type void *. Value of this parameter depends on chat type.
* Modify chat and emote hook in PlayerScript to take Player parameter insted on WorldSession (this is player script, isn't it?) * Move calls of OnChat hooks after validation of parameters and before actual call to chat methods. It's more logical because otherwise it will be necessary to repeat validation inside hooks. * Make use of new PlayeScript hooks. Move chat logging logic into separate script. * Add one path to scripts CMakeLists to make ChatLogScript happy. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.cpp')
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index eb907d1e6e4..52781455c96 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -1112,19 +1112,19 @@ void ScriptMgr::OnPlayerReputationChange(Player *player, uint32 factionID, int32
FOREACH_SCRIPT(PlayerScript)->OnReputationChange(player, factionID, standing, incremental);
}
-void ScriptMgr::OnPlayerChat(WorldSession *session, uint32 type, uint32 lang, std::string msg, std::string toOrChannel)
+void ScriptMgr::OnPlayerChat(Player* player, uint32 type, uint32 lang, std::string msg, void* param)
{
- FOREACH_SCRIPT(PlayerScript)->OnChat(session, type, lang, msg, toOrChannel);
+ FOREACH_SCRIPT(PlayerScript)->OnChat(player, type, lang, msg, param);
}
-void ScriptMgr::OnPlayerEmote(WorldSession *session, uint32 emote)
+void ScriptMgr::OnPlayerEmote(Player* player, uint32 emote)
{
- FOREACH_SCRIPT(PlayerScript)->OnEmote(session, emote);
+ FOREACH_SCRIPT(PlayerScript)->OnEmote(player, emote);
}
-void ScriptMgr::OnPlayerTextEmote(WorldSession *session, uint32 text_emote, uint32 emoteNum, uint64 guid)
+void ScriptMgr::OnPlayerTextEmote(Player* player, uint32 text_emote, uint32 emoteNum, uint64 guid)
{
- FOREACH_SCRIPT(PlayerScript)->OnTextEmote(session, text_emote, emoteNum, guid);
+ FOREACH_SCRIPT(PlayerScript)->OnTextEmote(player, text_emote, emoteNum, guid);
}
SpellHandlerScript::SpellHandlerScript(const char* name)