mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Auras: Add some debug info to trac the reason of Aura::UpdateTargetMap crash.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user