From 779053ab908029b31ed5ef3e8ae6f2e242b6cc30 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 11 Jul 2021 11:55:23 +0200 Subject: Core/Unit: Include m_Controlled in crashlogs (cherry picked from commit 40f4b141bd602d6285c3d2d21315a29b2ab3cce1) --- src/server/game/Entities/Unit/Unit.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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: \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(); } -- cgit v1.2.3