fix(Interrupt): correct destFlags arg position; guard InterfaceOptionsFrame_OpenToCategory
modules/Interrupt.lua: the COMBAT_LOG_EVENT_UNFILTERED handler had destFlags at
arg position 9 (pre-RaidFlags layout); on 3.3.5 the signature is
(event, ts, subevent, hideCaster, srcGUID, srcName, srcFlags, srcRaidFlags,
destGUID, destName, destFlags, destRaidFlags, spellId, spellName, spellSchool, ...).
destFlags is the 11th function parameter. Rewrite the parameter list with
all named args through spellSchool so the 0x511 (player + raid + me) bitmask
check on destFlags fires correctly and the SPELL_INTERRUPT path actually
recolors Player.Bar on the local player.
Config.lua: ChatCommand() called InterfaceOptionsFrame_OpenToCategory()
unconditionally. That global is nil on CoA's 3.3.5 client, so /quartz and /q3
with no arg threw 'attempt to call global ... (a nil value)'. Wrap with a
presence check and fall back to AceConfigDialog-3.0:Open("Quartz3").
luac -p clean on both files. libs/ untouched (coa-ace3-managed).
This commit is contained in:
+6
-2
@@ -193,8 +193,12 @@ end
|
||||
|
||||
function Quartz3:ChatCommand(input)
|
||||
if not input or input:trim() == "" then
|
||||
InterfaceOptionsFrame_OpenToCategory(Quartz3.optFrames.Profiles)
|
||||
InterfaceOptionsFrame_OpenToCategory(Quartz3.optFrames.Quartz3)
|
||||
if InterfaceOptionsFrame_OpenToCategory then
|
||||
InterfaceOptionsFrame_OpenToCategory(Quartz3.optFrames.Profiles)
|
||||
InterfaceOptionsFrame_OpenToCategory(Quartz3.optFrames.Quartz3)
|
||||
else
|
||||
LibStub("AceConfigDialog-3.0"):Open("Quartz3")
|
||||
end
|
||||
else
|
||||
LibStub("AceConfigCmd-3.0").HandleCommand(Quartz3, "quartz", "Quartz3", input)
|
||||
end
|
||||
|
||||
@@ -53,7 +53,15 @@ function Interrupt:ApplySettings()
|
||||
db = self.db.profile
|
||||
end
|
||||
|
||||
function Interrupt:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, combatEvent, _, sourceName, _, _, _, destFlags)
|
||||
-- 3.3.5 CLEU signature:
|
||||
-- (event, timestamp, subevent, hideCaster,
|
||||
-- srcGUID, srcName, srcFlags, srcRaidFlags,
|
||||
-- destGUID, destName, destFlags, destRaidFlags,
|
||||
-- spellId, spellName, spellSchool, extraSpellId, extraSpellName, extraSpellSchool)
|
||||
function Interrupt:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, combatEvent, hideCaster,
|
||||
srcGUID, sourceName, srcFlags, srcRaidFlags,
|
||||
destGUID, destName, destFlags, destRaidFlags,
|
||||
spellId, spellName, spellSchool)
|
||||
if combatEvent == "SPELL_INTERRUPT" and destFlags == 0x511 then
|
||||
Player.Bar.Text:SetFormattedText(L["INTERRUPTED (%s)"], (sourceName or UNKNOWN):upper())
|
||||
Player.Bar.Bar:SetStatusBarColor(unpack(db.interruptcolor))
|
||||
|
||||
Reference in New Issue
Block a user