aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-04-13 18:31:18 -0500
committerSubv <s.v.h21@hotmail.com>2012-04-13 18:32:56 -0500
commitba957e6a0e5861abb4d80a6ca7a4d4da0b15163e (patch)
tree101c332d2e0baba81f9f4f3f57422e27a0de8b34 /src
parenta28742bffeca3764468b3f307a86c14e2f3e3607 (diff)
Core/Spells: Reapply glyph bonuses that depend on stance when you shapeshift into that instance
Closes #1076 and possibly others Signed-off-by: Subv <s.v.h21@hotmail.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp17
1 files changed, 17 insertions, 0 deletions
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))
{