1. #1
    Deleted

    Weakaura: Dynamic debuff bar coloring

    Hi

    I'm setting up a multi-target progress bar for my elemental shaman's Fire Shock - for use in arena.

    It's working fine and I have the enemy player(s)' name show up on the progress bar(s) along with duration left.

    However in the heat of battle I'm often confused which player has which name.
    Because of this I'm trying to have each progress bar take the class color of the enemy player that has the debuff.

    For example if I put flame shock on the enemy team's rogue and mage I would have a yellow and a light blue progress bar show up.

    I tried doing it with a custom color in Animations using this:

    Code:
    function()
        local c = RAID_CLASS_COLORS[select(2,UnitClass("player"))]
        return c.r, c.g, c.b
    end
    However this just makes all the bars blue since I'm a shaman. If I change player to target the bar changes color depending on the player I'm currently targeting which is not what I want.

    Hope someone can help

    Thanks!

  2. #2
    Deleted
    Paste the following code into the "Custom Code" text field under "Actions -> On Show -> Custom"

    Code:
    local unitID
    
    for _,id in ipairs{"target","mouseover","focus"} do
        if UnitGUID(id) == aura_env.state.GUID then
            unitID = id
            break
        end
    end
    
    if not unitID then return end
    
    local c = RAID_CLASS_COLORS[select(2,UnitClass(unitID))]
    
    WeakAuras.GetRegion(aura_env.id,aura_env.cloneId):Color(c.r,c.g,c.b,1)
    Or adjust the the template below (currently setup for Priest):

    Code:
    duu)eaGiqPrrf5uurnlvk3sfs7cfnmvQ6yOKLrf6zQGmnvuUgkLTbu5BavnofQY5uOsRtfu3tLkhufXcbj9qqXebsxufGncs1hvHAKkuvNuHSsjntvKUjkv7ub9tQGHcsSuvu9uPMkQUkOYxvb6TkuXDvOO9k(lkmyKomrlgu1JbmzfDzvTzvYNPsJgOCALwTcL8AviMnHBJODtYVPQHdILlXZry6qxNuBxb(oiLXRcOZdeVxHc3xHsTFkhwHNMiTJmDKPJmplnz6z6z4PlV76vCqG8PNGOKKlGBXRHKwcG7GNxwx3VWUF(z49P3zAy8cF5NSRf4YLf3hn6XfVgsAIxCbf)QW0ChGsAOTteSaDWF)Ha34boWpUGNTdXITZydC56ONXwALMKxwx3VqKHSsd2VUGHzil2sl8Yz4PrP4vy4Pj1cCdpyW0Z96Ab0ceKWttQf4gEWGPlEXhEAsTa3WdgmnKbqqP4vy4Pj1cCdpyW0xsaC9QWttQf4gEWGP1epdaHKGiWNUib(WttQf4gEWGbt)hiePA(Za1GPbcpdzfE6lVcHUq6sK2b44NoA4bKw4LZWtJsXRWWttQf4gEWGPN711cOfiiHNMulWn8Gbtx8Ip80KAbUHhmyAidGGsXRWWttQf4gEWGPlsGp80KAbUHhmy6ljaUEv4Pj1cCdpyWGPlV76vCqG8PL6IeEzj9QwKbGNeI4XFMHSslbWDWZlRR7xy3p)m8OSUpnwwx3VeE65dV(6IdcKp94FY5SdD4onThAkhucqcutRvlMMulWnTM4zqa5b2RfGHwTyGpTss(PBWKtp0m6b9L5HnkuKRknGMa9KmaBNFACj)zW0knjVSUUFHidzLEUeJLwbG7GpTuisVZ0W4f(YpzxlWLllUpMwcGRxreEAcuwWWtp9ma0eONmqnnGMa9KPfEaPWOA1IJa1Qw9YxmkJB70ORYOle5wigdyrzX9ryVblPxt8(bFb2BWE5b0eWo2gD6TQrnQrn6Ezu4ulEmCJa1PD6SrV7oJk1fjJxnGjbkXN5XWncuJIG9kRAuJAuJAuJAuJQvlocuJENr3PvnQrnQrnQrnQrHV8YJyvJAuJA0xnT6RMw1Q7LrvE0OA1IJa1OiyVYOLh1fLrF10Qwv4bKcJcy07m65NmcugWC6jDZagho1HZ7XH4fpa6KJ3GtTimcjbHtA1IJa1zNhtRA1d(YJCIUijyE8JN)URx5KuxKmE1aM78MuxKmE1aMacV6hnD(WW4f(Itaml3ay6EdGj83y5SvTQvTQvTQvTQvTQvTQvTQvTQvTQvTQvTQvTAWGbdMEqgY6mhzfmb

  3. #3
    Deleted
    Works perfectly!

    Thank you very much

Posting Permissions

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