Core/Auras: Fixed auras incorrectly stacking with different item casters introduced in r19f21916a940

Closes issue #5218.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-21 11:40:20 +01:00
parent 5180ed0383
commit 5809c1fa3b
4 changed files with 54 additions and 23 deletions
+1 -3
View File
@@ -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;