mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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.
This commit is contained in:
@@ -5903,6 +5903,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);
|
||||
|
||||
Reference in New Issue
Block a user