From 0b10405f26b1baa8f0ba3d2d63f1264311d12b72 Mon Sep 17 00:00:00 2001 From: Britt Yazel Date: Fri, 26 Jul 2024 08:56:28 -0700 Subject: [PATCH] Less specific checks on client version, check for functions instead --- EnhancedRaidFrames.lua | 2 +- Modules/AuraIndicators.lua | 4 ++-- Modules/AuraListeners.lua | 4 ++-- Modules/TargetMarkers.lua | 2 +- Overrides.lua | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/EnhancedRaidFrames.lua b/EnhancedRaidFrames.lua index ed2088e..769af69 100644 --- a/EnhancedRaidFrames.lua +++ b/EnhancedRaidFrames.lua @@ -134,7 +134,7 @@ end function EnhancedRaidFrames:RefreshConfig() self:GenerateAuraStrings() self:UpdateScale() - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:UpdateIndicators(frame, true) diff --git a/Modules/AuraIndicators.lua b/Modules/AuraIndicators.lua index 7af607c..e641a1f 100644 --- a/Modules/AuraIndicators.lua +++ b/Modules/AuraIndicators.lua @@ -149,7 +149,7 @@ end --- Update all mouse behavior for all indicators --- This is used to update all indicators when the user changes the mouseoverCastCompat option function EnhancedRaidFrames:SetAllMouseBehavior() - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:SetMouseBehavior(frame) @@ -203,7 +203,7 @@ function EnhancedRaidFrames:UpdateAllIndicators(setAppearance) return end - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:UpdateIndicators(frame, setAppearance) diff --git a/Modules/AuraListeners.lua b/Modules/AuraListeners.lua index fbf28f3..1f1a029 100644 --- a/Modules/AuraListeners.lua +++ b/Modules/AuraListeners.lua @@ -53,7 +53,7 @@ end --- Creates a listener for the UNIT_AURA event attached to all raid frames --- This function explicitly creates a listener for all raid frames, even if they aren't visible. function EnhancedRaidFrames:CreateAllAuraListeners() - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:CreateAuraListener(frame) @@ -71,7 +71,7 @@ end --- Scans all raid frame units and updates the unitAuras table with all auras on each unit. function EnhancedRaidFrames:UpdateAllAuras() -- Iterate over all raid frame units and force a full update - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:UpdateUnitAuras(frame, { isFullUpdate = true }) diff --git a/Modules/TargetMarkers.lua b/Modules/TargetMarkers.lua index 58321ad..0ffbdce 100644 --- a/Modules/TargetMarkers.lua +++ b/Modules/TargetMarkers.lua @@ -123,7 +123,7 @@ end --- Update the appearance of our target markers for all frames function EnhancedRaidFrames:UpdateAllTargetMarkers() - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:UpdateTargetMarker(frame) diff --git a/Overrides.lua b/Overrides.lua index a979ea4..12c9b43 100644 --- a/Overrides.lua +++ b/Overrides.lua @@ -12,7 +12,7 @@ local LibRangeCheck = LibStub("LibRangeCheck-3.0") --- Set the visibility on the stock buff/debuff frames function EnhancedRaidFrames:UpdateAllStockAuraVisibility() - if not self.isWoWClassicEra and not self.isWoWClassic then + if CompactRaidFrameContainer and CompactRaidFrameContainer.ApplyToFrames then -- 10.0 refactored CompactRaidFrameContainer with new functionality CompactRaidFrameContainer:ApplyToFrames("normal", function(frame) self:UpdateStockAuraVisibility(frame)