diff options
| author | ModoX <moardox@gmail.com> | 2023-12-31 15:58:07 +0100 | 
|---|---|---|
| committer | ModoX <moardox@gmail.com> | 2023-12-31 15:58:07 +0100 | 
| commit | a5d2d6e465b619743afa374ff99a7238e685d9e8 (patch) | |
| tree | 9c40c916482e36bf9190b402033116880e409688 | |
| parent | ee7b0e82fa076ad4338b1c362235cec6739f00e0 (diff) | |
Core/Conversation: Log error if conversation is started multiple times
| -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 9ed3043e877..a83ce8c0d05 100644 --- a/src/server/game/Entities/Conversation/Conversation.cpp +++ b/src/server/game/Entities/Conversation/Conversation.cpp @@ -240,6 +240,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;  | 
