From 98e4bc2d3dda4ab9f5f7cd736bdf5f5e206b2ebb Mon Sep 17 00:00:00 2001 From: jackpoz Date: Wed, 21 Jul 2021 20:49:37 +0200 Subject: Core/Unit: Add more logs for #26325 Add more logs to try spotting the cause of #26325 . It might be that a minion is added to a owner that is not in world. Report any issue with minions/pets that contain the log. (cherry picked from commit 3f08c16749984252e657d46cfaa1ef50cd3f5a15) --- src/server/game/Entities/Unit/Unit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a4c557ce27f..a9adf79db7d 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5815,6 +5815,12 @@ void Unit::SetMinion(Minion *minion, bool apply) return; } + if (!IsInWorld()) + { + TC_LOG_FATAL("entities.unit", "SetMinion: Minion being added to owner not in world. Minion: %s, Owner: %s", minion->GetGUID().ToString().c_str(), GetDebugInfo().c_str()); + return; + } + minion->SetOwnerGUID(GetGUID()); m_Controlled.insert(minion); -- cgit v1.2.3