Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ local BUILTIN_STACKS = {
--- Default display order for builtin stack keys (matches default viewers.utility order).
local BUILTIN_STACK_ORDER = { "trinket1", "trinket2" }

local DRACTHYR_WING_BUFFET_IDS = { 357214, 368970 } -- Base and enhanced evoker variants.

--- Racial ability lookup keyed by UnitRace("player") raceFileName.
--- One primary active racial per race.
local RACIAL_ABILITIES = {
Expand All @@ -210,10 +212,17 @@ local RACIAL_ABILITIES = {
Vulpera = { spellId = 312411 }, -- Bag of Tricks
MagharOrc = { spellId = 274738 }, -- Ancestral Call
Mechagnome = { spellId = 312924 }, -- Hyper Organic Light Originator
Dracthyr = { spellIds = { 357214, 368970 } }, -- Tail Swipe
Dracthyr = { spellIds = DRACTHYR_WING_BUFFET_IDS }, -- Wing Buffet
EarthenDwarf = { spellId = 436717 }, -- Azerite Surge
}

--- Some racial abilities have different spell IDs. For example, Dracthyr evokers
--- have a more potent wing buffet compared to other classes.
local RACIAL_SPELL_ALIASES = {
[357214] = DRACTHYR_WING_BUFFET_IDS,
[368970] = DRACTHYR_WING_BUFFET_IDS,
}

local BLIZZARD_FRAMES = {
"EssentialCooldownViewer",
"UtilityCooldownViewer",
Expand Down Expand Up @@ -287,6 +296,7 @@ constants.BLIZZARD_FRAMES = BLIZZARD_FRAMES
constants.BUILTIN_STACKS = BUILTIN_STACKS
constants.BUILTIN_STACK_ORDER = BUILTIN_STACK_ORDER
constants.RACIAL_ABILITIES = RACIAL_ABILITIES
constants.RACIAL_SPELL_ALIASES = RACIAL_SPELL_ALIASES
constants.RESOURCEBAR_CASTABLE_MAX_COLOR_SPELLS = resourceBarCastableMaxColorSpells
constants.CLASS_COLORS = CLASS_COLORS
constants.RESOURCEBAR_MAX_COLOR_TYPES = resourceBarMaxColorTypes
Expand Down
11 changes: 11 additions & 0 deletions ECM.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ function ns.CloneValue(value)
return copy
end

--- Safely calls a frame method for diagnostics and returns nil on error.
function ns.GetFrameValue(frame, methodName)
if not frame or type(frame[methodName]) ~= "function" then
return nil
end

local ok, value = pcall(frame[methodName], frame)
if ok then return value end
return nil
end

ns.Print = LibConsole:NewPrinter(function(message)
print(ns.ColorUtil.Sparkle(L["ADDON_ABRV"] .. ":") .. " " .. message)
end)
Expand Down
Loading