[8298] Use new Aura::HandleSpellSpecificBoosts for apply/remove dependent auras.

This provided more clear place where dependent auras can be applied/removed,
if expected manual apply _with_ aura remove at parent aura expire.
This can be used for more cases.

In current state it implement additional effects for
29836 and ranks, 61846 and ranks, 31869, 53379 and ranks, 20254 and ranks,
20138 an ranks, 48263, and 48265.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
nos4r2zod 2009-08-03 02:17:48 +04:00 committed by VladimirMangos
parent aa56961f94
commit 39eca7d43a
6 changed files with 233 additions and 100 deletions

View file

@ -3533,6 +3533,10 @@ bool Unit::AddAura(Aura *Aur)
Aur->ApplyModifier(true,true);
sLog.outDebug("Aura %u now is in use", aurName);
if(IsSpellLastAuraEffect(aurSpellInfo,Aur->GetEffIndex()))
Aur->HandleSpellSpecificBoosts(true);
return true;
}
@ -3970,7 +3974,14 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
Aur->ApplyModifier(false,true);
Aur->_RemoveAura();
if(Aur->_RemoveAura())
{
// last aura in stack removed
if(IsSpellLastAuraEffect(Aur->GetSpellProto(),Aur->GetEffIndex()))
Aur->HandleSpellSpecificBoosts(false);
}
delete Aur;
if(caster_channeled)