Core/Auras: Fixed auras incorrectly stacking with different item casters introduced in r19f21916a940
Closes issue #5218. --HG-- branch : trunk
This commit is contained in:
@@ -527,7 +527,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
|
||||
for (Unit::AuraApplicationMap::iterator iter = itr->first->GetAppliedAuras().begin(); iter != itr->first->GetAppliedAuras().end(); ++iter)
|
||||
{
|
||||
Aura const * aura = iter->second->GetBase();
|
||||
if (!sSpellMgr.CanAurasStack(GetSpellProto(), aura->GetSpellProto(), aura->GetCasterGUID() == GetCasterGUID()))
|
||||
if (!sSpellMgr.CanAurasStack(this, aura, aura->GetCasterGUID() == GetCasterGUID()))
|
||||
{
|
||||
addUnit = false;
|
||||
break;
|
||||
@@ -549,10 +549,8 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
|
||||
|
||||
// remove auras from units no longer needing them
|
||||
for (UnitList::iterator itr = targetsToRemove.begin(); itr != targetsToRemove.end();++itr)
|
||||
{
|
||||
if (AuraApplication * aurApp = GetApplicationOfTarget((*itr)->GetGUID()))
|
||||
(*itr)->_UnapplyAura(aurApp, AURA_REMOVE_BY_DEFAULT);
|
||||
}
|
||||
|
||||
if (!apply)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user