fix: throttle debuff warnings to once per debuff type and increase detection range to 40 yards

This commit is contained in:
Bluewhale1337
2026-09-06 11:55:20 +02:00
parent b64e7070ba
commit 3ebcecb8e6
3 changed files with 20 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200
## Title: HealBotBlue
## Version: 1.7.0
## Version: 1.7.1
## Author: Bluewhale
## Notes: Adds panel with skinable bars for healing and decursive
## SavedVariablesPerCharacter: HealBot_Config
+7 -1
View File
@@ -159,6 +159,7 @@ local HealBot_TrackedHoTs = {
}
local HealBot_DebuffTypeMap = nil
local HealBot_AuraWarningPlayed = {}
-- HealBot_OnEvent_UnitAura: Updates debuff lists and icon textures on aura change.
function HealBot_OnEvent_UnitAura(this, unit)
@@ -276,7 +277,9 @@ function HealBot_OnEvent_UnitAura(this, unit)
end
if HealBot_UnitDebuff[unit] then
if DebuffType and HealBot_Range_Check(unit, 27) == 1 then
if DebuffType and HealBot_Range_Check(unit, 40) == 1 then
if HealBot_AuraWarningPlayed[unit] ~= DebuffType then
HealBot_AuraWarningPlayed[unit] = DebuffType
if HealBot_Config.ShowDebuffWarning == 1 then
local color = HealBot_Config.CDCBarColour[DebuffType]
local r, g, b = 1, 0, 0
@@ -290,6 +293,9 @@ function HealBot_OnEvent_UnitAura(this, unit)
if HealBot_Config.SoundDebuffWarning == 1 then HealBot_PlaySound(HealBot_Config.SoundDebuffPlay); end
end
end
else
HealBot_AuraWarningPlayed[unit] = nil
end
-- Check buffs synchronously because tooltip scanning fails in OnUpdate
HealBot_CheckBuffs(unit)
+3
View File
@@ -49,6 +49,9 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
### Change Log
**v1.7.1**
* **Bug Fix** - Fixed an issue where the debuff warning sound and UI message would spam repeatedly on every aura update. The warning now only plays once per unique dispellable debuff type applied to a unit. Increased warning trigger range to 40 yards.
**v1.7.0**
* **Feature - Raid Marks** - Added tracking and display of raid marks on unit frames.
* **External Addon Integrations** - Added a new '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).