From ba957e6a0e5861abb4d80a6ca7a4d4da0b15163e Mon Sep 17 00:00:00 2001 From: Subv Date: Fri, 13 Apr 2012 18:31:18 -0500 Subject: Core/Spells: Reapply glyph bonuses that depend on stance when you shapeshift into that instance Closes #1076 and possibly others Signed-off-by: Subv --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 1ad6fe557f9..a1bb14b3e16 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1474,6 +1474,23 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const if (spellInfo->Stances & (1<<(GetMiscValue()-1))) target->CastSpell(target, itr->first, true, NULL, this); } + + // Also do it for Glyphs + for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i) + { + if (uint32 glyphId = target->ToPlayer()->GetGlyph(i)) + { + if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId)) + { + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellId); + if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE))) + continue; + if (spellInfo->Stances & (1<<(GetMiscValue()-1))) + target->CastSpell(target, glyph->SpellId, true, NULL, this); + } + } + } + // Leader of the Pack if (target->ToPlayer()->HasSpell(17007)) { -- cgit v1.2.3