Core/Spells: Fix bugs with improved presences at talents switch

This commit is contained in:
tobmaps
2011-07-15 07:01:33 +07:00
parent ebc1baf684
commit 26b3f00dac
2 changed files with 32 additions and 0 deletions
@@ -5210,6 +5210,38 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
// if (!(mode & AURA_EFFECT_HANDLE_REAL))
// break;
break;
case SPELLFAMILY_DEATHKNIGHT:
{
if (!(mode & AURA_EFFECT_HANDLE_REAL))
break;
// Improved Unholy Presence
if (m_spellProto->SpellIconID == 2633)
{
if (apply)
{
if (target->HasAura(48265) && !target->HasAura(63622))
{
// Not listed as any effect, only base points set
int32 basePoints0 = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), 1);
target->CastCustomSpell(target, 63622, &basePoints0 , &basePoints0, &basePoints0, true, 0, this);
}
}
else
target->RemoveAurasDueToSpell(63622);
}
// Improved Blood Presence
else if (m_spellProto->SpellIconID == 2636)
{
if (apply)
{
if (!target->HasAura(48266) && !target->HasAura(63611))
target->CastSpell(target, 63611, true);
}
else
target->RemoveAurasDueToSpell(63611);
}
break;
}
}
}