View Full Version : Glyph Template NPC

02-23-2014, 12:21 AM
Hey !

I had the idea to create an glyph template npc to simply one click a gossip menu to instant Set all Glyphs for multiple specs.

the script is not finished yet because i need to optimise my EffectApplyGlyph (i think get some code from http://www.trinitycore.net/d1/d16/classSpell.html#abeb1e55cf858686aa2f187ec2f12a078) function maybe someone can help here.

script: http://pastebin.com/D3E4Dt6p#

02-23-2014, 01:47 AM
Very nice, thanks for sharing. The glyph enumerator pretty much takes up the entire script. XD

02-23-2014, 04:05 AM
I used this bit of code in my own script to give a player a glyph

void ApplyGlyph(Player* player, uint8 slot, uint32 glyphID)
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphID))
if (uint32 oldGlyph = player->GetGlyph(slot))
player->RemoveAurasDueToSpell(sGlyphPropertiesStore.Lookup Entry(oldGlyph)->SpellId);
player->CastSpell(player, gp->SpellId, true);
player->SetGlyph(slot, glyphID);