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 3f08c16749)
This commit is contained in:
jackpoz
2021-07-21 20:49:37 +02:00
committed by Shauren
parent 65521a40d2
commit 98e4bc2d3d

View File

@@ -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);