1. #1

    Weak Auras - Custom trigger to check if offcd or duration left

    Hi,

    I am trying to create a simple custom trigger to determine if Evocation is off cd OR has less than 20 secs left cooldown.

    I want it to return true when either Evocation cd has less than < 20 secs or its completely off CD. Sounds simple enough right?

    Custom trigger part:

    Code:
    function(...)
        local start, duration, enabled = GetSpellCooldown("Evocation");
        if (duration < 20) then
            return true
        end
    end
    Custom Untrigger part:

    Code:
    function(...)
        local start, duration, enabled = GetSpellCooldown("Evocation");
        if (duration > 20) then
            return true
        end
    end
    THe problem I am having is that doesnt show up when Evocation cooldown is < 20, it only shows up when is OFF COOLDOWN, aka when duration = 0

    I have it set to type status and every frame.

    Any idea whats wrong?
    Last edited by dvaz; 2016-02-03 at 03:05 AM.

  2. #2
    Duration is the time how long the cooldown is and not the time remaining.
    Evocation cd is 90 (?) seconds so it is always duration = 90. And 90 is of course never < 20.

    GetTime() - start is the remaining cd.

    Why do you want a custom function?
    Last edited by Urtgard; 2016-02-03 at 12:34 PM.

  3. #3
    Quote Originally Posted by Urtgard View Post

    Why do you want a custom function?
    I am trying to create priority rotation for my mage, and it some somewhat like this. Pseudo code:

    if (trigger1 OR trigger2) AND (trigger3 AND trigger4 AND triger5....) return true

    Basically: (if evocation is offcd OR evocationcd < 20) AND (arcane charges ==4, etc etc ), start burn.

    I can't do this with the UI because trigger activation is either on ANY or ALL, but as you can see from the example above i need a combination of both.

  4. #4
    Why you make it so complicated? Just create 2 separate Auras, one with OffCD+Charges and the other with <20secCD+Charges. Put them into separate layers and voila.

Posting Permissions

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