diff --git a/classes/class_spelldamage.lua b/classes/class_spelldamage.lua index a2c019cb..95589138 100644 --- a/classes/class_spelldamage.lua +++ b/classes/class_spelldamage.lua @@ -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 diff --git a/classes/class_spellhealing.lua b/classes/class_spellhealing.lua index e93dfaba..9580b051 100644 --- a/classes/class_spellhealing.lua +++ b/classes/class_spellhealing.lua @@ -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 diff --git a/core/parser.lua b/core/parser.lua index 821d3120..f19ed758 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -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' diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 94dcd3cc..9768d5e2 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -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 diff --git a/functions/spellcache.lua b/functions/spellcache.lua index f5d1f1c2..a02e03d1 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -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 \ No newline at end of file diff --git a/locales/Details-deDE.lua b/locales/Details-deDE.lua index 3046c61f..5ad6db4f 100644 --- a/locales/Details-deDE.lua +++ b/locales/Details-deDE.lua @@ -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" diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index d3c2a036..7158958d 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -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" diff --git a/locales/Details-esES.lua b/locales/Details-esES.lua index ec149b6c..d1a64f16 100644 --- a/locales/Details-esES.lua +++ b/locales/Details-esES.lua @@ -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" diff --git a/locales/Details-esMX.lua b/locales/Details-esMX.lua index fed5c507..17ba044f 100644 --- a/locales/Details-esMX.lua +++ b/locales/Details-esMX.lua @@ -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" diff --git a/locales/Details-frFR.lua b/locales/Details-frFR.lua index 7b00bf2b..96d7cfa7 100644 --- a/locales/Details-frFR.lua +++ b/locales/Details-frFR.lua @@ -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é" diff --git a/locales/Details-itIT.lua b/locales/Details-itIT.lua index ad0c6cff..042431d2 100644 --- a/locales/Details-itIT.lua +++ b/locales/Details-itIT.lua @@ -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" diff --git a/locales/Details-koKR.lua b/locales/Details-koKR.lua index 26100872..c29f29ba 100644 --- a/locales/Details-koKR.lua +++ b/locales/Details-koKR.lua @@ -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"] = "사용" diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 23945e6e..cb71f756 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -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," diff --git a/locales/Details-ruRU.lua b/locales/Details-ruRU.lua index b24f7a00..7d30d89a 100644 --- a/locales/Details-ruRU.lua +++ b/locales/Details-ruRU.lua @@ -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"] = "Включить" diff --git a/locales/Details-zhCN.lua b/locales/Details-zhCN.lua index f14c10cc..66967751 100644 --- a/locales/Details-zhCN.lua +++ b/locales/Details-zhCN.lua @@ -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"] = "启用" diff --git a/locales/Details-zhTW.lua b/locales/Details-zhTW.lua index 3b878d99..67848d52 100644 --- a/locales/Details-zhTW.lua +++ b/locales/Details-zhTW.lua @@ -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"] = "啟用"