#WA For interrupt cast that doesn't interrupt anything

22 messages · Page 1 of 1 (latest)

rocky dew
#

I'm trying to create a weak aura that only triggers if I cast interrupt and nothing is interrupted. Any help appreciated

dim tulip
#

it's not hard if you care only about your target

#

more complicated if you want to handle mouseover/focus/boss macros

rocky dew
#

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

primal grailBOT
dim tulip
#

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

rocky dew
#

does this look right?

dim tulip
#

only 1 trigger with this version

#

and type is not custom but Trigger State Updater

rocky dew
#

you're my hero

dim tulip
#

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)

rocky dew
#

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?

dim tulip
#

yes replace the numbers with all spellids you would use

rocky dew
#

and just each line with [###] = true,

dim tulip
#

only targeted spells, aoe wouldn't work

rocky dew
#

right that makes sense

dim tulip
#

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