mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Spells): Fixed displaying "That Glyph is already inscribed in your spellbook" when activating the same glyph in different spec. (#7162)
Fixed #6342 Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
@@ -14137,11 +14137,22 @@ void Player::ActivateSpec(uint8 spec)
|
||||
}
|
||||
|
||||
// xinef: apply glyphs from second spec
|
||||
if(GetActiveSpec() != oldSpec)
|
||||
if (GetActiveSpec() != oldSpec)
|
||||
{
|
||||
for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot)
|
||||
if (uint32 glyphId = m_Glyphs[GetActiveSpec()][slot])
|
||||
{
|
||||
uint32 glyphId = m_Glyphs[GetActiveSpec()][slot];
|
||||
if (glyphId)
|
||||
{
|
||||
if (GlyphPropertiesEntry const* glyphEntry = sGlyphPropertiesStore.LookupEntry(glyphId))
|
||||
{
|
||||
CastSpell(this, glyphEntry->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)));
|
||||
}
|
||||
}
|
||||
|
||||
SetGlyph(slot, glyphId, true);
|
||||
}
|
||||
}
|
||||
|
||||
m_usedTalentCount = spentTalents;
|
||||
InitTalentForLevel();
|
||||
|
||||
Reference in New Issue
Block a user