Fix: removed legacy full ui teardowns of ui on refresh functions with button-specific updates, add CDC toggle logic, and update documentation for mod integrations

This commit is contained in:
Bluewhale1337
2026-08-24 12:52:44 +02:00
parent 6d977f6963
commit 9c1f873b48
4 changed files with 17 additions and 6 deletions
+4 -4
View File
@@ -10,13 +10,13 @@ function HealBot_Options_BuffWatch_OnClick(self)
else
HealBot_Options_BuffWatchInCombat:Enable()
end
HealBot_RecalcParty();
HealBot_Action_RefreshButtons(nil);
end
-- HealBot_Options_BuffWatchInCombat_OnClick: UI handler for OnClick options panel.
function HealBot_Options_BuffWatchInCombat_OnClick(self)
local frame = self or this
HealBot_Config.BuffWatchInCombat = frame:GetChecked() or 0;
HealBot_RecalcParty();
HealBot_Action_RefreshButtons(nil);
end
-- HealBot_Options_BuffSelf_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_BuffSelf_OnLoad(self)
@@ -42,7 +42,7 @@ function HealBot_Options_BuffSelf_OnClick(self)
else
HealBot_Config.BuffWatchSelf[id] = 0
end
HealBot_RecalcParty();
HealBot_Action_RefreshButtons(nil);
end
-- HealBot_Options_Buff_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_Buff_OnLoad(self)
@@ -87,7 +87,7 @@ function HealBot_Options_Buff_OnClick()
HealBot_UIDropDownMenu_SetSelectedID(frame, this.value + 1)
UIDropDownMenu_SetText(text, frame)
HealBot_RecalcParty();
HealBot_Action_RefreshButtons(nil);
end
-- HealBot_Options_SetBuffs: UI handler for SetBuffs options panel.
function HealBot_Options_SetBuffs()
+12
View File
@@ -238,6 +238,18 @@ function HealBot_Options_CDCButRight_OnLoad()
UIDropDownMenu_Initialize(this, HealBot_Options_CDCButRight_DropDown)
UIDropDownMenu_SetWidth(140, this)
end
-- HealBot_Options_CDCToggle_OnClick: UI handler for OnClick event.
function HealBot_Options_CDCToggle_OnClick(spell, button, class)
local spellID = HealBot_GetSpellId(spell)
local spellName = HealBot_GetSpellName(spellID)
if HealBot_Config.CDCLeftText[class]==spellName then
HealBot_Config.CDCLeftText[class]="None"
elseif HealBot_Config.CDCRightText[class]==spellName then
HealBot_Config.CDCRightText[class]="None"
end
HealBot_Options_CDC_SetCombo(spell, button, class)
end
-- HealBot_Options_CDCButLeft_OnSelect: UI handler for OnSelect options panel.
function HealBot_Options_CDCButLeft_OnSelect()
local class=UnitClass("Player");
-2
View File
@@ -291,7 +291,6 @@ end
-- HealBot_Options_QualityRange_OnClick: UI handler for OnClick options panel.
function HealBot_Options_QualityRange_OnClick(this)
HealBot_Config.QualityRange = this:GetChecked() or 0;
HealBot_Action_PartyChanged();
end
-- HealBot_Options_ProtectPvP_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_ProtectPvP_OnLoad(this,text)
@@ -300,7 +299,6 @@ end
-- HealBot_Options_ProtectPvP_OnClick: UI handler for OnClick options panel.
function HealBot_Options_ProtectPvP_OnClick(this)
HealBot_Config.ProtectPvP = this:GetChecked() or 0;
HealBot_Action_Refresh();
end
-- HealBot_Options_FramePaddingS_OnValueChanged: UI handler for OnValueChanged options panel.
function HealBot_Options_FramePaddingS_OnValueChanged(this)
+1
View File
@@ -37,6 +37,7 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
* **Customizable Health Text:** Dynamic unit health display (Name Only, Percentage, Real Health, or Health Deficit).
* **Non-Mana Resource Tracking:** Track Rage, Energy, and Focus for non-mana classes.
* **Highly Customizable Skins:** Fully configure dimensions (width, height), row spacing, column layouts, custom textures, opacity, class-colored frames, and outline of fonts.
* **Additional Mods Integration:** Navigate to 'Extras' tab in Options to optionally enable integrations with `UnitXP_SP3` (for ultra-precise 3D range and Line of Sight checks), `nampower` (for accurate real-time heal/buff tracking), `SuperWoW` (for robust GUID-based state tracking), and `ClassicAPI` (for native +Healing bonuses and fast 3D distance checks).
### To be implemented
- **Strategy Pattern / Code Tree Splits:** Migrate heavy mod integrations (like Nampower aura tracking and SuperWoW UI rendering) into isolated code trees (e.g., `HealBot_Model_SuperWoW.lua`). This will allow dynamic overwriting of global functions at startup, eliminating the CPU overhead of running `if integration then` branch checks inside high-frequency update loops on Vanilla clients.