From 2aea3b7a0d07106ed1e38b7cf399783b4263bc17 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Sat, 1 Mar 2025 17:14:36 +0100 Subject: [PATCH 1/3] Gradient implementation --- WeakAuras/RegionTypes/AuraBar.lua | 162 ++++++++++++++------- WeakAuras/SubRegionTypes/Model.lua | 2 +- WeakAuras/SubRegionTypes/StopMotion.lua | 2 +- WeakAurasOptions/RegionOptions/AuraBar.lua | 24 ++- 4 files changed, 133 insertions(+), 57 deletions(-) diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index 7b59ea4..e37d2a5 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -19,6 +19,9 @@ local default = { orientation = "HORIZONTAL", inverse = false, barColor = {1.0, 0.0, 0.0, 1.0}, + barColor2 = {1.0, 1.0, 0.0, 1.0}, + enableGradient = false, + gradientOrientation = "HORIZONTAL", backgroundColor = {0.0, 0.0, 0.0, 0.5}, spark = false, sparkWidth = 10, @@ -68,10 +71,26 @@ local properties = { type = "textureLSM", }, barColor = { - display = L["Bar Color"], + display = L["Bar Color/Gradient Start"], setter = "Color", type = "color", }, + barColor2 = { + display = L["Gradient End"], + setter = "SetBarColor2", + type = "color", + }, + gradientOrientation = { + display = L["Gradient Orientation"], + setter = "SetGradientOrientation", + type = "list", + values = Private.gradient_orientations + }, + enableGradient = { + display = L["Gradient Enabled"], + setter = "SetGradientEnabled", + type = "bool", + }, icon_visible = { display = {L["Icon"], L["Visibility"]}, setter = "SetIconVisible", @@ -265,17 +284,15 @@ local barPrototype = { self.directionInverse = (self.orientation == "HORIZONTAL_INVERSE") or (self.orientation == "VERTICAL") local TLx, TLy, BLx, BLy, TRx, TRy, BRx, BRy = self.GetTexCoord(0, 1); - self.bg:SetTexCoord(TLx , TLy , BLx , BLy , TRx , TRy , BRx , BRy ); + self.bg:SetTexCoord(TLx, TLy, BLx, BLy, TRx, TRy, BRx, BRy) + self.fg:SetTexCoord(TLx, TLy, BLx, BLy, TRx, TRy, BRx, BRy) -- Set alignment - self.fg:ClearAllPoints(); - self.fg:SetPoint(self.align1); - self.fg:SetPoint(self.align2); - self.fgFrame:ClearAllPoints() - self.fgFrame:SetPoint(self.align1); - self.fgFrame:SetPoint(self.align2); + self.fgMask:ClearAllPoints() + self.fgMask:SetPoint(self.align1, self, self.align1) + self.fgMask:SetPoint(self.align2, self, self.align2) - self.spark:SetPoint("CENTER", self.fg, self.alignSpark, self.spark.sparkOffsetX or 0, self.spark.sparkOffsetY or 0); + self.spark:SetPoint("CENTER", self.fgMask, self.alignSpark, self.spark.sparkOffsetX or 0, self.spark.sparkOffsetY or 0); local sparkMirror = self.spark.sparkMirror; local sparkRotationMode = self.spark.sparkRotationMode; @@ -301,18 +318,24 @@ local barPrototype = { -- Create statusbar illusion if (self.horizontal) then local xProgress = self:GetRealSize() * progress; - self.fg:SetWidth(xProgress > 0.0001 and xProgress or 0.0001); - self.fgFrame:SetWidth(xProgress > 0.0001 and xProgress or 0.0001); + local show = xProgress > 0.0001 + self.fgMask:SetWidth(show and (xProgress + 0.1) or 0.1); + if show then + self.fg:Show() + else + self.fg:Hide() + end else local yProgress = select(2, self:GetRealSize()) * progress; - self.fg:SetHeight(yProgress > 0.0001 and yProgress or 0.0001); - self.fgFrame:SetHeight(yProgress > 0.0001 and yProgress or 0.0001); + local show = yProgress > 0.0001 + self.fgMask:SetHeight(show and (yProgress + 0.1) or 0.1); + if show then + self.fg:Show() + else + self.fg:Hide() + end end - -- Stretch texture - local TLx_, TLy_, BLx_, BLy_, TRx_, TRy_, BRx_, BRy_ = self.GetTexCoord(0, progress); - self.fg:SetTexCoord(TLx_, TLy_, BLx_, BLy_, TRx_, TRy_, BRx_, BRy_); - local sparkHidden = self.spark.sparkHidden; local sparkVisible = sparkHidden == "NEVER" or (sparkHidden == "FULL" and progress < 1) @@ -562,8 +585,8 @@ local barPrototype = { self.fg:SetVertexColor(r, g, b, a); end, - ["GetForegroundColor"] = function(self) - return self.fg:GetVertexColor(); + ["SetForegroundGradient"] = function(self, orientation, r1, g1, b1, a1, r2, g2, b2, a2) + self.fg:SetGradientAlpha(orientation, r1, g1, b1, a1, r2, g2, b2, a2) end, -- Set background color @@ -571,10 +594,6 @@ local barPrototype = { self.bg:SetVertexColor(r, g, b, a); end, - ["GetBackgroundColor"] = function(self) - return self.bg:GetVertexColor(); - end, - -- Convenience methods ["SetTexture"] = function(self, texture) self:SetStatusBarTexture(texture); @@ -588,10 +607,6 @@ local barPrototype = { self:SetForegroundColor(r, g, b, a); end, - ["GetVertexColor"] = function(self) - return self.fg:GetVertexColor(); - end, - ["GetRealSize"] = function(self) return 0, 0 end, @@ -774,7 +789,7 @@ local funcs = { elseif anchorPoint == "icon" then anchor = self.icon elseif anchorPoint == "fg" then - anchor = self.bar.fgFrame + anchor = self.bar.fgMask elseif anchorPoint == "bg" then anchor = self.bar.bg end @@ -1066,6 +1081,53 @@ local funcs = { end self.subRegionEvents:Notify("OrientationChanged") + end, + UpdateForegroundColor = function(self) + if self.enableGradient then + self.bar:SetForegroundGradient(self.gradientOrientation, + self.color_anim_r or self.color_r, + self.color_anim_g or self.color_g, + self.color_anim_b or self.color_b, + self.color_anim_a or self.color_a, + self.barColor2[1], + self.barColor2[2], + self.barColor2[3], + self.barColor2[4]) + else + self.bar:SetForegroundColor(self.color_anim_r or self.color_r, + self.color_anim_g or self.color_g, + self.color_anim_b or self.color_b, + self.color_anim_a or self.color_a); + end + end, + SetBarColor2 = function(self, r, g, b, a) + self.barColor2 = { r, g, b, a} + self:UpdateForegroundColor() + end, + SetGradientOrientation = function(self, orientation) + self.gradientOrientation = orientation + self:UpdateForegroundColor() + end, + SetGradientEnabled = function(self, enable) + self.enableGradient = enable + self:UpdateForegroundColor() + end, + Color = function(self, r, g, b, a) + self.color_r = r; + self.color_g = g; + self.color_b = b; + self.color_a = a; + self:UpdateForegroundColor() + end, + ColorAnim = function(self, r, g, b, a) + self.color_anim_r = r; + self.color_anim_g = g; + self.color_anim_b = b; + self.color_anim_a = a; + self:UpdateForegroundColor() + end, + GetColor = function(self) + return self.color_r, self.color_g, self.color_b, self.color_a end } @@ -1091,16 +1153,26 @@ local function create(parent) region:SetResizable(true); region:SetMinResize(1, 1); - -- Create statusbar (inherit prototype) local bar = CreateFrame("Frame", nil, region); WeakAuras.Mixin(bar, Private.SmoothStatusBarMixin); - local fg = bar:CreateTexture(nil, "BORDER"); - local bg = region:CreateTexture(nil, "BACKGROUND"); + + -- Now create a bunch of textures + local bg = region:CreateTexture(nil, "ARTWORK"); bg:SetAllPoints(bar); - local fgFrame = CreateFrame("Frame", nil, bar) + + -- Workaround für Masking mit einer zusätzlichen Alpha-Textur + local fgMask = CreateFrame("Frame", nil, bar) + fgMask:SetAllPoints(bar) + + local fg = fgMask:CreateTexture(nil, "ARTWORK"); + fg:SetAllPoints(fgMask) + local spark = bar:CreateTexture(nil, "ARTWORK"); + fg:SetDrawLayer("ARTWORK", -1); + bg:SetDrawLayer("ARTWORK", -2); + spark:SetDrawLayer("ARTWORK", 7); bar.fg = fg; - bar.fgFrame = fgFrame + bar.fgMask = fgMask bar.bg = bg; bar.spark = spark; for key, value in pairs(barPrototype) do @@ -1170,6 +1242,10 @@ local function modify(parent, region, data) region.orientation = data.orientation region.effectiveOrientation = nil + -- region.barColor is special because of animations + region.barColor2 = CopyTable(data.barColor2) + region.enableGradient = data.enableGradient + region.gradientOrientation = data.gradientOrientation region.overlayclip = data.overlayclip; region.iconVisible = data.icon region.icon_side = data.icon_side @@ -1209,26 +1285,6 @@ local function modify(parent, region, data) bar.spark.sparkRotation = data.sparkRotation; bar.spark.sparkMirror = data.sparkMirror; - -- Color update function - region.Color = region.Color or function(self, r, g, b, a) - self.color_r = r; - self.color_g = g; - self.color_b = b; - self.color_a = a; - self.bar:SetForegroundColor(self.color_anim_r or r, self.color_anim_g or g, self.color_anim_b or b, self.color_anim_a or a); - end - - region.ColorAnim = function(self, r, g, b, a) - self.color_anim_r = r; - self.color_anim_g = g; - self.color_anim_b = b; - self.color_anim_a = a; - self.bar:SetForegroundColor(r or self.color_r, g or self.color_g, b or self.color_b, a or self.color_a); - end - - region.GetColor = region.GetColor or function(self) - return self.color_r, self.color_g, self.color_b, self.color_a - end region:Color(data.barColor[1], data.barColor[2], data.barColor[3], data.barColor[4]); -- Update icon visibility diff --git a/WeakAuras/SubRegionTypes/Model.lua b/WeakAuras/SubRegionTypes/Model.lua index d3d2e17..05191be 100644 --- a/WeakAuras/SubRegionTypes/Model.lua +++ b/WeakAuras/SubRegionTypes/Model.lua @@ -188,7 +188,7 @@ local function modify(parent, region, parentData, data, first) local anchor if parentData.regionType == "aurabar" then if data.bar_model_clip then - anchor = parent.bar.fgFrame + anchor = parent.bar.fgMask else anchor = parent.bar end diff --git a/WeakAuras/SubRegionTypes/StopMotion.lua b/WeakAuras/SubRegionTypes/StopMotion.lua index e4be67d..337e15c 100644 --- a/WeakAuras/SubRegionTypes/StopMotion.lua +++ b/WeakAuras/SubRegionTypes/StopMotion.lua @@ -195,7 +195,7 @@ local function modify(parent, region, parentData, data, first) -- Special anchoring for clipping ! region:SetScript("OnSizeChanged", nil) region:ClearAllPoints() - region:SetAllPoints(parent.bar.fgFrame) + region:SetAllPoints(parent.bar.fgMask) region.stopMotion:ClearAllPoints() region.stopMotion:SetAllPoints(region.parent.bar) else diff --git a/WeakAurasOptions/RegionOptions/AuraBar.lua b/WeakAurasOptions/RegionOptions/AuraBar.lua index 742fc24..006118a 100644 --- a/WeakAurasOptions/RegionOptions/AuraBar.lua +++ b/WeakAurasOptions/RegionOptions/AuraBar.lua @@ -138,13 +138,33 @@ local function createOptions(id, data) name = L["Bar Color Settings"], order = 39 }, + enableGradient = { + type = "toggle", + width = WeakAuras.normalWidth, + name = L["Enable Gradient"], + order = 39.1 + }, + gradientOrientation = { + type = "select", + width = WeakAuras.normalWidth, + values = OptionsPrivate.Private.gradient_orientations, + name = L["Gradient Orientation"], + order = 39.2 + }, barColor = { type = "color", width = WeakAuras.normalWidth, - name = L["Bar Color"], + name = L["Bar Color/Gradient Start"], hasAlpha = true, order = 39.3 }, + barColor2 = { + type = "color", + width = WeakAuras.normalWidth, + name = L["Gradient End"], + hasAlpha = true, + order = 39.4 + }, backgroundColor = { type = "color", width = WeakAuras.normalWidth, @@ -870,4 +890,4 @@ end OptionsPrivate.registerRegions = OptionsPrivate.registerRegions or {} table.insert(OptionsPrivate.registerRegions, function() OptionsPrivate.Private.RegisterRegionOptions("aurabar", createOptions, createIcon, L["Progress Bar"], createThumbnail, modifyThumbnail, L["Shows a progress bar with name, timer, and icon"], templates, GetAnchors); -end) \ No newline at end of file +end) From 049dae9b04158dda9294c97890b192ba9331f2c8 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Sat, 1 Mar 2025 21:04:02 +0100 Subject: [PATCH 2/3] fix frame order --- WeakAuras/RegionTypes/AuraBar.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index e37d2a5..b63df2e 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -1156,20 +1156,17 @@ local function create(parent) local bar = CreateFrame("Frame", nil, region); WeakAuras.Mixin(bar, Private.SmoothStatusBarMixin); + local fgMask = CreateFrame("Frame", nil, bar) + fgMask:SetAllPoints(bar) + + local fg = fgMask:CreateTexture(nil, "BORDER"); + fg:SetAllPoints(fgMask) + -- Now create a bunch of textures local bg = region:CreateTexture(nil, "ARTWORK"); bg:SetAllPoints(bar); - -- Workaround für Masking mit einer zusätzlichen Alpha-Textur - local fgMask = CreateFrame("Frame", nil, bar) - fgMask:SetAllPoints(bar) - - local fg = fgMask:CreateTexture(nil, "ARTWORK"); - fg:SetAllPoints(fgMask) - local spark = bar:CreateTexture(nil, "ARTWORK"); - fg:SetDrawLayer("ARTWORK", -1); - bg:SetDrawLayer("ARTWORK", -2); spark:SetDrawLayer("ARTWORK", 7); bar.fg = fg; bar.fgMask = fgMask From 57b67eca07f13fa4f0930c58f918be667a470441 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Mon, 3 Mar 2025 13:55:49 +0100 Subject: [PATCH 3/3] add mounted load condition, add more wow api for load and organize it better --- WeakAuras/GenericTrigger.lua | 30 +++++++++++++++----------- WeakAuras/Prototypes.lua | 12 ++++++++--- WeakAuras/WeakAuras.lua | 42 ++++++++++++++++++++++-------------- 3 files changed, 52 insertions(+), 32 deletions(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 35f95e4..7a7e8f2 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -1184,6 +1184,7 @@ function HandleEvent(frame, event, arg1, arg2, ...) if (event == "PLAYER_ENTERING_WORLD") then timer:ScheduleTimer(function() Private.CreateTalentCache() + WeakAuras.WatchForMounts() HandleEvent(frame, "WA_DELAYED_PLAYER_ENTERING_WORLD"); Private.ScanForLoads(nil, "WA_DELAYED_PLAYER_ENTERING_WORLD") Private.StartProfileSystem("generictrigger WA_DELAYED_PLAYER_ENTERING_WORLD"); @@ -3542,27 +3543,30 @@ do local isMounted = IsMounted(); local function checkForMounted(self, elaps) - Private.StartProfileSystem("generictrigger mounted"); + Private.StartProfileSystem("generictrigger mounted") elapsed = elapsed + elaps if(isMounted ~= IsMounted()) then - isMounted = IsMounted(); - Private.ScanEvents("MOUNTED_UPDATE"); - mountedFrame:SetScript("OnUpdate", nil); + isMounted = IsMounted() + Private.ScanForLoads(nil, "MOUNTED_UPDATE") + Private.ScanEvents("MOUNTED_UPDATE") + mountedFrame:SetScript("OnUpdate", nil) end if(elapsed > delay) then - mountedFrame:SetScript("OnUpdate", nil); + mountedFrame:SetScript("OnUpdate", nil) end - Private.StopProfileSystem("generictrigger mounted"); + Private.StopProfileSystem("generictrigger mounted") end function WeakAuras.WatchForMounts() - if not(mountedFrame) then - mountedFrame = CreateFrame("Frame"); - Private.frames["Mount Use Handler"] = mountedFrame; - mountedFrame:RegisterEvent("COMPANION_UPDATE"); - mountedFrame:SetScript("OnEvent", function() - elapsed = 0; - mountedFrame:SetScript("OnUpdate", checkForMounted); + if not (mountedFrame) then + mountedFrame = CreateFrame("Frame") + Private.frames["Mount Use Handler"] = mountedFrame + mountedFrame:RegisterEvent("COMPANION_UPDATE") + mountedFrame:SetScript("OnEvent", function(_, _, arg) + if arg == "MOUNT" then + elapsed = 0 + mountedFrame:SetScript("OnUpdate", checkForMounted) + end end) end end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 0c13a27..717e75c 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -972,6 +972,15 @@ Private.load_prototype = { optional = true, events = {"VEHICLE_UPDATE", "UNIT_ENTERED_VEHICLE", "UNIT_EXITED_VEHICLE"} }, + { + name = "mounted", + display = L["Mounted"], + type = "tristate", + init = "arg", + width = WeakAuras.normalWidth, + optional = true, + events = {"MOUNTED_UPDATE"} + }, { name ="playerTitle", display = L["Player"], @@ -7429,9 +7438,6 @@ Private.event_prototypes = { if (trigger.use_ismoving ~= nil) then WeakAuras.WatchPlayerMoveSpeed(); end - if (trigger.use_mounted ~= nil) then - WeakAuras.WatchForMounts(); - end if (trigger.use_HasPet ~= nil) then AddWatchedUnits("pet") end diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 3d88adb..a09d038 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -6,20 +6,29 @@ local internalVersion = 83 local insert = table.insert -- WoW APIs -local IsAddOnLoaded, InCombatLockdown = IsAddOnLoaded, InCombatLockdown -local LoadAddOn, UnitName, GetRealmName, UnitFactionGroup, IsInRaid - = LoadAddOn, UnitName, GetRealmName, UnitFactionGroup, IsInRaid -local UnitClass, UnitExists, UnitGUID, UnitAffectingCombat, GetInstanceInfo, IsInInstance - = UnitClass, UnitExists, UnitGUID, UnitAffectingCombat, GetInstanceInfo, IsInInstance -local UnitIsUnit, GetRaidRosterInfo, UnitInVehicle, UnitHasVehicleUI, GetSpellInfo - = UnitIsUnit, GetRaidRosterInfo, UnitInVehicle, UnitHasVehicleUI, GetSpellInfo -local SendChatMessage, UnitInBattleground, UnitInRaid, UnitInParty, GetTime - = SendChatMessage, UnitInBattleground, UnitInRaid, UnitInParty, GetTime -local CreateFrame, IsShiftKeyDown, GetScreenWidth, GetScreenHeight, GetCursorPosition, UpdateAddOnCPUUsage, GetFrameCPUUsage, debugprofilestop - = CreateFrame, IsShiftKeyDown, GetScreenWidth, GetScreenHeight, GetCursorPosition, UpdateAddOnCPUUsage, GetFrameCPUUsage, debugprofilestop -local debugstack = debugstack -local GetNumTalentTabs, GetNumTalents = GetNumTalentTabs, GetNumTalents -local MAX_NUM_TALENTS = MAX_NUM_TALENTS or 40 +local IsAddOnLoaded, LoadAddOn + = IsAddOnLoaded, LoadAddOn +local UnitName, GetRealmName, UnitRace, UnitFactionGroup, UnitClass + = UnitName, GetRealmName, UnitRace, UnitFactionGroup, UnitClass +local IsInRaid, UnitIsPartyLeader, UnitIsRaidOfficer, GetRaidRosterInfo, UnitInRaid, UnitInParty + = IsInRaid, UnitIsPartyLeader, UnitIsRaidOfficer, GetRaidRosterInfo, UnitInRaid, UnitInParty +local InCombatLockdown, UnitAffectingCombat, GetInstanceInfo, IsInInstance + = InCombatLockdown, UnitAffectingCombat, GetInstanceInfo, IsInInstance +local GetCurrentMapAreaID, GetRealZoneText, GetSubZoneText + = GetCurrentMapAreaID, GetRealZoneText, GetSubZoneText +local UnitIsPVPFreeForAll, UnitIsPVP, UnitOnTaxi, IsMounted + = UnitIsPVPFreeForAll, UnitIsPVP, UnitOnTaxi, IsMounted +local UnitInVehicle, UnitHasVehicleUI, UnitIsUnit, UnitIsDeadOrGhost + = UnitInVehicle, UnitHasVehicleUI, UnitIsUnit, UnitIsDeadOrGhost +local SendChatMessage, UnitInBattleground + = SendChatMessage, UnitInBattleground +local GetTime, UpdateAddOnCPUUsage, GetFrameCPUUsage, debugprofilestop + = GetTime, UpdateAddOnCPUUsage, GetFrameCPUUsage, debugprofilestop +local GetNumTalentTabs, GetNumTalents, MAX_NUM_TALENTS + = GetNumTalentTabs, GetNumTalents, MAX_NUM_TALENTS or 40 +local CreateFrame, IsShiftKeyDown, GetScreenWidth, GetScreenHeight, GetCursorPosition + = CreateFrame, IsShiftKeyDown, GetScreenWidth, GetScreenHeight, GetCursorPosition +local debugstack, GetSpellInfo = debugstack, GetSpellInfo local ADDON_NAME = "WeakAuras" local WeakAuras = WeakAuras @@ -1422,6 +1431,7 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...) local pvp = UnitIsPVPFreeForAll("player") or UnitIsPVP("player") local vehicle = UnitInVehicle("player") or UnitOnTaxi("player") or false local vehicleUi = UnitHasVehicleUI("player") or false + local mounted = IsMounted() or false local raidMemberType = 0 @@ -1447,8 +1457,8 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...) if (data and not data.controlledChildren) then local loadFunc = loadFuncs[id]; local loadOpt = loadFuncsForOptions[id]; - shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, player, realm, class, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); - couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, player, realm, class, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); + shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, mounted, player, realm, class, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); + couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, mounted, player, realm, class, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); if(shouldBeLoaded and not loaded[id]) then changed = changed + 1;