WeakAuras

Early Frost

  • 10 posts
    #1 Sep 06, 2011 at 23:30 UTC - 0 likes

    Frost Mages have a talent called Early Frost that has a 15 second internal cooldown that is triggered whenever Frostbolt is cast. There is no aura to show us when this cooldown is going to end, though. Is there a way to set up a trigger in WeakAuras that works like this?

    Basically, a 15 second timer should start when a Frostbolt cast begins. Then, it counts down to 0 and cannot be restarted until after it has reached zero. Then, if another Frostbolt cast begins, it starts the countdown from 15 to 0 again.

    #2 Sep 07, 2011 at 09:35 UTC - 0 likes

    My first idea would be to use a combat log event unfiltered trigger: http://www.wowace.com/addons/weakauras/forum/23256-annoucing-target-cast-for-aura-that-has-multiple-triggers/ + timed on-hide (15sec)

    If the trigger "refreshes" when casting Frost Bolts instead of expiring add some code toe the OnSHow/OnHide actions:

    OnShow code:

    WA_EarlyFrost_Simpleton = true
    

    OnHide code:

    WA_EarlyFrost_Simpleton = false
    

    And then use this as trigger instead:

    function(event, timestamp, message, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
      -- Check spell cast
      if message == "SPELL_CAST_SUCCESS" then
        -- Additional arguments
        local spellId, spellName, spellSchool = ...
        
        -- Compare caster and spell
        if sourceName == "<YOUR NAME HERE>" and (spellName == "Early Frost" or spellId == 83050) then
          -- Show display?
          if not WA_EarlyFrost_Simpleton then
            return true
          end
        end
      end
    end
    
    #3 Sep 07, 2011 at 09:48 UTC - 0 likes

    Edit: Just took a look at some EarlyFrost addon. If you want to be more accurate you can also use the following trigger:

    • Type: Event based trigger
    • Events: SPELL_ACTIVATION_OVERLAY_GLOW_SHOW, SPELL_ACTIVATION_OVERLAY_GLOW_HIDE, UNIT_SPELLCAST_START
    • Hide: Timed, 15sec
    • Show:
    function (event, ...)
    	-- Easy Frost overlay active
    	if event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then 
    		-- Additional arguments
            	local spellId = ...
    
    		-- Check Easy Frost overlay
    		if spellId and spellId == 116 then 
    			WA_EasyFrost_Overlay = true
    		end
    	end
    
    --[[
    	-- Easy Frost overlay active
    	if event == "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE" then 
    		-- Additional arguments
            	local spellId = ...
    
    		-- Check Easy Frost overlay
    		if spellId  and spellId == 116 then 
    			WA_EasyFrost_Overlay = false
    		end
    	end
    ]]
    
    	-- Casting spell
    	if event == "UNIT_SPELLCAST_START" then
    		-- Additional arguments
    		local unitId, spellName , spellRank , spellLineId, spellId = ...
    
    		-- Check spell cast (Frost Bolt) by Player (and is a single instance)
    		if not WA_EarlyFrost_Simpleton and WA_EasyFrost_Overlay and unitId and unitId == "player" and spellId and spellId == 116 then
    			-- Glow disabled
    			WA_EasyFrost_Overlay = false
    
    			-- Show
    			return true
    		end
    	end
    end
    

    PS: Still needs the OnShow/OnHide code! ;)

    Last edited Sep 16, 2011 by CommanderSirow
    #4 Sep 15, 2011 at 03:42 UTC - 0 likes

    I've played around with different settings, but still have no idea how to set this up.

    Here's the Lua export of my latest attempt:

    {
        ["fontSize"] = 12,
        ["displayStacks"] = "%s",
        ["color"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 1,
        },
        ["regionType"] = "icon",
        ["yOffset"] = 0,
        ["anchorPoint"] = "CENTER",
        ["stacksPoint"] = "BOTTOMRIGHT",
        ["untrigger"] = {
        },
        ["parent"] = "Procs",
        ["customTextUpdate"] = "update",
        ["actions"] = {
            ["start"] = {
                ["do_custom"] = true,
                ["custom"] = "WA_EarlyFrost_Simpleton = true",
            },
            ["finish"] = {
                ["do_custom"] = true,
                ["custom"] = "WA_EarlyFrost_Simpleton = false",
            },
        },
        ["icon"] = true,
        ["trigger"] = {
            ["itemName"] = 0,
            ["duration"] = "15",
            ["names"] = {
            },
            ["debuffType"] = "HELPFUL",
            ["type"] = "custom",
            ["unit"] = "player",
            ["unevent"] = "timed",
            ["custom_hide"] = "timed",
            ["spellName"] = 0,
            ["event"] = "Combat Log",
            ["use_itemName"] = true,
            ["subeventSuffix"] = "_CAST_START",
            ["use_spellName"] = true,
            ["events"] = "UNIT_SPELLCAST_START",
            ["use_sourceunit"] = false,
            ["custom_type"] = "event",
            ["custom"] = "function (event, ...)\n    if event == \"UNIT_SPELLCAST_START\" then\n        local unitId, spellName , spellRank , spellLineId, spellId = ...\n        if not WA_EarlyFrost_Simpleton and IsSpellOverlayed(116) and unitId and unitId == \"player\" and spellId and spellId == 116 then\n            return true\n        end\n    end\nend",
            ["use_unit"] = true,
            ["subeventPrefix"] = "SPELL",
        },
        ["stacksContainment"] = "INSIDE",
        ["zoom"] = 0,
        ["auto"] = true,
        ["animation"] = {
            ["start"] = {
                ["duration_type"] = "seconds",
                ["type"] = "none",
            },
            ["main"] = {
                ["duration_type"] = "seconds",
                ["type"] = "none",
            },
            ["finish"] = {
                ["duration_type"] = "seconds",
                ["type"] = "none",
            },
        },
        ["id"] = "Early Frost",
        ["width"] = 64,
        ["frameStrata"] = 1,
        ["stickyDuration"] = false,
        ["xOffset"] = 0,
        ["font"] = "Friz Quadrata TT",
        ["inverse"] = false,
        ["selfPoint"] = "CENTER",
        ["height"] = 64,
        ["displayIcon"] = "Interface\\Icons\\Spell_Frost_FrostBolt02",
        ["load"] = {
            ["class"] = {
                ["multi"] = {
                },
            },
            ["spec"] = {
                ["multi"] = {
                },
            },
            ["size"] = {
                ["multi"] = {
                },
            },
        },
        ["textColor"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 1,
        },
    }
    

    I'm not exactly sure what I'm doing wrong. Of course, the custom events are a bit new for me with WeakAuras. It's good to know that this is possible, but any help in setting it up would be great. Just a description of what code goes in which tabs, etc.

    #5 Sep 16, 2011 at 14:35 UTC - 0 likes

    I edited my last post, could you try if this works now? I tried to test this using my Priest (Flash Heal + Surge of Light). But since this makes my Flash Heal an instant (and Surge of light can expire before being used) this made the trigger more complicated.

    The above trigger should work now, might have a drawback though (which is fixable but would make the trigger a bit more complicated): If the FrostBolt that should trigger the early frost internal CD is kicked/interrupted the trigger will show the display, but actually Early Frost shouldn't be on internal CD.

    PS: The reason why I removed the SPELL_ACTIVATION_OVERLAY_GLOW_HIDE part is because the overlay gets actually hidden before the casts starts (I still would be able to track this with a workaround), but since unlike my Surge of Light (which can be "ended" when it reaches its duration) your Early Frost can not "run out", there is no other event that can start the internal CD. :)

    Last edited Sep 16, 2011 by CommanderSirow
    #6 Sep 17, 2011 at 23:43 UTC - 0 likes

    I tried making those changes, but the icon still doesn't show up. I'll show how I have it set up so that we can validate that I'm even setting it up correctly. A screenshot of the tabs can be found at i.imgur.com/9MQqC.jpg.

    • weakauras.jpg
    #7 Sep 22, 2011 at 00:39 UTC - 0 likes

    After some more testing, it turns out that it is working!

    However, it's not showing the timer visibly (as a circular overlay). Should I be using a different type of display?

    #8 Sep 22, 2011 at 08:18 UTC - 0 likes

    You need to enable "Cooldown" in the display tab to show the circular icon overlay. ;)

    Btw you might want to update to the latest rev. (currently r181), they are quite stable most of the time and include a few new features before "official" release. ;)

    #9 Sep 22, 2011 at 22:44 UTC - 0 likes

    You need to enable "Cooldown" in the display tab to show the circular icon overlay.

    Ah. I assumed "Cooldown" would be based on the actual Frostbolt cooldown. But in hindsight, that wouldn't even make sense since the addon has no actual association with Frostbolt for this display.

    Btw you might want to update to the latest rev. (currently r181), they are quite stable most of the time and include a few new features before "official" release.

    I believe it. This addon continually shows how powerful it is and I advertise it every chance that I get (basically whenever someone advocates PowerAuras). Thank you guys for making this addon superior and keeping it improved!

    #10 Feb 20, 2012 at 06:34 UTC - 0 likes

    Here's an import for the same aura, but as a progress bar.

    {
        ["textFlags"] = "None",
        ["stacksSize"] = 12,
        ["borderBackdrop"] = "Blizzard Tooltip",
        ["xOffset"] = 0,
        ["stacksFlags"] = "None",
        ["yOffset"] = -32,
        ["anchorPoint"] = "CENTER",
        ["borderColor"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 0.5,
        },
        ["customTextUpdate"] = "update",
        ["rotateText"] = "NONE",
        ["icon"] = false,
        ["selfPoint"] = "TOP",
        ["trigger"] = {
            ["type"] = "custom",
            ["subeventSuffix"] = "_CAST_START",
            ["duration"] = "15",
            ["event"] = "Health",
            ["unit"] = "player",
            ["debuffType"] = "HELPFUL",
            ["custom"] = "function(event, ...)\n    -- Additional arguments\n    local spellId = ...\n    \n    -- Check Early Frost overlay\n    if spellId and spellId == 116 then \n        WA_EarlyFrost = GetTime()\n        return true\n    end\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
            ["names"] = {
            },
            ["subeventPrefix"] = "SPELL",
            ["custom_type"] = "event",
            ["events"] = "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE",
            ["custom_hide"] = "timed",
        },
        ["text"] = true,
        ["barColor"] = {
            [1] = 0,
            [2] = 0.50196078431373,
            [3] = 1,
            [4] = 1,
        },
        ["desaturate"] = false,
        ["parent"] = "[Mage] Frost PvE",
        ["stickyDuration"] = false,
        ["barInFront"] = true,
        ["timer"] = true,
        ["timerFlags"] = "None",
        ["load"] = {
            ["use_class"] = true,
            ["role"] = {
                ["multi"] = {
                },
            },
            ["use_level"] = false,
            ["use_spec"] = true,
            ["spec"] = {
                ["single"] = 3,
                ["multi"] = {
                },
            },
            ["class"] = {
                ["single"] = "MAGE",
                ["multi"] = {
                },
            },
            ["size"] = {
                ["multi"] = {
                },
            },
        },
        ["animation"] = {
            ["start"] = {
                ["type"] = "none",
                ["duration_type"] = "seconds",
            },
            ["main"] = {
                ["type"] = "none",
                ["duration_type"] = "seconds",
            },
            ["finish"] = {
                ["type"] = "none",
                ["duration_type"] = "seconds",
            },
        },
        ["backdropColor"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 0.5,
        },
        ["height"] = 16,
        ["numTriggers"] = 1,
        ["timerColor"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 1,
        },
        ["textSize"] = 12,
        ["stacksColor"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 1,
        },
        ["border"] = false,
        ["borderEdge"] = "None",
        ["regionType"] = "aurabar",
        ["stacks"] = true,
        ["displayTextRight"] = "%p",
        ["icon_side"] = "LEFT",
        ["frameStrata"] = 1,
        ["borderOffset"] = 5,
        ["timerSize"] = 12,
        ["texture"] = "Minimalist",
        ["textFont"] = "Friz Quadrata TT",
        ["stacksFont"] = "Friz Quadrata TT",
        ["auto"] = true,
        ["backgroundColor"] = {
            [1] = 0,
            [2] = 0,
            [3] = 0,
            [4] = 0.5,
        },
        ["id"] = "Early Frost ICD",
        ["timerFont"] = "Friz Quadrata TT",
        ["alpha"] = 1,
        ["width"] = 192,
        ["borderSize"] = 16,
        ["borderInset"] = 11,
        ["inverse"] = false,
        ["displayTextLeft"] = "Early Frost",
        ["orientation"] = "HORIZONTAL",
        ["actions"] = {
            ["start"] = {
            },
            ["finish"] = {
            },
        },
        ["untrigger"] = {
        },
        ["textColor"] = {
            [1] = 1,
            [2] = 1,
            [3] = 1,
            [4] = 1,
        },
    }
    
  • 10 posts

You must login to post a comment. Don't have an account? Register to get one!