diff --git a/HealBot_Controller_Aura.lua b/HealBot_Controller_Aura.lua index e5d48c2..fc6ad86 100644 --- a/HealBot_Controller_Aura.lua +++ b/HealBot_Controller_Aura.lua @@ -183,9 +183,10 @@ function HealBot_OnEvent_UnitAura(this, unit) local iconCount = 0 local i = 1; HealBot_UnitDebuff[unit] = nil; + local trackedTextures = {} while true do - local debuff, tmp, debuff_type = UnitDebuff(unit, i) + local debuff, tmp, debuff_type = UnitDebuff(unit, i, 1) if debuff then local mapped_type = nil if debuff_type then @@ -208,9 +209,10 @@ function HealBot_OnEvent_UnitAura(this, unit) end if isDispellable then - if iconCount < 10 then + if iconCount < 10 and not trackedTextures[debuff] then iconCount = iconCount + 1 HealBot_UnitIcons[unit][iconCount] = debuff + trackedTextures[debuff] = true end end @@ -236,6 +238,20 @@ function HealBot_OnEvent_UnitAura(this, unit) break end end + + if HealBot_Config.CDCShowAllDebuffs == 1 then + local k = 1 + while true do + local debuff = UnitDebuff(unit, k) + if not debuff then break end + if not trackedTextures[debuff] and iconCount < 10 then + iconCount = iconCount + 1 + HealBot_UnitIcons[unit][iconCount] = debuff + trackedTextures[debuff] = true + end + k = k + 1 + end + end local b = 1 while true do diff --git a/HealBot_Controller_Spells.lua b/HealBot_Controller_Spells.lua index 45f2fcd..09607fb 100644 --- a/HealBot_Controller_Spells.lua +++ b/HealBot_Controller_Spells.lua @@ -133,7 +133,7 @@ end -- HealBot_Process_HealValue: Internal utility: HealBot_Process_HealValue function HealBot_Process_HealValue(spell, target) - if HealBot_Spells[spell] and HealBot_Spells[spell].CastTime > 1 then + if HealBot_Spells[spell] and (HealBot_Spells[spell].CastTime or 0) > 1 then HealBot_HealValue = HealBot_Spells[spell].HealsDur; -- Apply dynamic Preservation bonus diff --git a/HealBot_Localization.en.lua b/HealBot_Localization.en.lua index cf44909..30c90e3 100644 --- a/HealBot_Localization.en.lua +++ b/HealBot_Localization.en.lua @@ -310,6 +310,7 @@ HEALBOT_OPTIONS_CDCLEFT = "Alt+Left"; HEALBOT_OPTIONS_CDCRIGHT = "Alt+Right"; HEALBOT_OPTIONS_CDCBARS = "Healthbar colours"; HEALBOT_OPTIONS_CDCCLASS = "Monitor classes"; +HEALBOT_OPTIONS_CDCSHOWALLDEBUFFS = "Track All Debuffs"; HEALBOT_OPTIONS_CDCWARNINGS = "Debuff warnings"; HEALBOT_OPTIONS_USEBUTTONS = "Define spells"; HEALBOT_OPTIONS_CDC = "Cure/Dispel/Cleanse for"; diff --git a/HealBot_Options_CDC.lua b/HealBot_Options_CDC.lua index a697ecc..4fbbe90 100644 --- a/HealBot_Options_CDC.lua +++ b/HealBot_Options_CDC.lua @@ -162,6 +162,28 @@ function HealBot_Options_GetDebuffSpells_List(class) local DebuffSpells = HealBot_Debuff_Spells[class]; return DebuffSpells; end + +-- HealBot_Options_CDCShowAllDebuffs_OnLoad: UI handler for OnLoad options panel. +function HealBot_Options_CDCShowAllDebuffs_OnLoad(this,text) + getglobal(this:GetName().."Text"):SetText(text); + if HealBot_Config.CDCShowAllDebuffs == nil then HealBot_Config.CDCShowAllDebuffs = 0; end + if HealBot_Config.CDCShowAllDebuffs == 1 then + this:SetChecked(1); + else + this:SetChecked(0); + end +end + +-- HealBot_Options_CDCShowAllDebuffs_OnClick: UI handler for OnClick options panel. +function HealBot_Options_CDCShowAllDebuffs_OnClick(this) + if this:GetChecked() then + HealBot_Config.CDCShowAllDebuffs = 1; + else + HealBot_Config.CDCShowAllDebuffs = 0; + end + HealBot_RecalcParty(); +end + -- HealBot_Options_CDCButLeft_DropDown: UI handler for DropDown options panel. function HealBot_Options_CDCButLeft_DropDown() local classEN=HealBot_UnitClass("player") diff --git a/HealBot_Options_CDC.xml b/HealBot_Options_CDC.xml index f2bd49a..415f393 100644 --- a/HealBot_Options_CDC.xml +++ b/HealBot_Options_CDC.xml @@ -7,9 +7,9 @@ - + - + @@ -31,6 +31,20 @@ + + + + + + + + + + HealBot_Options_CDCShowAllDebuffs_OnLoad(this,HEALBOT_OPTIONS_CDCSHOWALLDEBUFFS) + HealBot_Options_CDCShowAllDebuffs_OnClick(this) + + + @@ -57,9 +71,9 @@ - + - + @@ -71,7 +85,7 @@ - + @@ -81,7 +95,7 @@ - + @@ -98,7 +112,7 @@ - + @@ -108,7 +122,7 @@ - + @@ -148,9 +162,9 @@ - + - + @@ -163,9 +177,9 @@ - + - + @@ -178,9 +192,9 @@ - + - + @@ -255,9 +269,9 @@ - + - + @@ -270,9 +284,9 @@ - + - + @@ -368,9 +382,9 @@ - + - + @@ -380,9 +394,9 @@ - + - + @@ -407,9 +421,9 @@ - + - + diff --git a/README.md b/README.md index 3c22d9b..051f1b5 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,10 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\ * **UI Update - Raid & Pets Split** - Split the "Raid / Extra" toggle into separate "Raid" and "Pets" toggles. Simplified the raid bars filter dropdown to core options (All, Melee, Ranged, Heals, Custom). **v1.6.1** +* **Feature - CDC Module** - Added a new toggle in the CDC options to track all debuffs. When enabled, non-dispellable debuff icons will appear on the unit frame. Bar coloring continues to only highlight dispellable debuffs to prevent visual clutter. * **Hotfix - XML Layering** - Reverted `bar` and `bar2` element order in `HealBot_Action.xml`. The incoming heals bar was rendering on top of the health bar, causing debuff colors to be obscured and creating visual opacity issues. +* **Hotfix - Debuff Bar Coloring** - Restored the `showDispellable` parameter to `UnitDebuff` in the aura scanning loop so the Vanilla client correctly returns the debuff type string required for bar coloring. +* **Hotfix - Shapeshift / ShaguTweaks Interaction** - Fixed a Lua error (`attempt to compare number with nil`) in `HealBot_Process_HealValue` caused by missing `CastTime` values when external addons like ShaguTweaks trigger auto-unshift or intercept casts. * **Hotfix - pet frames** - With class colours toggled extra frames for player pets were given some classy mint colour. * **Hotfi - raidframes in combat** - Modfied how frames behave when player leaves during combat.