Fixed Glyph Learning.

* Fixed an issue where if players learn a glyph in spec 1 the same glyph couldnt be applied in spec 2.

closes #739 #411
This commit is contained in:
talamortis
2018-07-21 23:38:33 +01:00
parent bdbdc8030a
commit 562833c9d6

View File

@@ -26708,10 +26708,11 @@ void Player::ActivateSpec(uint8 spec)
}
// xinef: apply glyphs from second spec
for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot)
if (uint32 glyphId = m_Glyphs[GetActiveSpec()][slot])
if (GlyphPropertiesEntry const* glyphEntry = sGlyphPropertiesStore.LookupEntry(glyphId))
CastSpell(this, glyphEntry->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK&~(TRIGGERED_IGNORE_SHAPESHIFT|TRIGGERED_IGNORE_CASTER_AURASTATE)));
if(GetActiveSpec() != oldSpec)
for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot)
if (uint32 glyphId = m_Glyphs[GetActiveSpec()][slot])
if (GlyphPropertiesEntry const* glyphEntry = sGlyphPropertiesStore.LookupEntry(glyphId))
CastSpell(this, glyphEntry->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK&~(TRIGGERED_IGNORE_SHAPESHIFT|TRIGGERED_IGNORE_CASTER_AURASTATE)));
m_usedTalentCount = spentTalents;
InitTalentForLevel();