Files
coa-exporter/CoaExporter/Collectors/Enchants.lua
T
florian.berthold 2b97a68317 Initial CoaExporter: merge AscensionExporter + CoA skill/talent dumpers
Folds three previously-separate Lua addons into one for guild-member use:

  - ascension-char-exporter (per-character JSON/Wiki.js Markdown via /ascx)
  - CoA_SkillExporter      (skills/dispels/passives catalog via /skilldump)
  - CoA_TalentExporter     (talent-tree catalog via /talentdumpall)

The two CoA catalog dumpers were ~90% identical entry-walkers. Pulled the
shared C_CharacterAdvancement.GetAllEntries() loop into Catalogs/Common.lua
and have Skills.lua / Talents.lua register collectors that share a single
scan pass (so /coae catalog all walks the entry list once, not twice).

Per-character collectors (Talents, Gear, Enchants, MysticScrolls,
MysticScrollProbe) and the AtlasLootAscension-derived ScrollCatalog data
are kept verbatim, just rebranded.

Slash interface:

  /coae export {all|talents|gear|enchants|mdgear|mdenchants|md}
  /coae catalog {all|skills|talents|dispels [class]|passives [class]|status}
  /coae scrolls {scan|export|reset|status}
  /coae sv on|off | debug | help

Aliases: /coaexp, /ascx, /asxc, plus legacy /skilldump /talentdumpall
/dispels /passives that map to the catalog subcommands.

SavedVariables: CoaExporterSaved, CoaExporterConfig, CoaExporterScrollCache,
CoaExporterCatalog (skills/dispels/levelPassives/talents/_meta).
2026-05-07 10:43:16 +02:00

39 lines
1.2 KiB
Lua

-- 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