From 7f14b64e093de23abb322b843b92260d9fe51123 Mon Sep 17 00:00:00 2001 From: ModoX Date: Wed, 28 Jun 2023 01:30:23 +0200 Subject: Core/Conversation: Implemented OnConversationStart and OnConversationUpdate hooks (#29086) --- src/server/game/Scripting/ScriptMgr.h | 8 ++++++++ 1 file changed, 8 insertions(+) (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 91d1b3902e8..631b5320cd6 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -923,8 +923,14 @@ class TC_GAME_API ConversationScript : public ScriptObject // Called when Conversation is created but not added to Map yet. virtual void OnConversationCreate(Conversation* conversation, Unit* creator); + // Called when Conversation is started + virtual void OnConversationStart(Conversation* conversation); + // Called when player sends CMSG_CONVERSATION_LINE_STARTED with valid conversation guid virtual void OnConversationLineStarted(Conversation* conversation, uint32 lineId, Player* sender); + + // Called for each update tick + virtual void OnConversationUpdate(Conversation* conversation, uint32 diff); }; class TC_GAME_API SceneScript : public ScriptObject @@ -1269,7 +1275,9 @@ class TC_GAME_API ScriptMgr public: /* ConversationScript */ void OnConversationCreate(Conversation* conversation, Unit* creator); + void OnConversationStart(Conversation* conversation); void OnConversationLineStarted(Conversation* conversation, uint32 lineId, Player* sender); + void OnConversationUpdate(Conversation* conversation, uint32 diff); public: /* SceneScript */ -- cgit v1.2.3