mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Try to fix a crash caused by single target auras. Thanks to QAston.
--HG-- branch : trunk
This commit is contained in:
@@ -3924,8 +3924,7 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects)
|
||||
for(;;)
|
||||
{
|
||||
Unit* caster = Aur->GetCaster();
|
||||
if(!caster) // caster deleted and not required adding scAura
|
||||
break;
|
||||
assert(caster);
|
||||
|
||||
bool restart = false;
|
||||
AuraList& scAuras = caster->GetSingleCastAuras();
|
||||
@@ -4251,7 +4250,7 @@ void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase)
|
||||
if (aura->GetTarget() != this && !aura->GetTarget()->InSamePhase(newPhase))
|
||||
{
|
||||
uint32 removedAuras = m_removedAurasCount;
|
||||
aura->GetTarget()->RemoveAura(aura->GetId(),aura->GetCasterGUID());
|
||||
aura->GetTarget()->RemoveAura(aura);
|
||||
if (removedAuras+1<m_removedAurasCount)
|
||||
iter=scAuras.begin();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user