1. #1

    [WeakAuras] Shield Barrier absorb ammount.

    Greetings, I am using a WeakAuras icon to display the ammount my shield barrier will absorb it calculates it fine, until the other night when I recieved my 4pc (flat 5% increase to Shield Barrier absorb). Below I have attatched the string that I use for my aura, my question is, is there any way to incorporate those 5% in to that string? I'm no code wizard so I thought to ask here, any help is appreciated.

    Code:
    dqe5eaGiLWLGqAukLtPIwLQOxPiQzbvUfvODru1VueYWOsoguSmQQEgrPPrf11Oc2gKQVPOY4iQCofv9ovH7bPSpfbDqIyHQWdjkQjQiuxurKnQiWjHGvsKUjK0oHQ(PIsdfc1sHONkAQaUkvKVcHyUksTxK)cLgmPdtyXuvEmqtwjDzkBwsFwPA0kkoTeVMOWSf62Qs7wWVvy4uLLRsph00L66QQTRe9DiX4vKCEQuRNOi7h1egcGYcLieA7wfG20iaocWPlHLyHZuS4kwxZrjKsmY7S8ZjVCu(s5kLReaLGFypEbSPAkR)ayxgHTtwkRSYkRXbOiYQpb0WXQ3aE8RvCSgS9JFTYkAS6uO0s6wakdepqXUBl8Ic32DX5dwkRSYkRXbOiYQvRgyxwASIgR(eqJ1jZQ3aE8RvwNmRbB)4xRpyPSYkRSghGIiR(eqlbqIJvyl6eajow9gWJFTMaiXXAW2p(1AcGKv0y1PqPZw0Bl8Ic32DbomNpyPSYkRSghGIiR(eqlbKGkowHTOtajOIJvVb84xRjGeuXXAW2p(1AcibvwrJvNcLoBrVTWlkCB3f4K98blLvwzL14auez1BGIDzfnwDkuAepqXUBl8Ic32DX5dwkRSYkRLkRBEduSlRtiASIURtw7zSalLvwzLvwzLvwVw)VbwRXX4U9kMAZ)ZnRwnWUS0CCd2Iobq(0)5jowHTOtajO(0V8oCE(GLYkRSYQfHglLvwzLvwzLvwVw)VbwRXX4U9kMAZ)ZnRwnWUS0CCd2Iobq(0)5jowHTOtajO(0V8oC(CZBGIDNi0DDE(GLYkRSYQfwzPwyLs3ZwRqRj8okl6oqzFl772LaOSD7zucBr)Hu(d2sl0uk(9GsBPfAkLa2LrGvNGcFrJYp0W(dLMoO8dnSqplgXlEn6GsONfJ4fVgHhdg)UCwokb)WE8IDMYQrzxETvQPmoeReaLFOHnylTl5JsONbsauclH9Or4LLAk)qdlyuaH0bL3r0iakF)XUqautnLFOHf6zG0bLGrbesauclH9OrjIibjseMfjLV)yxiakrejirIWSiPdQPMYp0WcoE9jA6GYp0WgeVg5JAkRJqNfzYi8yCGY1c0lkCNTaugqkruqkV2EzeaC7zuwahbkNA2AfAnH3r)ZJoL)qFl772LaOe6zXiEXRr4XGXVlNLJAkfRRLUmcIi2(w23TlKaOMsukR9m0emVlxZHro0Lf95Lt25X4YbQ6OZZrzzLY8qCPm8FbUL9D7cj8yOCTa9Ic3iaocuIqOTBvaAtJa4iaNwIVsS0UXoXw1cRucBbOmGiEucnLY8KWdmjKut5scpgND5IAIa

  2. #2
    Code:
        if (power >= 60) then
            return floor((max(2*(effective-(statSTR*2)), statSTAM*2.5))*1.05);
        else
            return floor((max(2*(effective-(statSTR*2)), statSTAM*2.5)*(power/60))*1.05);
        end
    Explanation:
    You need to modify the function to multiplicate the result with 1.05 for the extra 5% from the set bonus.

    Regards,
    mikar

    P.S.: Somehow this is only accurate for 60+ rage. The formula for 20-59 rage is usually off by 200-1000.
    Last edited by zora; 2013-03-04 at 03:01 PM.
    Shootz' Law (Cya Godwin)
    As an MMO-Champion discussion grows longer, the probability of a comparison involving 25s and 10s approaches 1. In other words, Shootz observed that, given enough time, in any MMO-Champion discussion—regardless of topic or scope—someone inevitably makes a comparison between 25s and 10s.

  3. #3
    Quote Originally Posted by zora View Post
    P.S.: Somehow this is only accurate for 60+ rage. The formula for 20-59 rage is usually off by 200-1000.
    Could be wrong, but that sounds like the power variable isn't an integer in either your calculation or (less likely) the game's internal calculations. Try using some kind of either round or floor function and see if it gets better.

  4. #4
    Quote Originally Posted by niai View Post
    Could be wrong, but that sounds like the power variable isn't an integer in either your calculation or (less likely) the game's internal calculations. Try using some kind of either round or floor function and see if it gets better.
    Yep, rage actually have decimals. I learned that too while making a Shield Barrier aura.

  5. #5
    What would i have to change in either of these functions to account for decimals in the UnitPower?

    Code:
    function ()
        local curRage = UnitPower("player", "rage")
        if curRage >= 20 then
            local _, STR, _, _ = UnitStat("player", 1)
            local _, STA, _, _ = UnitStat("player", 3)
            local APbase, APposBuff, APnegBuff = UnitAttackPower("player")
            local APfinal = APbase + APposBuff + APnegBuff
            local sbMaxRage = 60
            
            return floor(1.05*(max((2*(APfinal - STR * 2)), ((2.5 * STA)*(min(curRage,60)/sbMaxRage)))))
        else
            return 0
        end  
    end
    Code:
    function()
        local base, posBuff, negBuff = UnitAttackPower("player");
        local effective = base + posBuff + negBuff;
        local baseSTR, statSTR, posBuffSTR, negBuffSTR = UnitStat("player",1);
        local baseSTAM, statSTAM, posBuffSTAM, negBuffSTAM = UnitStat("player",3);
        local power = UnitPower("player");
        if (power >= 60) then
            return floor((max(2*(effective-(statSTR*2)), statSTAM*2.5))*1.05);
        else
            return floor((max(2*(effective-(statSTR*2)), statSTAM*2.5)*(power/60))*1.05);
        end
    end
    Shootz' Law (Cya Godwin)
    As an MMO-Champion discussion grows longer, the probability of a comparison involving 25s and 10s approaches 1. In other words, Shootz observed that, given enough time, in any MMO-Champion discussion—regardless of topic or scope—someone inevitably makes a comparison between 25s and 10s.

  6. #6
    Stood in the Fire Riemu2k3's Avatar
    Join Date
    Oct 2012
    Location
    EU, Germany
    Posts
    358
    Is all that stuff really needed? I have set up an shield barrier aura myself like this:

    Trigger:
    Type -> Aura
    Use Full Scan (High CPU) <<< this is required in order to grab the tooltip value
    Aura Name -> is exactly -> Vengeance
    Use tooltip "size" instead of stacks <<< this makes "%s" in the text box display the tooltip value instead of the stack number, so this is what you want
    (just type in Shield Barrier instead of Vengeance...)

    shouldn't this always work, even with 4pc? I expect the tooltip to be right tbh

    or am I missing something?
    Last edited by Riemu2k3; 2013-03-05 at 02:14 PM.

  7. #7
    yes, you are. we're not talking about vengeance here
    Shootz' Law (Cya Godwin)
    As an MMO-Champion discussion grows longer, the probability of a comparison involving 25s and 10s approaches 1. In other words, Shootz observed that, given enough time, in any MMO-Champion discussion—regardless of topic or scope—someone inevitably makes a comparison between 25s and 10s.

  8. #8
    Stood in the Fire Riemu2k3's Avatar
    Join Date
    Oct 2012
    Location
    EU, Germany
    Posts
    358
    Quote Originally Posted by zora View Post
    yes, you are. we're not talking about vengeance here
    Yes, I know. But that doesn't matter - it works just as well for Shield Barrier as it does for Vengeance. Just type in Shield Barrier instead of Vengeance...
    I'm using it on my Prot Warrior and have Real-Time Shield Barrier Values.

  9. #9
    still, please read OP. this is about estimating how much shield barrier WILL absorb (based on current rage, hp and vengeance). not the actual absorb once you've pressed shield barrier.
    Last edited by zora; 2013-03-05 at 07:36 PM.
    Shootz' Law (Cya Godwin)
    As an MMO-Champion discussion grows longer, the probability of a comparison involving 25s and 10s approaches 1. In other words, Shootz observed that, given enough time, in any MMO-Champion discussion—regardless of topic or scope—someone inevitably makes a comparison between 25s and 10s.

Posting Permissions

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