Fix: backported handling of oUF_RaidDebuffs plugin and BuffIndicator module to adhere to 1.12 API

This commit is contained in:
Bluewhale1337
2026-07-26 10:55:35 +02:00
parent 8b5e42d4df
commit 822f2301cb
3 changed files with 9 additions and 11 deletions
@@ -109,13 +109,8 @@ end
local function onUpdate(self, elapsed) local function onUpdate(self, elapsed)
self.elapsed = (self.elapsed or 0) + elapsed self.elapsed = (self.elapsed or 0) + elapsed
if self.elapsed >= 0.1 then if self.elapsed >= 0.1 then
local _, _, _, _, _, _, timeLeft = UnitDebuff(self.__owner.unit, self.index, "HARMFUL") self:SetScript('OnUpdate', nil)
if timeLeft and timeLeft > 0 then self.time:Hide()
self.time:SetText(formatTime(timeLeft))
else
self:SetScript('OnUpdate', nil)
self.time:Hide()
end
self.elapsed = 0 self.elapsed = 0
end end
end end
@@ -178,8 +173,9 @@ local function Update(self, event, unit)
local _stackThreshold = 0 local _stackThreshold = 0
for i = 1, 40 do for i = 1, 40 do
name, _, icon, count, debuffType, duration, expirationTime = UnitDebuff(unit, i, "HARMFUL") local texture, stackCount, dType = UnitDebuff(unit, i, "HARMFUL")
if not (name and icon) then break end name, icon, count, debuffType, duration, expirationTime = texture, texture, stackCount, dType, nil, nil
if not name then break end
if(addon.ShowDispellableDebuff and (element.showDispellableDebuff ~= false) and debuffType) then if(addon.ShowDispellableDebuff and (element.showDispellableDebuff ~= false) and debuffType) then
if(addon.FilterDispellableDebuff) then if(addon.FilterDispellableDebuff) then
@@ -111,7 +111,8 @@ function UF:UpdateAuraWatch(frame, petOverride, db)
for i = 1, getn(buffs) do for i = 1, getn(buffs) do
if buffs[i].id then if buffs[i].id then
local name, _, image = UnitBuff(frame.unit, buffs[i].id) local image, count = UnitBuff(frame.unit, buffs[i].id)
local name = image
if name then if name then
local icon local icon
if not auras.icons[buffs[i].id] then if not auras.icons[buffs[i].id] then
+2 -1
View File
@@ -6,6 +6,7 @@
# This repository is actively being fixed and maintained by Bluewhale. # This repository is actively being fixed and maintained by Bluewhale.
## Changelog ## Changelog
- **Fix:** Corrected Vanilla WoW (1.12) `UnitBuff` and `UnitDebuff` API parsing in `BuffIndicator` and `oUF_RaidDebuffs` to prevent missing textures and improper debuff filtering.
- **Fix:** Removed implicit `arg` table leak in `hooksecurefunc` (varargs `...` issue in Lua 5.0). - **Fix:** Removed implicit `arg` table leak in `hooksecurefunc` (varargs `...` issue in Lua 5.0).
- **Fix:** Stripped invisible UTF-8 BOM from `utf8data.lua` that caused Lua parser errors. - **Fix:** Stripped invisible UTF-8 BOM from `utf8data.lua` that caused Lua parser errors.
- **Fix:** Resolved tooltip crash with ShaguTweaks by reusing existing `backdrop` frames in `CreateBackdrop` instead of unconditionally overwriting them. - **Fix:** Resolved tooltip crash with ShaguTweaks by reusing existing `backdrop` frames in `CreateBackdrop` instead of unconditionally overwriting them.
@@ -13,7 +14,7 @@
- **Fix:** Added type safety checks to `SetOutside` and `SetInside` to prevent crashes when other addons overwrite frame globals with dummy functions. - **Fix:** Added type safety checks to `SetOutside` and `SetInside` to prevent crashes when other addons overwrite frame globals with dummy functions.
- **Fix:** Added type safety check before calling `SetTexture("")` on Blizzard header frames, preventing crashes when headers are modified by other addons or the custom client. - **Fix:** Added type safety check before calling `SetTexture("")` on Blizzard header frames, preventing crashes when headers are modified by other addons or the custom client.
- **Fix:** Wrapped `SetParent` in `pcall` within `CreateBackdrop` to prevent crashes on non-UI object dummy tables. - **Fix:** Wrapped `SetParent` in `pcall` within `CreateBackdrop` to prevent crashes on non-UI object dummy tables.
- **Fix:** Added graceful `nil` fallbacks to `E:Point`, `E:Size`, `E:Width`, and `E:Height` layout anchors, immunizing the UI against crashes when Turtle WoW or other addons delete elements. - **Fix:** Added graceful `nil` fallbacks to `E:Point`, `E:Size`, `E:Width`, and `E:Height` layout anchors, immunizing the UI against crashes when custom scripts or other addons delete elements.
- **Fix:** Rewrote `Misc.lua` options skinning loops using `pairs()` to resolve Lua 5.0 `attempt to call a nil value` crashes caused by missing options tabs/sliders/checkboxes. - **Fix:** Rewrote `Misc.lua` options skinning loops using `pairs()` to resolve Lua 5.0 `attempt to call a nil value` crashes caused by missing options tabs/sliders/checkboxes.
- **Fix:** Added element existence checks in `Skins.lua` `HandleButton` and `HandleRotateButton` to skip skinning gracefully instead of crashing on `nil`. - **Fix:** Added element existence checks in `Skins.lua` `HandleButton` and `HandleRotateButton` to skip skinning gracefully instead of crashing on `nil`.