diff --git a/Controller/HealBot_Controller_Events.lua b/Controller/HealBot_Controller_Events.lua index bfa9cb3..1a323f3 100644 --- a/Controller/HealBot_Controller_Events.lua +++ b/Controller/HealBot_Controller_Events.lua @@ -417,6 +417,13 @@ function HealBot_OnEvent_VariablesLoaded(this) HealBot_InitData(); + if HealBot_Config and HealBot_Config.CDCOverlay == 6 and not HealBot_Config.CDCOverlay_v2 then + HealBot_Config.CDCOverlay = 7 + end + if HealBot_Config then + HealBot_Config.CDCOverlay_v2 = 1 + end + if not HealBot_PartyFrameHooked then local origShowPartyFrame = ShowPartyFrame; ShowPartyFrame = function() @@ -436,6 +443,7 @@ function HealBot_OnEvent_VariablesLoaded(this) HealBot_BonusScanner:ScanEquipment(); HealBot_Action_ShowFrame(); + HealBot_Action_ResetSkin(); this:RegisterEvent("ZONE_CHANGED_NEW_AREA"); this:RegisterEvent("PLAYER_REGEN_DISABLED"); diff --git a/Images/debuff_curse.tga b/Images/debuff_curse.tga index 064d8ab..a965513 100644 Binary files a/Images/debuff_curse.tga and b/Images/debuff_curse.tga differ diff --git a/Images/debuff_disease.tga b/Images/debuff_disease.tga index 2233c75..06629d3 100644 Binary files a/Images/debuff_disease.tga and b/Images/debuff_disease.tga differ diff --git a/Images/debuff_magic.tga b/Images/debuff_magic.tga index 40af82b..65a2c1a 100644 Binary files a/Images/debuff_magic.tga and b/Images/debuff_magic.tga differ diff --git a/Locales/HealBot_Localization.de.lua b/Locales/HealBot_Localization.de.lua index dae48df..875bb9b 100644 --- a/Locales/HealBot_Localization.de.lua +++ b/Locales/HealBot_Localization.de.lua @@ -427,3 +427,4 @@ HEALBOT_OPTIONS_CDCOVERLAY_GLOW = "Glow Effect"; HEALBOT_OPTIONS_CDCOVERLAY_GLOWFRAME = "Glow + Frame"; HEALBOT_OPTIONS_CDCOVERLAY_NONE = "Disabled"; HEALBOT_OPTIONS_CDCOVERLAY_ANIMATED = "Animated"; +HEALBOT_OPTIONS_CDCOVERLAY_ANIMFRAME = "Animated + Frame"; diff --git a/Locales/HealBot_Localization.en.lua b/Locales/HealBot_Localization.en.lua index 29890a4..e3e2403 100644 --- a/Locales/HealBot_Localization.en.lua +++ b/Locales/HealBot_Localization.en.lua @@ -457,3 +457,4 @@ HEALBOT_OPTIONS_CDCOVERLAY_GLOW = "Glow Effect"; HEALBOT_OPTIONS_CDCOVERLAY_GLOWFRAME = "Glow + Frame"; HEALBOT_OPTIONS_CDCOVERLAY_NONE = "Disabled"; HEALBOT_OPTIONS_CDCOVERLAY_ANIMATED = "Animated"; +HEALBOT_OPTIONS_CDCOVERLAY_ANIMFRAME = "Animated + Frame"; diff --git a/Locales/HealBot_Localization.fr.lua b/Locales/HealBot_Localization.fr.lua index 14b818f..59993a5 100644 --- a/Locales/HealBot_Localization.fr.lua +++ b/Locales/HealBot_Localization.fr.lua @@ -408,3 +408,4 @@ HEALBOT_OPTIONS_CDCOVERLAY_GLOW = "Glow Effect"; HEALBOT_OPTIONS_CDCOVERLAY_GLOWFRAME = "Glow + Frame"; HEALBOT_OPTIONS_CDCOVERLAY_NONE = "Disabled"; HEALBOT_OPTIONS_CDCOVERLAY_ANIMATED = "Animated"; +HEALBOT_OPTIONS_CDCOVERLAY_ANIMFRAME = "Animated + Frame"; diff --git a/Locales/HealBot_Localization.kr.lua b/Locales/HealBot_Localization.kr.lua index 59b7cfe..03ebc78 100644 --- a/Locales/HealBot_Localization.kr.lua +++ b/Locales/HealBot_Localization.kr.lua @@ -402,3 +402,4 @@ HEALBOT_OPTIONS_CDCOVERLAY_GLOW = "Glow Effect"; HEALBOT_OPTIONS_CDCOVERLAY_GLOWFRAME = "Glow + Frame"; HEALBOT_OPTIONS_CDCOVERLAY_NONE = "Disabled"; HEALBOT_OPTIONS_CDCOVERLAY_ANIMATED = "Animated"; +HEALBOT_OPTIONS_CDCOVERLAY_ANIMFRAME = "Animated + Frame"; diff --git a/Model/HealBot_Data.lua b/Model/HealBot_Data.lua index 94edff1..1aa23d0 100644 --- a/Model/HealBot_Data.lua +++ b/Model/HealBot_Data.lua @@ -283,6 +283,12 @@ HealBot_ConfigDefaults = { bcolorming = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0}, bcolorminb = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0}, bfont = {[HEALBOT_SKINS_STD] = "Fonts\\FRIZQT__.TTF", ["HealBot Party"] = "Fonts\\FRIZQT__.TTF", ["HealBot Raid"] = "Fonts\\FRIZQT__.TTF", ["Alteric Valley"] = "Fonts\\FRIZQT__.TTF", ["Modern Flat"] = "Fonts\\FRIZQT__.TTF"}, + bframe = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0}, + bframewidth = {[HEALBOT_SKINS_STD] = 10, ["HealBot Party"] = 10, ["HealBot Raid"] = 10, ["Alteric Valley"] = 10, ["Modern Flat"] = 10}, + bframecolr = {[HEALBOT_SKINS_STD] = 1, ["HealBot Party"] = 1, ["HealBot Raid"] = 1, ["Alteric Valley"] = 1, ["Modern Flat"] = 1}, + bframecolg = {[HEALBOT_SKINS_STD] = 1, ["HealBot Party"] = 1, ["HealBot Raid"] = 1, ["Alteric Valley"] = 1, ["Modern Flat"] = 1}, + bframecolb = {[HEALBOT_SKINS_STD] = 1, ["HealBot Party"] = 1, ["HealBot Raid"] = 1, ["Alteric Valley"] = 1, ["Modern Flat"] = 1}, + bframecola = {[HEALBOT_SKINS_STD] = 1, ["HealBot Party"] = 1, ["HealBot Raid"] = 1, ["Alteric Valley"] = 1, ["Modern Flat"] = 1}, ShowTooltip = 1, ShowManaBars = 0, ManaBarsHealersOnly = 0, diff --git a/Options/HealBot_Options.lua b/Options/HealBot_Options.lua index 8dbcc4c..5e6dce3 100644 --- a/Options/HealBot_Options.lua +++ b/Options/HealBot_Options.lua @@ -216,6 +216,16 @@ function HealBot_Returned_Colours() HealBot_Config.bcolorminr[HealBot_Config.Current_Skin], HealBot_Config.bcolorming[HealBot_Config.Current_Skin], HealBot_Config.bcolorminb[HealBot_Config.Current_Skin] = ColorPickerFrame:GetColorRGB(); + elseif HealBot_ColourObjWaiting=="BarFrame" then + if not HealBot_Config.bframecolr then HealBot_Config.bframecolr = {} end + if not HealBot_Config.bframecolg then HealBot_Config.bframecolg = {} end + if not HealBot_Config.bframecolb then HealBot_Config.bframecolb = {} end + if not HealBot_Config.bframecola then HealBot_Config.bframecola = {} end + HealBot_Config.bframecolr[HealBot_Config.Current_Skin], + HealBot_Config.bframecolg[HealBot_Config.Current_Skin], + HealBot_Config.bframecolb[HealBot_Config.Current_Skin] = ColorPickerFrame:GetColorRGB(); + HealBot_Config.bframecola[HealBot_Config.Current_Skin] = A; + HealBot_Action_ResetSkin() else HealBot_Config.CDCBarColour[HealBot_ColourObjWaiting].R, HealBot_Config.CDCBarColour[HealBot_ColourObjWaiting].G, @@ -408,6 +418,16 @@ function HealBot_Options_SetSkins() local is1pxBorder = (HealBot_Config.bborder[HealBot_Config.Current_Skin] == 1) HealBot_Options_1pxBorders:SetChecked(is1pxBorder and 1 or nil) + local isBarFrame = (HealBot_Config.bframe and HealBot_Config.bframe[HealBot_Config.Current_Skin] == 1) + HealBot_Options_BarFrame:SetChecked(isBarFrame and 1 or nil) + + local frameWidth = (HealBot_Config.bframewidth and HealBot_Config.bframewidth[HealBot_Config.Current_Skin]) or 10 + HealBot_Options_BarFrameWidthS:SetValue(frameWidth) + + if HealBot_Options_Skins_ScrollFrame then + HealBot_Options_Skins_ScrollFrame:UpdateScrollChildRect() + end + HealBot_SetSkinColours() if HealBot_Config.Current_Skin==HEALBOT_SKINS_STD then HealBot_Options_DeleteSkin:Disable(); diff --git a/Options/HealBot_Options_CDC.lua b/Options/HealBot_Options_CDC.lua index 17cb164..d2e8752 100644 --- a/Options/HealBot_Options_CDC.lua +++ b/Options/HealBot_Options_CDC.lua @@ -51,6 +51,7 @@ function HealBot_Options_CDCOverlay_DropDown() HEALBOT_OPTIONS_CDCOVERLAY_GLOW or "Glow Effect", HEALBOT_OPTIONS_CDCOVERLAY_GLOWFRAME or "Glow + Frame", HEALBOT_OPTIONS_CDCOVERLAY_ANIMATED or "Animated", + HEALBOT_OPTIONS_CDCOVERLAY_ANIMFRAME or "Animated + Frame", HEALBOT_OPTIONS_CDCOVERLAY_NONE or "Disabled", }; for i=1, getn(list), 1 do diff --git a/Options/HealBot_Options_General.lua b/Options/HealBot_Options_General.lua index 8971704..872bcee 100644 --- a/Options/HealBot_Options_General.lua +++ b/Options/HealBot_Options_General.lua @@ -129,6 +129,12 @@ function HealBot_SkinColorpick_OnClick(SkinType) local g = HealBot_Config.bcolorming and HealBot_Config.bcolorming[HealBot_Config.Current_Skin] or 0.0 local b = HealBot_Config.bcolorminb and HealBot_Config.bcolorminb[HealBot_Config.Current_Skin] or 0.0 HealBot_UseColourPick(r, g, b, 1.0) + elseif SkinType=="BarFrame" then + local r = (HealBot_Config.bframecolr and HealBot_Config.bframecolr[HealBot_Config.Current_Skin]) or 1.0 + local g = (HealBot_Config.bframecolg and HealBot_Config.bframecolg[HealBot_Config.Current_Skin]) or 1.0 + local b = (HealBot_Config.bframecolb and HealBot_Config.bframecolb[HealBot_Config.Current_Skin]) or 1.0 + local a = (HealBot_Config.bframecola and HealBot_Config.bframecola[HealBot_Config.Current_Skin]) or 1.0 + HealBot_UseColourPick(r, g, b, a) end end -- HealBot_SetSkinColours: Applies skin configuration to UI elements. @@ -184,6 +190,13 @@ function HealBot_SetSkinColours() HealBot_Config.babortcolr[skin], HealBot_Config.babortcolg[skin], HealBot_Config.babortcolb[skin], HealBot_Config.babortcola[skin] ) + if HealBot_BarFrameColorpick then + local bfr = (HealBot_Config.bframecolr and HealBot_Config.bframecolr[skin]) or 1.0 + local bfg = (HealBot_Config.bframecolg and HealBot_Config.bframecolg[skin]) or 1.0 + local bfb = (HealBot_Config.bframecolb and HealBot_Config.bframecolb[skin]) or 1.0 + local bfa = (HealBot_Config.bframecola and HealBot_Config.bframecola[skin]) or 1.0 + HealBot_BarFrameColorpick:SetStatusBarColor(bfr, bfg, bfb, bfa) + end -- 4. Setup Main Panel Backdrop (Fixed scoping bugs) local borderStyle = HealBot_Config.bborder[skin] or 2 diff --git a/Options/HealBot_Options_Skins.lua b/Options/HealBot_Options_Skins.lua index 5b1522d..9d6371c 100644 --- a/Options/HealBot_Options_Skins.lua +++ b/Options/HealBot_Options_Skins.lua @@ -43,6 +43,19 @@ function HealBot_Options_BarMaxRowsS_OnValueChanged(this) HealBot_Action_PartyChanged() end +function HealBot_Options_BarFrame_OnClick(this) + if not HealBot_Config.bframe then HealBot_Config.bframe = {} end + HealBot_Config.bframe[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 0) + HealBot_Action_ResetSkin() +end + +function HealBot_Options_BarFrameWidthS_OnValueChanged(this) + if not HealBot_Config.bframewidth then HealBot_Config.bframewidth = {} end + HealBot_Config.bframewidth[HealBot_Config.Current_Skin] = this:GetValue() + getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue()) + HealBot_Action_ResetSkin() +end + function HealBot_Options_GridOrientationDD_OnLoad(this) UIDropDownMenu_Initialize(this, HealBot_Options_GridOrientationDD_Initialize); UIDropDownMenu_SetWidth(110, this); @@ -139,6 +152,12 @@ function HealBot_Options_NewSkinb_OnClick(this) if not HealBot_Config.bcolorming then HealBot_Config.bcolorming = {} end if not HealBot_Config.bcolorminb then HealBot_Config.bcolorminb = {} end if not HealBot_Config.bfont then HealBot_Config.bfont = {} end + if not HealBot_Config.bframe then HealBot_Config.bframe = {} end + if not HealBot_Config.bframewidth then HealBot_Config.bframewidth = {} end + if not HealBot_Config.bframecolr then HealBot_Config.bframecolr = {} end + if not HealBot_Config.bframecolg then HealBot_Config.bframecolg = {} end + if not HealBot_Config.bframecolb then HealBot_Config.bframecolb = {} end + if not HealBot_Config.bframecola then HealBot_Config.bframecola = {} end local curSkin = HealBot_Config.Current_Skin local newSkin = HealBot_Options_NewSkin:GetText() @@ -149,6 +168,12 @@ function HealBot_Options_NewSkinb_OnClick(this) HealBot_Config.bcolorming[newSkin] = HealBot_Config.bcolorming[curSkin] or 0 HealBot_Config.bcolorminb[newSkin] = HealBot_Config.bcolorminb[curSkin] or 0 HealBot_Config.bfont[newSkin] = HealBot_Config.bfont[curSkin] or "Fonts\\FRIZQT__.TTF" + HealBot_Config.bframe[newSkin] = HealBot_Config.bframe[curSkin] or 0 + HealBot_Config.bframewidth[newSkin] = HealBot_Config.bframewidth[curSkin] or 10 + HealBot_Config.bframecolr[newSkin] = HealBot_Config.bframecolr[curSkin] or 1 + HealBot_Config.bframecolg[newSkin] = HealBot_Config.bframecolg[curSkin] or 1 + HealBot_Config.bframecolb[newSkin] = HealBot_Config.bframecolb[curSkin] or 1 + HealBot_Config.bframecola[newSkin] = HealBot_Config.bframecola[curSkin] or 1 table.insert(HealBot_Skins,2,HealBot_Options_NewSkin:GetText()) HealBot_Config.Skin_ID = 2; @@ -204,6 +229,12 @@ function HealBot_Options_DeleteSkin_OnClick(this) if HealBot_Config.bcolorming then HealBot_Config.bcolorming[HealBot_Options_SkinsText:GetText()] = nil end if HealBot_Config.bcolorminb then HealBot_Config.bcolorminb[HealBot_Options_SkinsText:GetText()] = nil end if HealBot_Config.bfont then HealBot_Config.bfont[HealBot_Options_SkinsText:GetText()] = nil end + if HealBot_Config.bframe then HealBot_Config.bframe[HealBot_Options_SkinsText:GetText()] = nil end + if HealBot_Config.bframewidth then HealBot_Config.bframewidth[HealBot_Options_SkinsText:GetText()] = nil end + if HealBot_Config.bframecolr then HealBot_Config.bframecolr[HealBot_Options_SkinsText:GetText()] = nil end + if HealBot_Config.bframecolg then HealBot_Config.bframecolg[HealBot_Options_SkinsText:GetText()] = nil end + if HealBot_Config.bframecolb then HealBot_Config.bframecolb[HealBot_Options_SkinsText:GetText()] = nil end + if HealBot_Config.bframecola then HealBot_Config.bframecola[HealBot_Options_SkinsText:GetText()] = nil end table.remove(HealBot_Skins,HealBot_Config.Skin_ID) HealBot_Config.Skin_ID = 1; HealBot_Config.Skins = HealBot_Skins; diff --git a/Options/HealBot_Options_Skins.xml b/Options/HealBot_Options_Skins.xml index 9086440..05b58cd 100644 --- a/Options/HealBot_Options_Skins.xml +++ b/Options/HealBot_Options_Skins.xml @@ -93,23 +93,36 @@ - + - + - - - - - - + - + + + local scrollBar = getglobal(this:GetName().."ScrollBar"); + if not scrollBar then return end + local current = scrollBar:GetValue(); + local minVal, maxVal = scrollBar:GetMinMaxValues(); + if arg1 > 0 then + scrollBar:SetValue(math.max(minVal, current - 25)); + else + scrollBar:SetValue(math.min(maxVal, current + 25)); + end + + + + + + + + @@ -286,9 +299,16 @@ HealBot_Config.bborder[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 2); HealBot_Action_ResetSkin() + + + + getglobal(this:GetName().."Text"):SetText("Bar Frames") + HealBot_Options_BarFrame_OnClick(this) + + - + HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINTEXTURE,1,14) HealBot_Options_BarTextureS_OnValueChanged(this) @@ -326,13 +346,21 @@ HealBot_Options_BorderThicknessS_OnValueChanged(this) + + + + + HealBot_Options_val_OnLoad(this,"Frame Width",1,20) + HealBot_Options_BarFrameWidthS_OnValueChanged(this) + + - - + + @@ -639,10 +667,50 @@ HealBot_SkinColorpick_OnClick("Abort") + + + + + + + + + + + + + + + + + + + + + + + + this:SetMinMaxValues(0,100); this:SetValue(100); + + + + - - - + + + + diff --git a/README.md b/README.md index 49cd33c..44da407 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,10 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\ * **Feature - HoT Timer Display Modes & Positioning:** Added configurable HoT timer list position dropdown (`Below`, `Above`, `Left`, `Right`) relative to raid frames. Added `Icon Overlay` mode rendering countdown timers directly on health bar HoT icons, and a `Both` mode allowing simultaneous timer list and on-bar icon countdown numbers. Excluded pets from HoT timer lists and overlays. Optimized expiration lookups with O(1) texture-to-spell mappings. * **Refactor & Feature - Unified Aura & HoT Tracking:** Unified bar icons and HoT timers into a master dictionary (`HealBot_TrackedAuras`) in `HealBot_Data.lua`. Added Weakened Soul, Fear Ward, Abolish Disease, and Abolish Poison to active timer bars with localized client support and debuff-aware pruning. * **Bug Fix - HoT Tracking Premature Deletion & GUID Resolution:** Resolved issue where synchronous aura scans on spell cast prematurely purged active HoTs before server buff packets arrived. Fixed HoT timer list showing raw GUID strings instead of names by ensuring GUID caches populate immediately on `PLAYER_ENTERING_WORLD` (even when solo) and adding multi-tier name resolution fallbacks. Fixed unit bar icon countdown numbers not rendering by adding explicit overlay frame show triggers and normalized texture lookup fallbacks. -* **Feature - Debuff Visual Overlays & Animated Sprite Sheets:** Added selectable visual styles for Cure / Dispel / Cleanse (CDC) debuff alerts in Options -> Cure (`Whole Bar`, `Frame / Border`, `Glow Overlay`, `Glow + Frame`, `Animated`, `Disabled`). Animated flipbook textures for Poison (dripping slime teardrops), Curse (rising shadow wisps), Disease (creeping roots), and Magic(arcane sigils turning). Integrated lightweight, throttled (15 FPS) UV sprite animation engine directly into `HealBot_OnUpdate` with zero garbage allocation. +* **Feature - Debuff Visual Overlays & Animated Sprite Sheets:** Added selectable visual styles for Cure / Dispel / Cleanse (CDC) debuff alerts in Options -> Cure (`Whole Bar`, `Frame / Border`, `Glow Overlay`, `Glow + Frame`, `Animated`, `Disabled`). Modeled high-readability animated flipbook sprite sheets: Poison (dripping slime teardrops), Curse (tall 64px demonic flame pillars with embers and S-sway), Magic (large 48px rotating Arcane Sigil with outer celestial rings, astrolabe tick bands, and crackling mana lightning forks), and Disease (heavy necrotic border crust with 5 thick throbbing rot tendrils and bursting pustule boils). Integrated lightweight, throttled (15 FPS) UV sprite animation engine directly into `HealBot_OnUpdate` with zero garbage allocation. * **Feature - Debuff Animation Test Slash Commands:** Added `/hb test ` (and `/hb debuff `) commands to simulate active debuff animations on player and dummy test bars out-of-combat. Automatically activates Animated mode and dummy debuff icons, while guarding state against aura event overwrite until stopped. +* **Feature - Bar Frames (Borders) & Scrollable Skins Menu:** Added separate option in Skins menu to display frames/borders around each unit health bar with configurable width (1-20) and a dedicated color picker. Bar frames adapt to the skin's sharp ("1px Borders", `WHITE8X8`) or fuzzy (default tooltip border, `UI-Tooltip-Border`) style. Wired directly into the CDC debuff overlay engine: when cleanable debuffs trigger with Frame/Border, Glow+Frame, or Animated+Frame mode, the bar frame dynamically adopts the CDC debuff color and returns to the bar frame's regular color when dispelled. Implemented a scrollable container (`UIPanelScrollFrameTemplate`) with mouse wheel support in the Skins options panel to comfortably fit all layout, geometry, and color settings without control overlap. +* **Feature - CDC "Animated + Frame" Overlay Option:** Added "Animated + Frame" display option to the Cure / Dispel (CDC) options panel. Combines the active procedural animated debuff flipbook with a colored debuff border highlighting the bar frame. **v1.7.7** diff --git a/View/HealBot.lua b/View/HealBot.lua index 386a480..e60e918 100644 --- a/View/HealBot.lua +++ b/View/HealBot.lua @@ -62,7 +62,9 @@ function HealBot_SetTestDebuff(debuffType) if debuffType then HealBot_TestDebuff = debuffType; if HealBot_Config then - HealBot_Config.CDCOverlay = 5; -- Automatically switch to Animated mode + if HealBot_Config.CDCOverlay ~= 5 and HealBot_Config.CDCOverlay ~= 6 then + HealBot_Config.CDCOverlay = 5; -- Automatically switch to Animated mode + end end if not HealBot_UnitDebuff then HealBot_UnitDebuff = {} end HealBot_UnitDebuff["player"] = debuffType; diff --git a/View/HealBot_View_Bars.lua b/View/HealBot_View_Bars.lua index dc0a785..85359d3 100644 --- a/View/HealBot_View_Bars.lua +++ b/View/HealBot_View_Bars.lua @@ -2,6 +2,10 @@ -- Status bar rendering, color calculations, button styling, and debuff pulsing local HealBot_AnimTimer = 0 +local HealBot_BarFrame_Backdrop = { + tile = false, + insets = { left = 0, right = 0, top = 0, bottom = 0 } +} -- HealBot_Action_SetTexture: Internal utility: HealBot_Action_SetTexture function HealBot_Action_SetTexture(bar, btexture) @@ -242,8 +246,23 @@ function HealBot_Action_EnableButton(button) local debuffType = HealBot_UnitDebuff[unit] local isDead = state.isDead or state.isGhost or (not string.find(unit, "^Test") and UnitIsDeadOrGhost(unit)) local overlayMode = HealBot_Config.CDCOverlay or 1 + local skin = HealBot_Config.Current_Skin + local hasBarFrame = (HealBot_Config.bframe and HealBot_Config.bframe[skin] == 1) + local bfr = (HealBot_Config.bframecolr and HealBot_Config.bframecolr[skin]) or 1.0 + local bfg = (HealBot_Config.bframecolg and HealBot_Config.bframecolg[skin]) or 1.0 + local bfb = (HealBot_Config.bframecolb and HealBot_Config.bframecolb[skin]) or 1.0 + local bfa = (HealBot_Config.bframecola and HealBot_Config.bframecola[skin]) or 1.0 - if debuffType and not isDead and overlayMode > 1 and overlayMode < 6 then + local alphaBorder = 1.0 + local alphaOverlay = 1.0 + if not button:IsEnabled() then + local disAlpha = HealBot_Config.bardisa[skin] or 0.4 + alphaBorder = disAlpha + alphaOverlay = disAlpha + bfa = bfa * disAlpha + end + + if debuffType and not isDead and overlayMode > 1 and overlayMode < 7 then local color = HealBot_Config.CDCBarColour[debuffType] local cr, cg, cb = 1, 0, 0 if color then @@ -253,14 +272,6 @@ function HealBot_Action_EnableButton(button) button.debuffOverlay:SetFrameLevel(bar:GetFrameLevel() + 2) button.debuffOverlay:Show() - local alphaBorder = 1.0 - local alphaOverlay = 1.0 - if not button:IsEnabled() then - local disAlpha = HealBot_Config.bardisa[HealBot_Config.Current_Skin] or 0.4 - alphaBorder = disAlpha - alphaOverlay = disAlpha - end - if overlayMode == 2 then button.isAnimatedDebuff = false button.debuffOverlay:SetBackdropBorderColor(cr, cg, cb, alphaBorder) @@ -270,7 +281,11 @@ function HealBot_Action_EnableButton(button) end elseif overlayMode == 3 then button.isAnimatedDebuff = false - button.debuffOverlay:SetBackdropBorderColor(0, 0, 0, 0) + if hasBarFrame then + button.debuffOverlay:SetBackdropBorderColor(bfr, bfg, bfb, bfa) + else + button.debuffOverlay:SetBackdropBorderColor(0, 0, 0, 0) + end if button.debuffGlow then local glowTex = HealBot_Config.CDCOverlayTexture or "Interface\\AddOns\\HealBotBlue\\Images\\glow1.tga" button.debuffGlow:SetTexture(glowTex) @@ -291,7 +306,37 @@ function HealBot_Action_EnableButton(button) button.debuffGlow:Show() end elseif overlayMode == 5 then -- Animated - button.debuffOverlay:SetBackdropBorderColor(0, 0, 0, 0) + if hasBarFrame then + button.debuffOverlay:SetBackdropBorderColor(bfr, bfg, bfb, bfa) + else + button.debuffOverlay:SetBackdropBorderColor(0, 0, 0, 0) + end + if button.debuffGlow then + local glowTex + if debuffType == HEALBOT_POISON_en then + glowTex = "Interface\\AddOns\\HealBotBlue\\Images\\debuff_poison.tga" + button.isAnimatedDebuff = true + elseif debuffType == HEALBOT_CURSE_en then + glowTex = "Interface\\AddOns\\HealBotBlue\\Images\\debuff_curse.tga" + button.isAnimatedDebuff = true + elseif debuffType == HEALBOT_DISEASE_en then + glowTex = "Interface\\AddOns\\HealBotBlue\\Images\\debuff_disease.tga" + button.isAnimatedDebuff = true + elseif debuffType == HEALBOT_MAGIC_en then + glowTex = "Interface\\AddOns\\HealBotBlue\\Images\\debuff_magic.tga" + button.isAnimatedDebuff = true + else + glowTex = HealBot_Config.CDCOverlayTexture or "Interface\\AddOns\\HealBotBlue\\Images\\glow1.tga" + button.isAnimatedDebuff = false + button.debuffGlow:SetTexCoord(0, 1, 0, 1) + end + button.debuffGlow:SetTexture(glowTex) + button.debuffGlow:SetBlendMode("BLEND") + button.debuffGlow:SetVertexColor(cr, cg, cb, alphaOverlay) + button.debuffGlow:Show() + end + elseif overlayMode == 6 then -- Animated + Frame + button.debuffOverlay:SetBackdropBorderColor(cr, cg, cb, alphaBorder) if button.debuffGlow then local glowTex if debuffType == HEALBOT_POISON_en then @@ -319,11 +364,17 @@ function HealBot_Action_EnableButton(button) end else button.isAnimatedDebuff = false - button.debuffOverlay:Hide() if button.debuffGlow then button.debuffGlow:Hide() button.debuffGlow:SetTexCoord(0, 1, 0, 1) end + if hasBarFrame and not isDead then + button.debuffOverlay:SetFrameLevel(bar:GetFrameLevel() + 2) + button.debuffOverlay:SetBackdropBorderColor(bfr, bfg, bfb, bfa) + button.debuffOverlay:Show() + else + button.debuffOverlay:Hide() + end end end @@ -469,7 +520,7 @@ local HealBot_AnimFrame = 0 -- HealBot_Action_UpdateDebuffAnimation: Advances animated overlay frames on active debuffed buttons. function HealBot_Action_UpdateDebuffAnimation(elapsed) - if not HealBot_Config or HealBot_Config.CDCOverlay ~= 5 then return end + if not HealBot_Config or (HealBot_Config.CDCOverlay ~= 5 and HealBot_Config.CDCOverlay ~= 6) then return end HealBot_AnimTimer = HealBot_AnimTimer + elapsed if HealBot_AnimTimer < 0.066 then return end -- ~15 FPS @@ -515,6 +566,27 @@ function HealBot_Action_ResetSkin() local fontOutline = (HealBot_Config.bfontoutline and HealBot_Config.bfontoutline[skin]) or 0 local expectedFlags = fontOutline == 1 and "OUTLINE" or "" + local borderStyle = (HealBot_Config.bborder and HealBot_Config.bborder[skin]) or 2 + local width = (HealBot_Config.bframewidth and HealBot_Config.bframewidth[skin]) or 10 + local edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border" + if borderStyle == 1 then + edgeFile = "Interface\\Buttons\\WHITE8X8" + end + HealBot_BarFrame_Backdrop.edgeFile = edgeFile + HealBot_BarFrame_Backdrop.edgeSize = width + + for i = 1, 84 do + local btn = getglobal("HealBot_Action_HealUnit" .. i) + if btn then + if not btn.debuffOverlay then + btn.debuffOverlay = getglobal(btn:GetName() .. "DebuffOverlay") + end + if btn.debuffOverlay then + btn.debuffOverlay:SetBackdrop(HealBot_BarFrame_Backdrop) + end + end + end + if HealBot_Action_OptionsButton and HealBot_Action_OptionsButton:GetFontString() then HealBot_Action_OptionsButton:GetFontString():SetFont(bfont, btextheight, expectedFlags) end @@ -537,8 +609,12 @@ function HealBot_Action_ResetSkin() HealBot_Action_SetTexture(HealBot_EnTextColorpickin, HealBot_Config.btexture[skin]) HealBot_Action_SetTexture(HealBot_DisTextColorpick, HealBot_Config.btexture[skin]) HealBot_Action_SetTexture(HealBot_DebTextColorpick, HealBot_Config.btexture[skin]) + if HealBot_BarFrameColorpick then + HealBot_Action_SetTexture(HealBot_BarFrameColorpick, HealBot_Config.btexture[skin]) + end HealBot_SetSkinColours() end + HealBot_Action_EnableButtons() end -- HealBot_Action_RefreshButtons: Refreshes all active unit buttons.