1. #1

    WeakAura (custom?) trigger for "within the queued cast latency period"

    G'day. I have been trying to figure out how to get a WeakAura trigger to work for a while, and just can't manage it, which annoys me.

    I would like to throw up an aura that fades in as I close on the latency of "next cast can be queued"; I fix that at 400ms, so I am fine with hard-coding it or just reading the CVar for the latency override rather than doing the complex "real cast latency" math.

    What I can't figure out is how to have this happen for both instants (show when I am 400ms away from the GCD ending) and cast-time spells (show when I am 400ms away from the cast ending, even though the GCD finish three seconds earlier.)

    As far as I can tell this does require a custom trigger, since I couldn't figure out how to use the status triggers to catch "x ms before the end of" on GCD or casting; otherwise I would have done a "require both" two trigger aura and just put both in place. So if you can tell me how to do that, I would be happy.

  2. #2
    Only tested this a little bit but works fine so far. Use custom/event type.

    Events: SPELL_UPDATE_COOLDOWN,UNIT_SPELLCAST_START,UNIT_SPELLCAST_STOP,UNIT_SPELLCAST_INTERRUPTED, UNIT_SPELLCAST_DELAYED

    Custom Trigger:
    Code:
    function(event,...)
        local TOLERANCE=0.400
        --local TOLERANCE=GetCVar("maxSpellStartRecoveryoffset")/1000
        
        if event=="SPELL_UPDATE_COOLDOWN" then
        elseif event=="UNIT_SPELLCAST_START" or event=="UNIT_SPELLCAST_DELAYED" then
            if ...~="player" then return end
            local name,_,text,icon,startTime,expTime=UnitCastingInfo("player")
            WA_castexp=expTime and (expTime/1000-TOLERANCE) or 0
            WA_castdur=expTime and (WA_castexp-(startTime/1000)) or 0
        elseif event=="UNIT_SPELLCAST_STOP" or event=="UNIT_SPELLCAST_INTERRUPTED" then
            if ...~="player" then return end
            WA_castexp=0
            WA_castdur=0
        end
        local startTime,duration=GetSpellCooldown(61304)
        WA_gcdexp=startTime+duration-TOLERANCE
        WA_gcddur=duration-TOLERANCE
        WA_castexp=WA_castexp or 0
        WA_castdur=WA_castdur or 0
        local now=GetTime()
        return WA_gcdexp-now>0 or WA_castexp-now>0
    end
    Hide: Custom
    Custom Untrigger:
    Code:
    function(event,...)
        if event=="SPELL_UPDATE_COOLDOWN" then
            return true
        elseif event=="UNIT_SPELLCAST_START" or event=="UNIT_SPELLCAST_DELAYED" then
            return ...=="player"
        elseif event=="UNIT_SPELLCAST_STOP" or event=="UNIT_SPELLCAST_INTERRUPTED" then
            return ...=="player"
        end
    end
    Duration Info:
    Code:
    function()
        if WA_gcdexp>WA_castexp then
            return WA_gcddur,WA_gcdexp
        else
            return WA_castdur,WA_castexp
        end
    end
    Last edited by pnutbutter; 2014-04-17 at 05:03 AM.

  3. #3
    Thanks -- finally got time to test this out; it is almost what I want -- it triggers during the cast, rather than during the "safe to cast at the end" phase, but that is easy to adapt now that I have the pattern. Basically, I wanted it to trigger between 400ms and 0ms from the "end of cast or GCD", rather than before that, so that I have a visual "now is the right time to hit another button" hint. Easy fix though.

  4. #4
    Deleted
    I really want the same trigger "between 400ms and 0ms from the end of cast or GCD". I tried now for nearly four hours to adapt the posted one and i still have no idea how to adapt it. SlippyCheeze can you please post how you adapted it? that would be great!

    - - - Updated - - -

    or can any one else help me please? unfortunately i can't PM SlippyCheeze until i have 10 posts and he was already online today without a response...

  5. #5
    Sorry, I checked, and I don't have a backup copy of that around. Sorry. Turns out that this didn't work for me, so I ditched the idea most of a year ago.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •