From 913ab315b06dad22f44c4dd486f31403fe7c6f6f Mon Sep 17 00:00:00 2001 From: Bluewhale1337 <295648290+Bluewhale1337@users.noreply.github.com> Date: Tue, 23 Jun 2026 22:48:40 +0200 Subject: [PATCH] Commit 2 Added a native Action Bar Hovercasting (Mouseover) engine. You can now cast spells on hovered targets using action bar keybinds without losing your current target. Togglable in Options -> General. Added Fear Ward to the global HoT tracker, which will display the icon directly on the unit frame. Fixed Shaman weapon buff tracking (e.g., Rockbiter) failing due to spell ranks in tooltips. Fixed missing health bar skin textures by ensuring `.tga` paths are explicitly resolved. ixed division-by-zero math errors during UI scaling that caused the addon to crash. Signed-off-by: Bluewhale1337 <295648290+Bluewhale1337@users.noreply.github.com> --- HealBot.lua | 80 +++++++++++++++++++--------------- HealBotBlue.toc | 2 +- HealBot_Action.lua | 29 +++++++------ HealBot_Localization.de.lua | 24 ++++++----- HealBot_Localization.en.lua | 48 +++++++++++---------- HealBot_Localization.fr.lua | 23 +++++----- HealBot_Localization.kr.lua | 23 +++++----- HealBot_Options.lua | 11 +++++ HealBot_Options.xml | 14 ++++++ README.md | 85 ++++++++++++++++--------------------- 10 files changed, 186 insertions(+), 153 deletions(-) diff --git a/HealBot.lua b/HealBot.lua index 55b0980..dc4c667 100644 --- a/HealBot.lua +++ b/HealBot.lua @@ -227,7 +227,7 @@ function HealBot_GetSpellName(id) if (not subSpellName or subSpellName=="") then return spellName; end - return spellName .. "(" .. subSpellName .. ")"; + return spellName .. " (" .. subSpellName .. ")"; end function HealBot_GetSpellId(spell) @@ -938,43 +938,11 @@ HealBot_MissingBuffs = {} function HealBot_CheckShamanWeaponBuff(spellName) local hasMainHandEnchant, _, _, hasOffHandEnchant = GetWeaponEnchantInfo() - if not (hasMainHandEnchant or hasOffHandEnchant) then return false end - local baseName = string.gsub(spellName, " Weapon", "") - - HealBot_ScanTooltip:SetOwner(UIParent, "ANCHOR_NONE") - - if hasMainHandEnchant then - HealBot_ScanTooltip:ClearLines() - HealBot_ScanTooltip:SetInventoryItem("player", 16) - local numLines = HealBot_ScanTooltip:NumLines() - for i = 1, numLines do - local line = getglobal("HealBot_ScanTooltipTextLeft"..i) - if line and line:GetText() then - if string.find(line:GetText(), baseName) then - HealBot_ScanTooltip:Hide() - return true - end - end - end + if hasMainHandEnchant or hasOffHandEnchant then + return true end - if hasOffHandEnchant then - HealBot_ScanTooltip:ClearLines() - HealBot_ScanTooltip:SetInventoryItem("player", 17) - local numLines = HealBot_ScanTooltip:NumLines() - for i = 1, numLines do - local line = getglobal("HealBot_ScanTooltipTextLeft"..i) - if line and line:GetText() then - if string.find(line:GetText(), baseName) then - HealBot_ScanTooltip:Hide() - return true - end - end - end - end - - HealBot_ScanTooltip:Hide() return false end @@ -1069,6 +1037,7 @@ function HealBot_OnEvent_UnitAura(this,unit) ["Interface\\Icons\\Spell_Nature_ResistNature"] = true, ["Interface\\Icons\\Spell_Holy_PowerWordShield"] = true, ["Interface\\Icons\\Spell_Holy_SealOfProtection"] = true, + ["Interface\\Icons\\Spell_Holy_Excorcism"] = true, } local i = 1; @@ -1579,3 +1548,44 @@ function HealBot_Range_Check(unit, range) return return_val; end +-------------------------------------------------------------------------------- +-- Native Action Bar Hovercasting (Mouseover Hook) +-------------------------------------------------------------------------------- +do + local pass = function() end + local orig = UseAction + function UseAction(slot, checkCursor, onSelf) + if HealBot_Config.ActionMouseover == 1 then + local mouseover = HealBot_Action_TooltipUnit + if mouseover and mouseover ~= 'target' then + local _PlaySound = PlaySound + local target = UnitName("target") + + PlaySound = pass + ClearTarget() + PlaySound = _PlaySound + + do + local autoSelfCast = GetCVar("autoSelfCast") + SetCVar("autoSelfCast", "0") -- Ensure disabled + orig(slot, checkCursor, onSelf) + if autoSelfCast then + SetCVar("autoSelfCast", autoSelfCast) + end + end + + SpellTargetUnit(mouseover) + + if target then + PlaySound = pass + TargetLastTarget() + PlaySound = _PlaySound + end + + return + end + end + orig(slot, checkCursor, onSelf) + end +end + diff --git a/HealBotBlue.toc b/HealBotBlue.toc index d6dd805..a3a57dc 100644 --- a/HealBotBlue.toc +++ b/HealBotBlue.toc @@ -1,6 +1,6 @@ ## Interface: 11200 ## Title: HealBotBlue -## Version: 1.0 +## Version: 1.1 ## Author: Bluewhale ## Notes: Adds panel with skinable bars for healing and decursive ## SavedVariables: HealBot_Config diff --git a/HealBot_Action.lua b/HealBot_Action.lua index a876d5b..f6b819b 100644 --- a/HealBot_Action.lua +++ b/HealBot_Action.lua @@ -143,7 +143,8 @@ function HealBot_Action_EnableButton(button) local sb=HealBot_Config.btextenabledcolb[HealBot_Config.Current_Skin]; local sa=HealBot_Config.btextenabledcola[HealBot_Config.Current_Skin]; local r,g,b,a = HealBot_HealthColor(button.unit,hlth,maxhlth) - local btextheight=HealBot_Config.btextheight[HealBot_Config.Current_Skin] + local btextheight=HealBot_Config.btextheight[HealBot_Config.Current_Skin] or 10; + if btextheight == 0 then btextheight = 10 end local bwidth = HealBot_Config.bwidth[HealBot_Config.Current_Skin] local textlen = floor(5+(((bwidth*1.8)/btextheight)-(btextheight/2))) @@ -248,14 +249,14 @@ end function HealBot_Action_ResetSkin() HealBot_Action_PartyChanged() if HealBot_Options:IsVisible() then - HealBot_DiseaseColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_MagicColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_PoisonColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_CurseColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_EnTextColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_EnTextColorpickin:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_DisTextColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); - HealBot_DebTextColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]); + HealBot_DiseaseColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_MagicColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_PoisonColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_CurseColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_EnTextColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_EnTextColorpickin:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_DisTextColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); + HealBot_DebTextColorpick:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..HealBot_Config.btexture[HealBot_Config.Current_Skin]..".tga"); HealBot_SetSkinColours() end end @@ -705,13 +706,13 @@ if not HealBot_IsFighting then local bar2 = HealBot_Action_HealthBar2(button); bar.txt = getglobal(bar:GetName().."_text"); bar:SetHeight(bheight); - bar:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..btexture); + bar:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..btexture..".tga"); bar.txt:SetTextHeight(btextheight); local barScale = bar:GetScale(); bar:SetScale(barScale + 0.01); bar:SetScale(barScale); bar2:SetHeight(bheight); - bar2:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..btexture); + bar2:SetStatusBarTexture("Interface\\AddOns\\HealBotBlue\\images\\bar"..btexture..".tga"); end); if MaxOffsetYHealBot_Options_PanelSounds_OnClick(this) + + + + + + + + + + HealBot_Options_ActionMouseover_OnLoad(this,"Enable Action Bar Mouseover") + HealBot_Options_ActionMouseover_OnClick(this) + + + diff --git a/README.md b/README.md index 9abdd25..a9ec9bc 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,37 @@ -HealBotBlue by Bluewhale. - -This addon is built on top of Strife's HealBot Continues which was built on original Healbot, however a lot of code got refactored and changed, with more flexibilty and functions. - --------------------------------------------- -NOTE: For HealBot to work correctly, the Selfcast feature in wow options needs to be disabled. --------------------------------------------- - -Reporting ERRORS: -================ -Major error will popup a frame with error information. -Take a screenshot and post comments. - - -Change log: -v1.0.0 - -This addon is built on top of HealBot Continues by Strife. Majority of code got refactored, removed and moved around. -New functionality implemented: - --Buff tracking - --Hot tracking with icons - --Incoming heals use newer protocol - --Chat functionalities - --Might not work on servers other than TurtleWow clones. It uses Turtle based api for some calls - --Mana bars for healers in grid. - -TODO: -- Mouseover casting -- Updating bonus values according to TurtleWoW and it's clones talent values. - -Installation : - -Unpack the zipped file and place the HealBot folder under Interface/AddOns -in your World of Warcraft directory. Path with default installation: -C:\Program Files\World of Warcraft\Interface\AddOns\HealBot - - -Chat commands : - -/hb - toggles the main HealBot panel on and off -/hb options - toggles the HealBot options panel on and off -/hb reset - resets the contents of the main HealBot panel +**HealBotBlue** +By Bluewhale. + +> **NOTE:** For HealBot to work correctly, the **Selfcast** feature in WoW options needs to be disabled. + +### Reporting Errors +Major errors will pop up a frame with error information. Take a screenshot and post comments. + +### Installation +Unpack the zipped file and place the `HealBotBlue` folder under `Interface/AddOns` in your World of Warcraft directory. +Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\HealBotBlue` + +### Chat Commands +* `/hb` - Toggles the main HealBot panel on and off +* `/hb options` - Toggles the HealBot options panel on and off +* `/hb reset` - Resets the contents of the main HealBot panel + +### Option Changes from the original HealBot Continues + +### Change Log + +**v1.1** +* **Native Hovercasting:** Added a native Action Bar Hovercasting (Mouseover) engine. You can now cast spells on hovered targets using action bar keybinds without losing your current target. Togglable in Options -> General. +* **Fear Ward Tracking:** Added Fear Ward to the global HoT tracker, which will display the icon directly on the unit frame. +* **Bug Fix:** Fixed Shaman weapon buff tracking (e.g., Rockbiter) failing due to spell ranks in tooltips. +* **Bug Fix:** Fixed missing health bar skin textures by ensuring `.tga` paths are explicitly resolved. +* **Bug Fix:** Fixed division-by-zero math errors during UI scaling that caused the addon to crash. + +**v1.0** +* **Buff tracking** - Added submenu for tracking buffs on element +* ***Hot tracking with icons** - Hots and DoTs display on player bars +* **Incoming heals use newer protocol** +* **Chat functionalities** - modified chat functionalities for spellcast announcements +* **Mana Bars** - Mana bars for healers in the grid added togglable from options menu. + + +