-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Currently, when using the "Casting" status trigger, even mounting up toggles the alpha of the HUD. While some people might not mind this, I would love it if you could add a "Casting (Hurtful)" status trigger. I've already got this working locally by tweaking the Statuses/Casting.lua:OnEvent (line 8) with the following:
local function OnEvent(_, event)
local isCasting = false
local spell, _, _, _, _, _, _, _, spellID = UnitCastingInfo("player")
local isHarmfulSpell = false
if spell then
isHarmfulSpell = C_Spell.IsSpellHarmful(spellID)
end
if event == "UNIT_SPELLCAST_START" then
if isHarmfulSpell then
isCasting = true
end
elseif event == "UNIT_SPELLCAST_STOP" then
isCasting = false
elseif event == "UNIT_SPELLCAST_CHANNEL_START" then
if isHarmfulSpell then
isCasting = true
end
elseif event == "UNIT_SPELLCAST_CHANNEL_STOP" then
isCasting = false
end
CR:Fire("PLAYER_CASTING_UPDATE", isCasting, eventDelay)
addonTable.events["PLAYER_CASTING_UPDATE"] = isCasting
endThis does the job, and it only shows up while casting damaging (hurtful) attacks. It's shoddy code, so you might want to look into doing it differently.
Metadata
Metadata
Assignees
Labels
No labels