diff options
author | jackpoz <giacomopoz@gmail.com> | 2021-07-21 20:49:37 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2021-07-21 20:49:37 +0200 |
commit | 3f08c16749984252e657d46cfaa1ef50cd3f5a15 (patch) | |
tree | 7bb60dd067694d55a5ab73524e7bf79d962901c0 | |
parent | 657970fb69ddb70b0650bc726a0065b38f6dbd29 (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.
-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 5f486aa9082..24e0742bbc5 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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); |