Add option to split dot / hot damage into separate entries entirely.

This commit is contained in:
andrew6180
2024-06-18 13:07:28 -07:00
parent 016c68d243
commit faf859dc7d
16 changed files with 80 additions and 2 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ function classDamageSpellTable:NovaTabela(spellId, link, token)
extra = {}
}
if (token == "SPELL_PERIODIC_DAMAGE") then
if (token == "SPELL_PERIODIC_DAMAGE") and Details.combat_log.separate_dot_effects then
Details:SetAsDotSpell(spellId)
end
+6 -1
View File
@@ -4,7 +4,7 @@
local addonName, Details222 = ...
local healingAbility = Details.habilidade_cura
function healingAbility:NovaTabela(id)
function healingAbility:NovaTabela(id, link, token)
---@type spelltable
local spellTable = {
--spellId
@@ -40,6 +40,11 @@
targets_absorbs = {}
}
if (token == "SPELL_PERIODIC_HEAL") and Details.combat_log.separate_hot_effects then
Details:SetAsHotSpell(id)
end
return spellTable
end
+16
View File
@@ -531,6 +531,14 @@
spellId = override_spellId[spellId] or spellId
end
--> otherwise check if the spellId is periodic, and if it is then get the first rank of the spell for (DoT) spells
if token == "SPELL_PERIODIC_DAMAGE" then
local firstRank = C_Spell.GetFirstRank(spellId)
if firstRank and firstRank ~= spellId then
spellId = firstRank
end
end
--> npcId check for ignored npcs
--> get the npcId from the cache, if it's not there then get it from the serial and add it to the cache
local npcId = npcid_cache[targetSerial] --target npc
@@ -1965,6 +1973,14 @@
spellId = override_spellId[spellId] or spellId
end
--> if its a periodic heal, use the first rank so it shows up at (HoT)
if token == "SPELL_PERIODIC_HEAL" then
local firstRank = C_Spell.GetFirstRank(spellId)
if firstRank then
spellId = firstRank
end
end
local effectiveHeal = absorbed
if (bIsShield) then
--shield has the correct amount of 'healing done'
+21
View File
@@ -7179,6 +7179,27 @@ do
desc = "Merges spells like Atonement and Awakened Faeline with their critical damage component.",
boxfirst = true,
},
{--separate DoT effects
type = "toggle",
get = function() return Details.combat_log.separate_dot_effects end,
set = function(self, fixedparam, value)
Details.combat_log.separate_dot_effects = value
end,
name = "Separate Damage Over Time Effects",
desc = "If Enabled, spells which deal initial damage and then damage over time will be tracked separately.",
boxfirst = true,
},
{--separate HoT effects
type = "toggle",
get = function() return Details.combat_log.separate_hot_effects end,
set = function(self, fixedparam, value)
Details.combat_log.separate_hot_effects = value
end,
name = "Separate Heal Over Time Effects",
desc = "If Enabled, spells which have initial healing and then heal over time will be tracked separately.",
boxfirst = true,
},
}
sectionFrame.sectionOptions = sectionOptions
+25
View File
@@ -332,4 +332,29 @@ do
rawset(Details.spellcache, spellId, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]})
end
end
--overwrite SpellInfo if the spell is a HoT, so Details.GetSpellInfo will return the name modified
function Details:SetAsHotSpell(spellId)
--do nothing if this spell already has a customization
if (defaultSpellCustomization[spellId]) then
return
end
--do nothing if the spell is already cached
local spellInfo = rawget(Details.spellcache, spellId)
if (spellInfo) then
return
end
local spellName, rank, spellIcon = Details.GetSpellInfo(spellId)
if (not spellName) then
spellName, rank, spellIcon = GetSpellInfo(spellId)
end
if (spellName) then
rawset(Details.spellcache, spellId, {spellName .. Loc ["STRING_HOT"], rank, spellIcon})
else
rawset(Details.spellcache, spellId, {"Unknown HoT Spell? " .. Loc ["STRING_HOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]})
end
end
end
+1
View File
@@ -182,6 +182,7 @@ L["STRING_DISCARD"] = "Verwerfen"
L["STRING_DISPELLED"] = "Entfernte Stärkungs-/Schwächungszauber"
L["STRING_DODGE"] = "Ausweichen"
L["STRING_DOT"] = "(DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "DPS"
L["STRING_EMPTY_SEGMENT"] = "Leeres Segment"
L["STRING_ENABLED"] = "Aktiviert"
+1
View File
@@ -185,6 +185,7 @@ L["STRING_DISCARD"] = "Discard"
L["STRING_DISPELLED"] = "Buffs/Debuffs Removed"
L["STRING_DODGE"] = "Dodge"
L["STRING_DOT"] = " (DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "DPS"
L["STRING_EMPTY_SEGMENT"] = "Empty Segment"
L["STRING_ENABLED"] = "Enabled"
+1
View File
@@ -170,6 +170,7 @@ L["STRING_DISCARD"] = "Descartar"
L["STRING_DISPELLED"] = "Bufos/debufos disipados"
L["STRING_DODGE"] = "Esquivado"
L["STRING_DOT"] = " (DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "DPS"
L["STRING_EMPTY_SEGMENT"] = "Segmento vacío"
L["STRING_ENABLED"] = "Activado"
+1
View File
@@ -170,6 +170,7 @@ L["STRING_DISCARD"] = "Descartar"
L["STRING_DISPELLED"] = "Bufos/debufos disipados"
L["STRING_DODGE"] = "Esquivado"
L["STRING_DOT"] = " (DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "DPS"
L["STRING_EMPTY_SEGMENT"] = "Segmento vacío"
L["STRING_ENABLED"] = "Activado"
+1
View File
@@ -171,6 +171,7 @@ L["STRING_DISCARD"] = "Refuser"
L["STRING_DISPELLED"] = "Buffs/Debuffs dissipés"
L["STRING_DODGE"] = "Esquive"
L["STRING_DOT"] = "(DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "DPS"
L["STRING_EMPTY_SEGMENT"] = "Segment vide"
L["STRING_ENABLED"] = "Activé"
+1
View File
@@ -175,6 +175,7 @@ L["STRING_DISCARD"] = "Scartare"
L["STRING_DISPELLED"] = "Buffs/Debuffs Rimossi"
L["STRING_DODGE"] = "Schivata"
L["STRING_DOT"] = "(DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "DPS"
L["STRING_EMPTY_SEGMENT"] = "Segmento Vuoto"
L["STRING_ENABLED"] = "Abilitato"
+1
View File
@@ -184,6 +184,7 @@ L["STRING_DISCARD"] = "포기"
L["STRING_DISPELLED"] = "제거된 강화 효과/약화 효과"
L["STRING_DODGE"] = "회피"
L["STRING_DOT"] = " (지속 효과)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "Dps"
L["STRING_EMPTY_SEGMENT"] = "빈 세분화"
L["STRING_ENABLED"] = "사용"
+1
View File
@@ -182,6 +182,7 @@ L["STRING_DISCARD"] = "Descartar"
L["STRING_DISPELLED"] = "Auras Removidas"
L["STRING_DODGE"] = "Desvio"
L["STRING_DOT"] = " (DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "Dps"
L["STRING_EMPTY_SEGMENT"] = "Segmento Vazio"
L["STRING_ENABLED"] = "Ativado,"
+1
View File
@@ -182,6 +182,7 @@ L["STRING_DISCARD"] = "Отказаться"
L["STRING_DISPELLED"] = "Баффы/Дебафы удалены"
L["STRING_DODGE"] = "Уклонение"
L["STRING_DOT"] = "(ДоТ)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "УВС"
L["STRING_EMPTY_SEGMENT"] = "Пустой сегмент"
L["STRING_ENABLED"] = "Включить"
+1
View File
@@ -176,6 +176,7 @@ L["STRING_DISCARD"] = "忽略"
L["STRING_DISPELLED"] = "增益/减益 移除"
L["STRING_DODGE"] = "闪避"
L["STRING_DOT"] = " (DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "每秒伤害"
L["STRING_EMPTY_SEGMENT"] = "空片段"
L["STRING_ENABLED"] = "启用"
+1
View File
@@ -183,6 +183,7 @@ L["STRING_DISCARD"] = "捨棄"
L["STRING_DISPELLED"] = "移除的增益/減益"
L["STRING_DODGE"] = "閃避"
L["STRING_DOT"] = "持續性傷害 (DoT)"
L["STRING_HOT"] = " (HoT)"
L["STRING_DPS"] = "每秒傷害 (DPS)"
L["STRING_EMPTY_SEGMENT"] = "空的戰鬥記錄"
L["STRING_ENABLED"] = "啟用"