Core/Unit: Correct Handling of SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS and SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_2

- if aura  SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS/*_2 has a ClassMask it changes spells that fit into that classmask
 - if aura  SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS/*_2 doesn't have a ClassMask it changes spells with spellId equal to miscValueA
This commit is contained in:
Boomper
2015-05-31 21:20:20 +02:00
parent eee0eebf51
commit 32baf4341e

View File

@@ -16369,9 +16369,12 @@ SpellInfo const* Unit::GetCastSpellInfo(SpellInfo const* spellInfo) const
swaps.insert(swaps.end(), swaps2.begin(), swaps2.end());
for (AuraEffect const* auraEffect : swaps)
if (auraEffect->IsAffectingSpell(spellInfo))
if (SpellInfo const* newInfo = sSpellMgr->GetSpellInfo(auraEffect->GetAmount()))
return newInfo;
{
if ((!auraEffect->GetSpellEffectInfo()->SpellClassMask && auraEffect->GetMiscValue() == spellInfo->Id) ||
(auraEffect->GetSpellEffectInfo()->SpellClassMask && auraEffect->IsAffectingSpell(spellInfo)))
if (SpellInfo const* newInfo = sSpellMgr->GetSpellInfo(auraEffect->GetAmount()))
return newInfo;
}
return spellInfo;
}