aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoomper <holubovsky.jindrich@ssakhk.cz>2015-05-31 21:20:20 +0200
committerBoomper <holubovsky.jindrich@ssakhk.cz>2015-05-31 21:20:20 +0200
commit32baf4341e0cebea32ea555a24974f9ebdd35cc2 (patch)
tree33bc0bfa9aea6919b29f185c201ad31abeb47abd
parenteee0eebf5141b16ea2c442b1ea7176abd7600bb8 (diff)
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
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp9
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 490c31e683c..5b0a8557832 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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;
}