diff options
author | jackpoz <giacomopoz@gmail.com> | 2021-07-11 11:55:23 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-03-11 15:23:48 +0100 |
commit | 779053ab908029b31ed5ef3e8ae6f2e242b6cc30 (patch) | |
tree | 7d542d52a074c374a3b08e43197735bb6dbfe182 /src | |
parent | 177d26330d8a6fc1123acd91b5f2986860b009a5 (diff) |
Core/Unit: Include m_Controlled in crashlogs
(cherry picked from commit 40f4b141bd602d6285c3d2d21315a29b2ab3cce1)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5ad1a1b6d19..a4c557ce27f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -13450,6 +13450,15 @@ std::string Unit::GetDebugInfo() const << "" << (movespline ? movespline->ToString() : "Movespline: <none>\n") << "GetCharmedGUID(): " << GetCharmedGUID().ToString() << "\n" << "GetCharmerGUID(): " << GetCharmerGUID().ToString() << "\n" - << "" << (GetVehicleKit() ? GetVehicleKit()->GetDebugInfo() : "No vehicle kit"); + << "" << (GetVehicleKit() ? GetVehicleKit()->GetDebugInfo() : "No vehicle kit") << "\n" + << "m_Controlled size: " << m_Controlled.size(); + + size_t controlledCount = 0; + for (Unit* controlled : m_Controlled) + { + ++controlledCount; + sstr << "\n" << "m_Controlled " << controlledCount << " : " << controlled->GetGUID().ToString(); + } + return sstr.str(); } |