Advertisement
ggrush

Blood Shield

Oct 4th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. function()
  2.  
  3. -- BLOOD SHIELD VALUE FUNCTION
  4. WA_GetBS = WA_GetBS or function()
  5.  
  6. -- Check for Blood Shield
  7. local name = select(1, UnitAura("player", "Blood Shield"));
  8.  
  9. -- If exists then check value
  10. if name then
  11.  
  12. -- Query stack count and scan tooltip for "size" info
  13. local count = select(4, UnitAura("player", "Blood Shield"));
  14. local size = select(3, WeakAuras.GetAuraTooltipInfo("player", name, nil))
  15.  
  16. -- Return either size, count, or 0
  17. return size and size ~= 0 and size or count or 0;
  18.  
  19. -- No buff
  20. else
  21. return 0;
  22. end
  23. end
  24. -- ***************************
  25.  
  26. -- Create local value variables
  27. local bs = WA_GetBS();
  28.  
  29. -- Divide by 1k
  30. local bsK = bs/1000
  31.  
  32. -- Format return text
  33. WA_BS_Return = string.format("%.0fK", bsK);
  34.  
  35. -- Return the text!
  36. return WA_BS_Return or "0";
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement