aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/MiscHandler.cpp
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2021-10-12 00:16:20 +0200
committerGitHub <noreply@github.com>2021-10-12 00:16:20 +0200
commit6d9ce8e8baa100ecc7650d0ae56037c131bab2e0 (patch)
tree911d162cb936f3e7bc7c79dfe79b7f6002aee8a7 /src/server/game/Handlers/MiscHandler.cpp
parent9b036b8fe0c443acd882de9faf615abe89dad691 (diff)
Core/PacketIO: Implemented CMSG_CONVERSATION_LINE_STARTED (#27036)
* Added OnConversationLineStarted hook to ConversationScripts * Added example for Defender of Azeroth conversation
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 0f8ad12a769..e7431a92e9a 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -25,6 +25,7 @@
#include "CinematicMgr.h"
#include "ClientConfigPackets.h"
#include "Common.h"
+#include "Conversation.h"
#include "Corpse.h"
#include "DatabaseEnv.h"
#include "DB2Stores.h"
@@ -1161,3 +1162,9 @@ void WorldSession::HandleCloseInteraction(WorldPackets::Misc::CloseInteraction&
if (_player->PlayerTalkClass->GetInteractionData().SourceGuid == closeInteraction.SourceGuid)
_player->PlayerTalkClass->GetInteractionData().Reset();
}
+
+void WorldSession::HandleConversationLineStarted(WorldPackets::Misc::ConversationLineStarted& conversationLineStarted)
+{
+ if (Conversation* convo = ObjectAccessor::GetConversation(*_player, conversationLineStarted.ConversationGUID))
+ sScriptMgr->OnConversationLineStarted(convo, conversationLineStarted.LineID, _player);
+}