feat: add CDC module toggle to track all debuffs and fix minor aura and casting bug regressions

This commit is contained in:
Bluewhale1337
2026-08-29 11:34:41 +02:00
parent 377c2c31d0
commit 8026e14cde
6 changed files with 83 additions and 27 deletions
+18 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1
View File
@@ -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";
+22
View File
@@ -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")
+38 -24
View File
@@ -7,9 +7,9 @@
<Frame name="HealBot_Options_CDCMonitor" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="170" y="-30" />
<AbsDimension x="-20" y="-30" />
</Offset>
</Anchor>
</Anchors>
@@ -31,6 +31,20 @@
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_CDCShowAllDebuffs" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="HealBot_Options_CDCMonitor" relativePoint="RIGHT">
<Offset>
<AbsDimension x="-15" y="3" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_CDCShowAllDebuffs_OnLoad(this,HEALBOT_OPTIONS_CDCSHOWALLDEBUFFS)</OnLoad>
<OnClick>HealBot_Options_CDCShowAllDebuffs_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_CureDispelCleanse" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
@@ -57,9 +71,9 @@
<Layer level="BACKGROUND">
<FontString name="HealBot_CDCBut_Text" text="HEALBOT_OPTIONS_CDCBUTTONS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="105" y="-12" />
<AbsDimension x="0" y="-12" />
</Offset>
</Anchor>
</Anchors>
@@ -71,7 +85,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="100" y="-35" />
<AbsDimension x="150" y="-35" />
</Offset>
</Anchor>
</Anchors>
@@ -81,7 +95,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="40" y="-42"/>
<AbsDimension x="70" y="-42"/>
</Offset>
</Anchor>
</Anchors>
@@ -98,7 +112,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="100" y="-67" />
<AbsDimension x="150" y="-67" />
</Offset>
</Anchor>
</Anchors>
@@ -108,7 +122,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="40" y="-74"/>
<AbsDimension x="70" y="-74"/>
</Offset>
</Anchor>
</Anchors>
@@ -148,9 +162,9 @@
<Layer level="BACKGROUND">
<FontString name="HealBot_CDCCol_Text" text="HEALBOT_OPTIONS_CDCBARS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="98" y="-12" />
<AbsDimension x="0" y="-12" />
</Offset>
</Anchor>
</Anchors>
@@ -163,9 +177,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="81" y="-55"/>
<AbsDimension x="70" y="-35"/>
</Offset>
</Anchor>
</Anchors>
@@ -178,9 +192,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="81" y="-55"/>
<AbsDimension x="70" y="-35"/>
</Offset>
</Anchor>
</Anchors>
@@ -255,9 +269,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_DiseaseColorpick" relativePoint="TOPLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="65" y="-45"/>
<AbsDimension x="70" y="-65"/>
</Offset>
</Anchor>
</Anchors>
@@ -270,9 +284,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_DiseaseColorpick" relativePoint="TOPLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="65" y="-45"/>
<AbsDimension x="70" y="-65"/>
</Offset>
</Anchor>
</Anchors>
@@ -368,9 +382,9 @@
<Layer level="BACKGROUND">
<FontString name="HealBot_CDCWarn_Text" text="HEALBOT_OPTIONS_CDCWARNINGS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="98" y="-12" />
<AbsDimension x="0" y="-12" />
</Offset>
</Anchor>
</Anchors>
@@ -380,9 +394,9 @@
</Frame>
<CheckButton name="HealBot_Options_ShowDebuffWarning" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseWarn" relativePoint="BOTTOMLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseWarn" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="25" y="90" />
<AbsDimension x="70" y="-35" />
</Offset>
</Anchor>
</Anchors>
@@ -407,9 +421,9 @@
<CheckButton name="HealBot_WarningSound1" inherits="SendMailRadioButtonTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_SoundDebuffWarning" relativePoint="TOPLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_SoundDebuffWarning" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="25" y="-30"/>
<AbsDimension x="25" y="-5"/>
</Offset>
</Anchor>
</Anchors>
+3
View File
@@ -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.