diff --git a/HealBotBlue.toc b/HealBotBlue.toc index b97c33e..7c0d6b0 100644 --- a/HealBotBlue.toc +++ b/HealBotBlue.toc @@ -1,6 +1,6 @@ ## Interface: 11200 ## Title: HealBotBlue -## Version: 1.6.4 +## Version: 1.6.5 ## Author: Bluewhale ## Notes: Adds panel with skinable bars for healing and decursive ## SavedVariablesPerCharacter: HealBot_Config diff --git a/HealBot_Controller_Events.lua b/HealBot_Controller_Events.lua index ab094dd..f8ec5bd 100644 --- a/HealBot_Controller_Events.lua +++ b/HealBot_Controller_Events.lua @@ -2,6 +2,7 @@ -- Manages WoW Frame events and periodic updates, routing to respective services HealBot_View_DirtyUnits = {} +HealBot_View_DirtyPower = {} local HealBot_Timer1, HealsIn_Timer = 0, 0; HealBot_LastModState = "" @@ -20,7 +21,7 @@ function HealBot_OnLoad(this) HealBot_View_DirtyUnits[unitID] = true end) HealBot_Model:RegisterObserver("UNIT_POWER_CHANGED", function(unitID) - HealBot_View_DirtyUnits[unitID] = true + HealBot_View_DirtyPower[unitID] = true end) HealBot_Model:RegisterObserver("UNIT_AURA_CHANGED", function(unitID) HealBot_View_DirtyUnits[unitID] = true @@ -78,9 +79,17 @@ function HealBot_OnUpdate(this, arg1) while unitID do HealBot_Action_RefreshButtons(unitID) HealBot_View_DirtyUnits[unitID] = nil + HealBot_View_DirtyPower[unitID] = nil -- Skip fast path if doing full refresh unitID, _ = next(HealBot_View_DirtyUnits) end + local powerID, _ = next(HealBot_View_DirtyPower) + while powerID do + HealBot_Action_RefreshPower(powerID) + HealBot_View_DirtyPower[powerID] = nil + powerID, _ = next(HealBot_View_DirtyPower) + end + if HealBot_EquipChangeTimer > 0 then HealBot_EquipChangeTimer = HealBot_EquipChangeTimer - arg1 if HealBot_EquipChangeTimer <= 0 then diff --git a/HealBot_View_Layout.lua b/HealBot_View_Layout.lua index fff26d8..138af47 100644 --- a/HealBot_View_Layout.lua +++ b/HealBot_View_Layout.lua @@ -303,6 +303,21 @@ function HealBot_Action_RefreshButtons(unit) end end +function HealBot_Action_RefreshPower(unit) + if not unit or not HealBot_Action_UnitButtons[unit] then return end + local state = HealBot_Model.units[unit] + if not state then return end + + for index, button in pairs(HealBot_Action_UnitButtons[unit]) do + if not button.bar3 then button.bar3 = getglobal(button:GetName() .. "Bar3") end + local bar3 = button.bar3 + if bar3 and bar3:IsVisible() then + bar3:SetMinMaxValues(0, state.maxMana) + bar3:SetValue(state.mana) + end + end +end + function HealBot_Action_PositionButton(button, OsetX, OsetY, bwidth, bheight, checked, header) local brspace = HealBot_Config.brspace[HealBot_Config.Current_Skin] or 3; if header then diff --git a/README.md b/README.md index 9fd55d4..ba988c2 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\ ### Change Log +**v1.6.5** +* **Performance Update - Mana Tracking** - Added a fast-path redraw pipeline for unit power changes. This massive optimization prevents full frame redraws when players naturally regenerate or consume mana, resolving severe FPS drops in 40-man raids while tracking mana. + **v1.6.4** * **Bug Fix - UI Opacity** - Fixed a rendering layering bug where incoming heals drew on top of actual health, causing the semi-transparent incoming heal bar to wash out the solid health bar. * **Bug Fix - CDC Colors** - Fixed health bar debuff coloring (CDC) by stopping `HealBot_HealthColor` from incorrectly querying debuffs directly, relying instead on cached debuff types.