WeakAuras

GTFO integration (via hooking)

  • 4 posts
    #1 Jun 15, 2011 at 18:41 UTC - 0 likes

    As asked here: http://wow.curse.com/downloads/wow-addons/details/weakauras.aspx#964737

    Quote:

    hi there very nice addon :) , say i was wondering one thing you ever think of adding support for GTFO ? ( http://wow.curse.com/downloads/wow-addons/details/gtfo.aspx ) , i noticed power aura being able to show visual warnings when triggered by GTFO , would be interesting if yours can aswell since we i find power to be kinda buggy lol and ofc yours has more interesting features in my opinion :)

    Here is the display string (Import this):

    • For GFTO 4.7 and above*
    dq0FeaGiuvJsLYPurnluPUfi2LkXWuP6yqKwgaEgKyAOcxtrSnsL(MkW4GiohPcVtfK7brzGKk6Ge1cjsQhsKWeHQUOI0gHWhHkJeqoPk0kvuVesAMquDtaLDcP6NGAOOIwkGQNI0uj0xrvoRkOMlQK9k8xenyPdRWIjs1JjLjdLllAZe4ZqkJwL0Pry1ej61QiZgKUnPQDJYVvYWjOLtYZbA6Q66k12jIVtKKXtKY5bO9tDG0qmO6dkwqXcXGQTGUuHyGoabcoMaasbq37i5oaOCGooqhaecGmzsGokbcDrzcsUdak3VJckCO7eKaqiaYKjXhuPdnzyaBHLbvgp(G(P0(Tkd6r2NkbdTKlzmSfdKlE54K8wna5IZLuLk5TAacSeJyWL8wna5sERg6guvIgXIjcOWmOFkTFRYGoWWiEIfBaL8veOHwQadX4d6GrOF8elwigu9dcwig0hqHzqfQsW8dQqvcMFqfUHcMXhFqFfbAOLQqmOpGcZGQTb)L(GUzPKK9bDS)vq12G)sp5vcSmOpH(elOyB14jwSGojOPKK9bvkUoExGLGGd0YGQTb)LEYhqHzqtjj7dAkjzpyq5jtItebmjqWWO6kJhpm6Kihwg)u8UCIC5dpf4KtrxCkWpIoosEWah54dQ2g8x6dQGnt7jwm3BPKK9C7E5YLZE2111fce3JmI396ADYZUUUUecCzR3LNmjoreWKabdJ6u8U)1K5zxxxxxxxxEYK4eratcemmQtX7Im3xTtp766666666zxxxxxxxxiqC5uLU4era7YXLdCDD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dddHcinSxsUjgmyWGbdgmikKrCevmMEyyiuaPHomS1wAIbdgmyWGbdMyWGbdgmyWWL58gAo2QPKgFu4(IJOIXuoTZGF2449l2GKgFCzNCHp0Y6sbo9geLNBHT6bvOF8Wlip5lQW9ffYioIkgtpmme6xSHdTSUuGtFrnKCC6nXGbdgsoUjgmyWGjgmyWq3Ug6nN3mmEOrlXnXGbdgyLyiLN81qhDyOVOqgXruXy6HHHqFd7LKBIbdgmyWGbd1CBvUHT2stmyWGHKJBsYXnXetmXetmXetmXetmXetmXetmXetmXetmXet0FSHUtzm7GaP(P8KV6p2q3PmMlS4P(lRSexx9zX1xCevmdizrdq7mq)6CpBQfrx9r1VkW9y6lxhkqjXJRRQa
    

    Important: Don't set ANY load conditions on this display (other than maybe class)!

    Details, if one wants to create the trigger by yourself:

    • Trigger: Custom
    • Event Type: Event
    • Event(s): WA_GTFO_HOOK ADDON_LOADED PLAYER_ENTERING_WORLD
    • Custom Trigger:
    function (event, ...)
        -- Init hook
        if not WA_GTFO_HOOKED then
            WA_GTFO_HOOKED = true
    
            -- Pre GTFO 4.7        
            --hooksecurefunc("GTFO_PlaySound", function(alertId) WeakAuras.ScanEvents("WA_GTFO_HOOK", alertId); end)
            -- Post GTFO 4.7
            hooksecurefunc("GTFO_DisplayAura", function(alertId) WeakAuras.ScanEvents("WA_GTFO_HOOK", alertId); end)
        end
        
        -- Hook called
        if event == "WA_GTFO_HOOK" then
            return true
        end
    end
    
    • Hide: Timed (x-seconds)

    EDIT: This will display one WA display for every GTFO alert, if one wants different for different damage type, replace Custom trigger with:

    function (event, ...)
        -- Init hook
        if not WA_GTFO_HOOKED then
            WA_GTFO_HOOKED = true
            
            -- Pre GTFO 4.7        
            --hooksecurefunc("GTFO_PlaySound", function(alertId) WeakAuras.ScanEvents("WA_GTFO_HOOK", alertId); end)
            -- Post GTFO 4.7
            hooksecurefunc("GTFO_DisplayAura", function(alertId) WeakAuras.ScanEvents("WA_GTFO_HOOK", alertId); end)
        end
        
        -- Hook called
        if event == "WA_GTFO_HOOK" then
            local alertId = select(1, ...)
            if alertId == <ALERT ID HERE> then
                    return true
            end
        end
    end
    

    See below to find out correct alertId

    Last edited Jun 18, 2011 by CommanderSirow
    #2 Jun 16, 2011 at 10:15 UTC - 0 likes

    Thanks for Zensunim for exlpaining this, alertId isn't unique number, but has special meaning

    Quote from Zensunim:

    0: None - ignore 1: High - Loud buzzer 2: Low - Ping 3: Fail - Double ping 4: Friendly Fire - Soft buzzer

    #3 Jun 18, 2011 at 11:31 UTC - 0 likes

    GTFO 4.7 introduces a new hook-friendly function for this purpose: GTFO_DisplayAura(alertTypeID)

    Values for alertTypeID (integer):
    0: None - ignore
    1: High - Loud buzzer
    2: Low - Ping
    3: Fail - Double ping
    4: Friendly Fire - Soft buzzer

    Last edited Jun 20, 2011 by Zensunim
    #4 Jan 05, 2013 at 18:30 UTC - 0 likes

    It looks like the GTFO code updated to be a bit more efficient - or, at least, not to try and trigger that aura display function without actually having the addon loaded. I ended up submitting a ticket to add a custom hook to enable this feature for myself.

    It looks like the PowerAuras code actually includes a specific event handling set of code for this; if GTFO merge that hook, it might be nice to consider adding some support for custom events that doesn't require writing a lua filter function.

    In any case, once the patch is applied, this works for me:

    dOdlcaWsrO2Ls1RLs1CvvnBP4MkLomvDBkzBIs7uuzVKDtX(rfJsvj)vvACsWYufdveyWOsdxIoOcoLiOJrPCorkluvPUoklwKy5Q8qkv1tbpwHEovMOsXuvYKLQPdDAbFtvXZKK3rPInkH(SKAZsjBhv1hfr(QiQPjQ67uQYifHmmfz0IKgVukNKsLULivxtrDEuLlJ8trXVfAztlbwc6c6Aj4O6q0S4vscqQnKDKGuAitFBStcg2SrasTHSJeyxdsxl)i9p07rJ7pzY3(a78U)eeThDdSZ72s9G)FGDE3)a78zf479agIgFZlEH6A6CAjuG3eS8yiA0sGLpy0saYRKeuEKJqbLh5iuqjRXrcfki0fK0QygoC3eCLnEEcgJnXtlL7rfZp)y7j7uHPNQpP9jTk1k95zLRsfZwnxy6PAAQQkF25cpQv6ZZcfyywRluxtNt5Sj4IOhjLIGMOVRLGl2qAjWI1GbTekuOa8c110PLaKxjjyK5WOLGrMdJwViVssaXNmOGrMdJwVPg6KamyrDbD25Xq0iOsaXNmOa7NQh5WDl5C(AsaZq8jdkWZWOGrMdJwcAXmJyiA(AFFpHC4EeYodhU4Xi7WHlz6ci(KbDcsE4nPvXmVjktMelG5OxMjG6BHcf4eyBp)(N9cc4RC2Ypnjuca
    
  • 4 posts

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