Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(...)
- local i = 1
- local cur = GetTime()
- local total = 0
- --get total damage taken
- while aura_env.table[i] do
- --grab table entries with time and damage
- local time = aura_env.table[i][1]
- local dmg = aura_env.table[i][2]
- --if the damage happened outside of the timewindow
- if cur > time + aura_env.lastSec then
- --remove the entry
- table.remove(aura_env.table, i)
- else --otherwise
- --add up the damage and go to next entry
- total = total + dmg
- i = i + 1
- end
- end
- --Mastery
- local mastery = 1 + GetMastery() / 200
- --Versatility
- local vers = 1 + ((GetCombatRatingBonus(29) + GetVersatilityBonus(30)) / 100)
- --Leech
- local leech = 1 + GetLifesteal() / 100
- --Guardian of Elune
- local goe = ((select(4, GetTalentInfo(6,2,1))) and UnitBuff("player", GetSpellInfo(213680))) and 1.2 or 1
- --check artifact traits
- local currentRank = 0
- local loaded = IsAddOnLoaded("LibArtifactData-1.0") or LoadAddOn("LibArtifactData-1.0")
- if loaded then
- aura_env.LAD = aura_env.LAD or LibStub("LibArtifactData-1.0")
- if not aura_env.LAD:GetActiveArtifactID() then
- aura_env.LAD:ForceUpdate()
- end
- local _, traits = aura_env.LAD:GetArtifactTraits()
- if traits then
- for _,v in ipairs(traits) do
- if v.spellID == 200400 then
- currentRank = v.currentRank
- break
- end
- end
- end
- end
- local trait = 1 + 0.05 * currentRank
- --Guardian Spirit
- local gs = UnitBuff("player", GetSpellInfo(47788)) and 1.4 or 1
- --Divine Hymn
- local dh = UnitBuff("player", GetSpellInfo(64844)) and 1.1 or 1
- --Protection of Tyr
- local tyr = UnitBuff("player", GetSpellInfo(211210)) and 1.15 or 1
- --Life Cocoon
- local lc = UnitBuff("player", GetSpellInfo(116849)) and 1.5 or 1
- --T17
- local t17 = 1
- local t17n, _, _, t17s = UnitBuff("player", GetSpellInfo(177969))
- if t17n then
- t17 = 1 + t17s * 0.1
- end
- --T18
- local t18 = UnitBuff("player", GetSpellInfo(192081)) and aura_env.GetNumSetPieces("T18") >= 2 and 1.2 or 1
- --T19
- local t19 = 1
- local t19n, _, _, t19s = UnitBuff("player", GetSpellInfo(211160))
- if t19n then
- t19 = 1 + (t19s / 3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement