Bugfixes: Removed retail API calls, ran linting script and static analysis.

This commit is contained in:
Bluewhale1337
2026-07-25 00:42:46 +02:00
parent 390067cdbd
commit c51cfa3f73
15 changed files with 65 additions and 28 deletions
+4 -2
View File
@@ -157,7 +157,8 @@ function PI:CreateStepComplete()
E:Size(imsg, 418, 72)
E:Point(imsg, "TOP", 0, -190)
imsg:Hide()
imsg:SetScript("OnShow", function(self)
imsg:SetScript("OnShow", function()
local self = this
if self.message then
PlaySoundFile([[Sound\Interface\LevelUp.wav]])
self.text:SetText(self.message)
@@ -331,7 +332,8 @@ function PI:CreateFrame()
E:Point(f.pending.tex, "BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2)
f.pending.tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\UI-OptionsFrame-NewFeatureIcon]])
E:CreateBackdrop(f.pending, "Transparent")
f.pending:SetScript("OnEnter", function(self)
f.pending:SetScript("OnEnter", function()
local self = this
_G["GameTooltip"]:SetOwner(self, "ANCHOR_BOTTOMLEFT", E.PixelMode and -7 or -9)
_G["GameTooltip"]:AddLine(L["List of installations in queue:"], 1, 1, 1)
_G["GameTooltip"]:AddLine(" ")
+17 -3
View File
@@ -72,6 +72,7 @@ function E:Point(obj, arg1, arg2, arg3, arg4, arg5)
end
function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
if type(obj) ~= "table" then return end
xOffset = xOffset or E.Border
yOffset = yOffset or E.Border
anchor = anchor or obj:GetParent()
@@ -86,6 +87,7 @@ function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
end
function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
if type(obj) ~= "table" then return end
xOffset = xOffset or E.Border
yOffset = yOffset or E.Border
anchor = anchor or obj:GetParent()
@@ -100,6 +102,7 @@ function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
end
function E:SetTemplate(f, t, glossTex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
if not f then return end
GetTemplate(t, isUnitFrameElement)
if t then
@@ -186,9 +189,18 @@ end
function E:CreateBackdrop(f, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
if not t then t = "Default" end
local parent = f.IsObjectType and f:IsObjectType("Texture") and f:GetParent() or f
local b = CreateFrame("Frame", nil, parent)
local parent = f
if f.IsObjectType and not f:IsObjectType("Frame") then
parent = f:GetParent()
end
if type(parent) == "table" and not parent[0] then
parent = f.GetParent and f:GetParent() or UIParent
end
if parent and parent.IsObjectType and not parent:IsObjectType("Frame") then
parent = UIParent
end
local b = f.backdrop or CreateFrame("Frame", nil, parent)
if f.forcePixelMode or forcePixelMode then
E:SetOutside(b, nil, E.mult, E.mult)
else
@@ -288,6 +300,8 @@ function E:FontTemplate(fs, font, fontSize, fontStyle)
end
function E:StyleButton(button, noHover, noPushed, noChecked)
if not button then return end
if button.SetHighlightTexture and not button.hover and not noHover then
local hover = button:CreateTexture()
hover:SetTexture(1, 1, 1, 0.3)
+1 -1
View File
@@ -1,4 +1,4 @@
utf8_lc_uc = {
utf8_lc_uc = {
["a"] = "A",
["b"] = "B",
["c"] = "C",
@@ -23,7 +23,8 @@ local function GetDebuffType(unit, filter, filterTable)
if not unit or not UnitCanAssist("player", unit) then return nil end
local i = 1
while true do
local name, _, texture, _, debufftype = UnitAura(unit, i, "HARMFUL")
local texture, count, debufftype = UnitAura(unit, i, "HARMFUL")
local name = texture
if not texture then break end
if(filterTable) then
+8 -4
View File
@@ -395,21 +395,25 @@ function mod:UpdateElement_AurasByUnitID(unit)
WipeAuraList(guid)
local index = 1
local name, _, texture, count, _, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, index, "HARMFUL")
local texture, count, debuffType = UnitAura(unit, index, "HARMFUL")
local name, duration, expirationTime, unitCaster, spellID = texture, 0, 0, nil, nil
while name do
SetSpellDuration(spellID, duration)
SetAuraInstance(guid, name, spellID, expirationTime, count, UnitGUID(unitCaster or ""), duration, texture, AURA_TYPE_DEBUFF)
index = index + 1
name , _, texture, count, _, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, index, "HARMFUL")
texture, count, debuffType = UnitAura(unit, index, "HARMFUL")
name = texture
end
index = 1
local name, _, texture, count, _, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, index, "HELPFUL")
texture, count, debuffType = UnitAura(unit, index, "HELPFUL")
name = texture
while name do
SetSpellDuration(spellID, duration)
SetAuraInstance(guid, name, spellID, expirationTime, count, UnitGUID(unitCaster or ""), duration, texture, AURA_TYPE_BUFF)
index = index + 1
name, _, texture, count, _, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, index, "HELPFUL")
texture, count, debuffType = UnitAura(unit, index, "HELPFUL")
name = texture
end
local raidIcon, name
+2 -1
View File
@@ -561,7 +561,8 @@ function mod:OnCreated(frame)
moveDown:SetDuration(0.1)
moveDown:SetOffset(0, -35)
moveDown:SetSmoothing("In")
moveDown:SetScript("OnFinished", function(self)
moveDown:SetScript("OnFinished", function()
local self = this
self:Reset()
end)
+4 -2
View File
@@ -27,7 +27,9 @@ local function LoadSkin()
}
for i = 1, getn(skins) do
E:SetTemplate(_G[skins[i]], "Transparent")
if _G[skins[i]] then
E:SetTemplate(_G[skins[i]], "Transparent")
end
end
-- ChatMenus
@@ -188,7 +190,7 @@ local function LoadSkin()
for i = 1, getn(BlizzardHeader) do
local title = _G[BlizzardHeader[i].."Header"]
if title then
if title and title.SetTexture then
title:SetTexture("")
title:ClearAllPoints()
if title == _G["GameMenuFrameHeader"] then
+1
View File
@@ -161,6 +161,7 @@ local tabs = {
}
function S:HandleTab(tab)
if not tab then return end
local name = tab:GetName()
for _, object in pairs(tabs) do
local tex = _G[name..object]
+2 -1
View File
@@ -69,7 +69,8 @@ function UF:Construct_AuraIcon(button)
button.overlay:SetTexture(nil)
button:RegisterForClicks("RightButtonUp")
button:SetScript("OnClick", function(self)
button:SetScript("OnClick", function()
local self = this
if E.db.unitframe.auraBlacklistModifier == "NONE"
or not ((E.db.unitframe.auraBlacklistModifier == "SHIFT" and IsShiftKeyDown())
or (E.db.unitframe.auraBlacklistModifier == "ALT" and IsAltKeyDown())
@@ -18,13 +18,12 @@ function UF:CombobarDetachedUpdate()
CombobarDetached:RegisterEvent("PLAYER_ENTERING_WORLD")
CombobarDetached:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
CombobarDetached:SetScript("OnEvent", function(self, event, unit)
print(self, event, unit)
CombobarDetached:SetScript("OnEvent", function()
if event == "PLAYER_ENTERING_WORLD" then
E:ShapeshiftDelayedUpdate(ElvUF_Target.ComboPoints.Override, ElvUF_Target)
end
ElvUF_Target.ComboPoints.Override(ElvUF_Target, event, unit)
ElvUF_Target.ComboPoints.Override(ElvUF_Target, event, arg1)
end)
end