diff options
author | Carbenium <carbenium@outlook.com> | 2015-07-10 01:08:28 +0200 |
---|---|---|
committer | Carbenium <carbenium@outlook.com> | 2015-07-10 01:08:28 +0200 |
commit | eeaa78c8dfb707ef0b4cc809ec97757bff79b384 (patch) | |
tree | 868a6d937621964ab6a4cfdc49b96c472330e01e /src | |
parent | 1658421403c4f0643732efd25a338ac47a3c32f4 (diff) | |
parent | 32baf4341e0cebea32ea555a24974f9ebdd35cc2 (diff) |
Merge pull request #14821 from Boomper/auraoverridespellbar
Core/Unit: Correct Handling of SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5631b486774..f02885a0ea6 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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; } |