Core/PacketIO: Implemented CMSG_CONVERSATION_LINE_STARTED (#27036)

* Added OnConversationLineStarted hook to ConversationScripts
* Added example for Defender of Azeroth conversation
This commit is contained in:
ModoX
2021-10-12 00:16:20 +02:00
committed by GitHub
parent 9b036b8fe0
commit 6d9ce8e8ba
10 changed files with 94 additions and 2 deletions

View File

@@ -828,6 +828,9 @@ 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 player sends CMSG_CONVERSATION_LINE_STARTED with valid conversation guid
virtual void OnConversationLineStarted(Conversation* /*conversation*/, uint32 /*lineId*/, Player* /*sender*/) { }
};
class TC_GAME_API SceneScript : public ScriptObject
@@ -1132,6 +1135,7 @@ class TC_GAME_API ScriptMgr
public: /* ConversationScript */
void OnConversationCreate(Conversation* conversation, Unit* creator);
void OnConversationLineStarted(Conversation* conversation, uint32 lineId, Player* sender);
public: /* SceneScript */