From 37405551a12eb78b7148d615d1e888282fd78410 Mon Sep 17 00:00:00 2001 From: Hekili Date: Mon, 9 Oct 2023 09:47:31 -0400 Subject: [PATCH] Handle "dot" tracking for auras that are both buffs and debuffs. --- Dragonflight/PaladinHoly.lua | 1 + State.lua | 11 +++++++---- Targets.lua | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dragonflight/PaladinHoly.lua b/Dragonflight/PaladinHoly.lua index e62ca6f1b..0eeb1de84 100644 --- a/Dragonflight/PaladinHoly.lua +++ b/Dragonflight/PaladinHoly.lua @@ -315,6 +315,7 @@ spec:RegisterAuras( { id = 325966, duration = 30, max_stack = 1, + dot = "both", max_applications = function() if talent.blessed_focus.enabled then return 1 end return 3 + 5 * talent.illumination.rank diff --git a/State.lua b/State.lua index 598d0f471..9ec116983 100644 --- a/State.lua +++ b/State.lua @@ -3234,14 +3234,17 @@ end local mt_dot = { - __index = function(t, k) + __index = function( t, k ) local a = class.auras[ k ] + local dotType = a and a.dot + if not dotType then return state.debuff[ k ] end - if a and a.dot == "buff" then - return state.buff[ k ] + if dotType == "both" then + if state.buff[ k ].up then return state.buff[ k ] end + return state.debuff[ k ] end - return state.debuff[ k ] + return state[ dotType ][ k ] end, } ns.metatables.mt_dot = mt_dot diff --git a/Targets.lua b/Targets.lua index 2ec9e76a8..f442d4c50 100644 --- a/Targets.lua +++ b/Targets.lua @@ -1028,7 +1028,7 @@ do for aura, targets in pairs( debuffs ) do local a = class.auras[ aura ] local window = a and a.duration or grace - local friendly = a and ( a.friendly or a.dot == "buff" ) or false + local friendly = a and ( a.friendly or a.dot == "buff" or a.dot == "both" ) or false local expires = not ( a and a.no_ticks or friendly ) for unit, entry in pairs( targets ) do