1. #1

    [Classic][Weakaura] Showing specific items durability

    I just got the shield Force Reactive Disk ( https://classic.wowhead.com/item=181...-reactive-disk ) on my warrior and need a WA that shows me its durability. I tried doing that with WA preset options but it looks like this requires custom code in order to work.

  2. #2

  3. #3
    Quote Originally Posted by Translit View Post
    https://pastebin.com/76R7nJtn Try this one. Just made it and didn't test
    Yours works fine except when the durability % is not an even number. Shows like 12 decimals then. Got guildie to make me one moments before your post. Thanks anyways. ( Guildies WA https://pastebin.com/KHbTxa2t )

  4. #4
    I didn't add rounding to it. You can fix it by changing
    Code:
    percent = ("%s%%"):format(value/total*100),
    in the trigger to
    Code:
    percent = ("%s%%"):format(Round(value/total*100)),
    Your guildie's WA runs everyframe, its better to use events for that

  5. #5
    Awesome job thanks!

    Is there a way of only showing this once the shield is broken or close to (<10%)?

  6. #6
    I'm assuming you're using Translit's WA.

    In the trigger, find the following line:

    Code:
    if value and total then
    Replace the line with this:

    Code:
    if value and total and value/total<=0.1 then
    0.1 is 10%. This will make the weakaura show if durability is less than or equal to 10%, which includes broken.
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

Posting Permissions

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