#WA For interrupt cast that doesn't interrupt anything
22 messages · Page 1 of 1 (latest)
it's not hard if you care only about your target
more complicated if you want to handle mouseover/focus/boss macros
yeah just target would be great, i tried using multiple triggers, 1 for casting interrupt, 1 for interrupt success, but couldn't figure out logic for if 1 true and 2 false then show WA, so then tried some lua, but i'm not great at it and every source i can find talks about using combat_log_event_unfiltered but that's deprecated so, figured i'd ask for help
Required for Activation = custom
function(trigger)
return trigger[1] and (trigger[2] or trigger[3])
end
https://github.com/WeakAuras/WeakAuras2/wiki/Aura-Activation-and-Deactivation#custom
a custom TSU version wouldn't be complicated and more flexible
events: CLEU:SPELL_CAST_SUCCESS
function(states, event, ...)
aura_env.interrupts = aura_env.interrupts or {
[123] = true, -- fix spellIds
[456] = true
}
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
local timestamp, subevent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellId = ...
if aura_env.interrupts[spellId]
and sourceGUID == UnitGUID("player")
then
local unit = UnitTokenFromGUID(destGUID)
if not unit then return end
local castNotInterruptable = select(8, UnitCastingInfo(unit))
local channelNotInterruptable = select(7, UnitChannelInfo(unit))
if (castNotInterruptable == nil and channelNotInterruptable == nil) -- not casting
or castNotInterruptable == true -- cast not interruptible
or channelNotInterruptable == true -- channel not interruptible
then
local duration = 2
states:Update("", {
duration = duration,
expirationTime = GetTime() + duration,
progressType = "timed",
autoHide = true,
icon = C_Spell.GetSpellTexture(spellId),
unit = unit
})
end
end
end
end
well it wouldn't be that complicated to make it work for any unit from this..
ok made it work with any unit
does this look right?
you're my hero
hopefuly the api still consider the unit as casting when then spell_cast_success event happen
afaik it does, but check yourself (i'm doing all this while not in game)
so in theory if i wanted to make this work for multiple classes that line at the top where it shows the spellId for the interrupt i could just add multiple lines right?
yes replace the numbers with all spellids you would use
and just each line with [###] = true,
only targeted spells, aoe wouldn't work
right that makes sense
the unit field let you use in display's tab text %unit with the unit formatter
maybe you want add fields to indicate if it was not casting, or if it wasn't interruptible
then if it was a boolean you can set a custom variable (next field after the custom trigger) to be able to use it with conditions