mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Merge pull request #14821 from Boomper/auraoverridespellbar
Core/Unit: Correct Handling of SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS
This commit is contained in:
@@ -16392,9 +16392,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user