Core/Spells: Reapply glyph bonuses that depend on stance when you shapeshift into that instance

Closes #1076 and possibly others

Signed-off-by: Subv <[email protected]>
This commit is contained in:
Subv
2012-04-13 18:32:56 -05:00
parent a28742bffe
commit ba957e6a0e
@@ -1474,6 +1474,23 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
if (spellInfo->Stances & (1<<(GetMiscValue()-1))) if (spellInfo->Stances & (1<<(GetMiscValue()-1)))
target->CastSpell(target, itr->first, true, NULL, this); 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 // Leader of the Pack
if (target->ToPlayer()->HasSpell(17007)) if (target->ToPlayer()->HasSpell(17007))
{ {