diff options
author | QAston <qaston@gmail.com> | 2011-02-06 14:02:38 +0100 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-02-06 14:02:38 +0100 |
commit | 0b2c6426e57352a5a30ed2d115ee451de13d77b7 (patch) | |
tree | 9cc92dd29cb4b7fd2c5de63b28a3d141b062d744 | |
parent | 6e08e51976cac1673de028eb6f780e13d78538b3 (diff) |
Core/Auras: Add some debug info to trac the reason of Aura::UpdateTargetMap crash.
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuras.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
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<Unit *, uint8>::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 |