diff options
author | jackpoz <giacomopoz@gmail.com> | 2021-07-21 20:49:37 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-11 19:09:40 +0100 |
commit | 98e4bc2d3dda4ab9f5f7cd736bdf5f5e206b2ebb (patch) | |
tree | 018d25f8b6d9ab07230553bfe04cb363332db80c | |
parent | 65521a40d274ce73769371b00d71c4b83e5ec319 (diff) |
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)
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); |