Advertisement
Guest User

Flaymaker FR CF

a guest
Oct 17th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. function(...)
  2. local i = 1
  3. local cur = GetTime()
  4. local total = 0
  5.  
  6. --get total damage taken
  7. while aura_env.table[i] do
  8. --grab table entries with time and damage
  9. local time = aura_env.table[i][1]
  10. local dmg = aura_env.table[i][2]
  11.  
  12. --if the damage happened outside of the timewindow
  13. if cur > time + aura_env.lastSec then
  14. --remove the entry
  15. table.remove(aura_env.table, i)
  16. else --otherwise
  17. --add up the damage and go to next entry
  18. total = total + dmg
  19. i = i + 1
  20. end
  21. end
  22.  
  23. --Mastery
  24. local mastery = 1 + GetMastery() / 200
  25.  
  26. --Versatility
  27. local vers = 1 + ((GetCombatRatingBonus(29) + GetVersatilityBonus(30)) / 100)
  28.  
  29. --Leech
  30. local leech = 1 + GetLifesteal() / 100
  31.  
  32. --Guardian of Elune
  33. local goe = ((select(4, GetTalentInfo(6,2,1))) and UnitBuff("player", GetSpellInfo(213680))) and 1.2 or 1
  34.  
  35. --check artifact traits
  36. local currentRank = 0
  37. local loaded = IsAddOnLoaded("LibArtifactData-1.0") or LoadAddOn("LibArtifactData-1.0")
  38. if loaded then
  39. aura_env.LAD = aura_env.LAD or LibStub("LibArtifactData-1.0")
  40. if not aura_env.LAD:GetActiveArtifactID() then
  41. aura_env.LAD:ForceUpdate()
  42. end
  43. local _, traits = aura_env.LAD:GetArtifactTraits()
  44. if traits then
  45. for _,v in ipairs(traits) do
  46. if v.spellID == 200400 then
  47. currentRank = v.currentRank
  48. break
  49. end
  50. end
  51. end
  52. end
  53. local trait = 1 + 0.05 * currentRank
  54.  
  55. --Guardian Spirit
  56. local gs = UnitBuff("player", GetSpellInfo(47788)) and 1.4 or 1
  57.  
  58. --Divine Hymn
  59. local dh = UnitBuff("player", GetSpellInfo(64844)) and 1.1 or 1
  60.  
  61. --Protection of Tyr
  62. local tyr = UnitBuff("player", GetSpellInfo(211210)) and 1.15 or 1
  63.  
  64. --Life Cocoon
  65. local lc = UnitBuff("player", GetSpellInfo(116849)) and 1.5 or 1
  66.  
  67. --T17
  68. local t17 = 1
  69. local t17n, _, _, t17s = UnitBuff("player", GetSpellInfo(177969))
  70. if t17n then
  71. t17 = 1 + t17s * 0.1
  72. end
  73.  
  74. --T18
  75. local t18 = UnitBuff("player", GetSpellInfo(192081)) and aura_env.GetNumSetPieces("T18") >= 2 and 1.2 or 1
  76.  
  77. --T19
  78. local t19 = 1
  79. local t19n, _, _, t19s = UnitBuff("player", GetSpellInfo(211160))
  80. if t19n then
  81. t19 = 1 + (t19s / 3)
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement