diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2e855283cfe..48651522734 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -492,11 +492,16 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag) //sLog.outDetail("auraflag:%u flag:%u = %u",(*iter)->GetSpellProto()->AuraInterruptFlags,flag,(*iter)->GetSpellProto()->AuraInterruptFlags & flag); if(*iter && ((*iter)->GetSpellProto()->AuraInterruptFlags & flag)) { - RemoveAurasDueToSpell((*iter)->GetId()); - if (!m_interruptableAuras.empty()) - next = m_interruptableAuras.begin(); + if((*iter)->IsInUse()) + sLog.outError("Aura %u is trying to remove itself! Flag %u. May cause crash!", (*iter)->GetId(), flag); else - break; + { + RemoveAurasDueToSpell((*iter)->GetId()); + if (!m_interruptableAuras.empty()) + next = m_interruptableAuras.begin(); + else + break; + } } } |