diff options
author | ModoX <moardox@gmail.com> | 2023-12-31 15:58:07 +0100 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2024-01-09 13:02:53 +0100 |
commit | b2cbf220f62b45281afa1e6e7838a2d8d04d3c9b (patch) | |
tree | c1b0c5e65f578d921fe666c7fe5cc1c0a7d23cb0 | |
parent | e9b8cd598bccbd9de8e3fdb37a7aba63508c6906 (diff) |
Core/Conversation: Log error if conversation is started multiple times
(cherry picked from commit a5d2d6e465b619743afa374ff99a7238e685d9e8)
-rw-r--r-- | src/server/game/Entities/Conversation/Conversation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Entities/Conversation/Conversation.cpp b/src/server/game/Entities/Conversation/Conversation.cpp index c2a3aa07e9e..03ba8b2ab4a 100644 --- a/src/server/game/Entities/Conversation/Conversation.cpp +++ b/src/server/game/Entities/Conversation/Conversation.cpp @@ -227,6 +227,12 @@ bool Conversation::Start() } } + if (IsInWorld()) + { + TC_LOG_ERROR("entities.conversation", "Attempted to start conversation (Id: {}) multiple times.", GetEntry()); + return true; // returning true to not cause delete in Conversation::CreateConversation if convo is already started in ConversationScript::OnConversationCreate + } + if (!GetMap()->AddToMap(this)) return false; |