-- CoaExporter - Mystic Enchants (Glyphs) collector CoaExporter = _G.CoaExporter or {} _G.CoaExporter = CoaExporter local AE = CoaExporter function AE.CollectMysticEnchants() local enchants = {} if C_MysticEnchant and C_MysticEnchant.GetAppliedEnchant then local numSlots = NUM_MYSTIC_ENCHANT_SLOTS or 12 for i = 1, numSlots do local spellID = C_MysticEnchant.GetAppliedEnchant("player", i) if spellID and spellID > 0 then local name, _, icon = GetSpellInfo(spellID) if name then local iconPath = "" if icon then iconPath = icon:match("Interface\\Icons\\(.+)") or "" iconPath = iconPath:lower() end table.insert(enchants, { slot = i, name = name, spellID = spellID, icon = iconPath }) end end end end table.sort(enchants, function(a,b) return a.slot < b.slot end) return { enchants = enchants } end AE._loadedEnchants = true