From 0b2c6426e57352a5a30ed2d115ee451de13d77b7 Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 6 Feb 2011 14:02:38 +0100 Subject: Core/Auras: Add some debug info to trac the reason of Aura::UpdateTargetMap crash. --- src/server/game/Spells/Auras/SpellAuras.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index e417427ec28..7cafc14cca4 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -514,7 +514,20 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply) for (std::map::iterator itr = targets.begin(); itr!= targets.end();) { // aura mustn't be already applied on target - ASSERT (!IsAppliedOnTarget(itr->first->GetGUID()) && "Aura::UpdateTargetMap: aura musn't be applied on target"); + if (IsAppliedOnTarget(itr->first->GetGUID())) + { + AuraApplication * aurApp = GetApplicationOfTarget(itr->first->GetGUID()); + // check if we have valid pointer + ASSERT(aurApp->GetTarget()); + // check if we really have same guid + ASSERT(aurApp->GetTarget()->GetGUID() == itr->first->GetGUID()); + // check if we really have base aura + ASSERT(aurApp->GetBase() == this); + // check if core created 2 units with same guid + ASSERT(aurApp->GetTarget() == itr->first); + // ok, we have same unit twice in map, how? + ASSERT(false); + } bool addUnit = true; // check target immunities -- cgit v1.2.3