mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
Bugfixes: Removed retail API calls, ran linting script and static analysis.
This commit is contained in:
@@ -306,7 +306,7 @@ end
|
|||||||
|
|
||||||
function table.wipe(t)
|
function table.wipe(t)
|
||||||
if type(t) ~= "table" then
|
if type(t) ~= "table" then
|
||||||
error(format("bad argument #1 to 'wipe' (table expected, got %s)", t ~= nil and type(t) or "no value"), 2)
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
for k in pairs(t) do
|
for k in pairs(t) do
|
||||||
|
|||||||
@@ -96,7 +96,9 @@ function HookScript(frame, scriptName, handler)
|
|||||||
handler(this)
|
handler(this)
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
frame:SetScript(scriptName, handler)
|
frame:SetScript(scriptName, function()
|
||||||
|
handler(this)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -112,11 +114,11 @@ function hooksecurefunc(a1, a2, a3)
|
|||||||
|
|
||||||
local original_func = a1[a2]
|
local original_func = a1[a2]
|
||||||
|
|
||||||
a1[a2] = function(...)
|
a1[a2] = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
|
||||||
local original_return = {original_func(unpack(arg))}
|
local r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 = original_func(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
|
||||||
a3(unpack(arg))
|
a3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t)
|
||||||
|
|
||||||
return unpack(original_return)
|
return r1, r2, r3, r4, r5, r6, r7, r8, r9, r10
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ function PI:CreateStepComplete()
|
|||||||
E:Size(imsg, 418, 72)
|
E:Size(imsg, 418, 72)
|
||||||
E:Point(imsg, "TOP", 0, -190)
|
E:Point(imsg, "TOP", 0, -190)
|
||||||
imsg:Hide()
|
imsg:Hide()
|
||||||
imsg:SetScript("OnShow", function(self)
|
imsg:SetScript("OnShow", function()
|
||||||
|
local self = this
|
||||||
if self.message then
|
if self.message then
|
||||||
PlaySoundFile([[Sound\Interface\LevelUp.wav]])
|
PlaySoundFile([[Sound\Interface\LevelUp.wav]])
|
||||||
self.text:SetText(self.message)
|
self.text:SetText(self.message)
|
||||||
@@ -331,7 +332,8 @@ function PI:CreateFrame()
|
|||||||
E:Point(f.pending.tex, "BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2)
|
E:Point(f.pending.tex, "BOTTOMRIGHT", f.pending, "BOTTOMRIGHT", -2, 2)
|
||||||
f.pending.tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\UI-OptionsFrame-NewFeatureIcon]])
|
f.pending.tex:SetTexture([[Interface\AddOns\ElvUI\media\textures\UI-OptionsFrame-NewFeatureIcon]])
|
||||||
E:CreateBackdrop(f.pending, "Transparent")
|
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"]: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(L["List of installations in queue:"], 1, 1, 1)
|
||||||
_G["GameTooltip"]:AddLine(" ")
|
_G["GameTooltip"]:AddLine(" ")
|
||||||
|
|||||||
+16
-2
@@ -72,6 +72,7 @@ function E:Point(obj, arg1, arg2, arg3, arg4, arg5)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
|
function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
|
||||||
|
if type(obj) ~= "table" then return end
|
||||||
xOffset = xOffset or E.Border
|
xOffset = xOffset or E.Border
|
||||||
yOffset = yOffset or E.Border
|
yOffset = yOffset or E.Border
|
||||||
anchor = anchor or obj:GetParent()
|
anchor = anchor or obj:GetParent()
|
||||||
@@ -86,6 +87,7 @@ function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
|
function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
|
||||||
|
if type(obj) ~= "table" then return end
|
||||||
xOffset = xOffset or E.Border
|
xOffset = xOffset or E.Border
|
||||||
yOffset = yOffset or E.Border
|
yOffset = yOffset or E.Border
|
||||||
anchor = anchor or obj:GetParent()
|
anchor = anchor or obj:GetParent()
|
||||||
@@ -100,6 +102,7 @@ function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function E:SetTemplate(f, t, glossTex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
|
function E:SetTemplate(f, t, glossTex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
|
||||||
|
if not f then return end
|
||||||
GetTemplate(t, isUnitFrameElement)
|
GetTemplate(t, isUnitFrameElement)
|
||||||
|
|
||||||
if t then
|
if t then
|
||||||
@@ -186,9 +189,18 @@ end
|
|||||||
function E:CreateBackdrop(f, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
|
function E:CreateBackdrop(f, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
|
||||||
if not t then t = "Default" end
|
if not t then t = "Default" end
|
||||||
|
|
||||||
local parent = f.IsObjectType and f:IsObjectType("Texture") and f:GetParent() or f
|
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 = CreateFrame("Frame", nil, parent)
|
local b = f.backdrop or CreateFrame("Frame", nil, parent)
|
||||||
if f.forcePixelMode or forcePixelMode then
|
if f.forcePixelMode or forcePixelMode then
|
||||||
E:SetOutside(b, nil, E.mult, E.mult)
|
E:SetOutside(b, nil, E.mult, E.mult)
|
||||||
else
|
else
|
||||||
@@ -288,6 +300,8 @@ function E:FontTemplate(fs, font, fontSize, fontStyle)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function E:StyleButton(button, noHover, noPushed, noChecked)
|
function E:StyleButton(button, noHover, noPushed, noChecked)
|
||||||
|
if not button then return end
|
||||||
|
|
||||||
if button.SetHighlightTexture and not button.hover and not noHover then
|
if button.SetHighlightTexture and not button.hover and not noHover then
|
||||||
local hover = button:CreateTexture()
|
local hover = button:CreateTexture()
|
||||||
hover:SetTexture(1, 1, 1, 0.3)
|
hover:SetTexture(1, 1, 1, 0.3)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
utf8_lc_uc = {
|
utf8_lc_uc = {
|
||||||
["a"] = "A",
|
["a"] = "A",
|
||||||
["b"] = "B",
|
["b"] = "B",
|
||||||
["c"] = "C",
|
["c"] = "C",
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ local function GetDebuffType(unit, filter, filterTable)
|
|||||||
if not unit or not UnitCanAssist("player", unit) then return nil end
|
if not unit or not UnitCanAssist("player", unit) then return nil end
|
||||||
local i = 1
|
local i = 1
|
||||||
while true do
|
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 not texture then break end
|
||||||
|
|
||||||
if(filterTable) then
|
if(filterTable) then
|
||||||
|
|||||||
@@ -395,21 +395,25 @@ function mod:UpdateElement_AurasByUnitID(unit)
|
|||||||
WipeAuraList(guid)
|
WipeAuraList(guid)
|
||||||
|
|
||||||
local index = 1
|
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
|
while name do
|
||||||
SetSpellDuration(spellID, duration)
|
SetSpellDuration(spellID, duration)
|
||||||
SetAuraInstance(guid, name, spellID, expirationTime, count, UnitGUID(unitCaster or ""), duration, texture, AURA_TYPE_DEBUFF)
|
SetAuraInstance(guid, name, spellID, expirationTime, count, UnitGUID(unitCaster or ""), duration, texture, AURA_TYPE_DEBUFF)
|
||||||
index = index + 1
|
index = index + 1
|
||||||
name , _, texture, count, _, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, index, "HARMFUL")
|
texture, count, debuffType = UnitAura(unit, index, "HARMFUL")
|
||||||
|
name = texture
|
||||||
end
|
end
|
||||||
|
|
||||||
index = 1
|
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
|
while name do
|
||||||
SetSpellDuration(spellID, duration)
|
SetSpellDuration(spellID, duration)
|
||||||
SetAuraInstance(guid, name, spellID, expirationTime, count, UnitGUID(unitCaster or ""), duration, texture, AURA_TYPE_BUFF)
|
SetAuraInstance(guid, name, spellID, expirationTime, count, UnitGUID(unitCaster or ""), duration, texture, AURA_TYPE_BUFF)
|
||||||
index = index + 1
|
index = index + 1
|
||||||
name, _, texture, count, _, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, index, "HELPFUL")
|
texture, count, debuffType = UnitAura(unit, index, "HELPFUL")
|
||||||
|
name = texture
|
||||||
end
|
end
|
||||||
|
|
||||||
local raidIcon, name
|
local raidIcon, name
|
||||||
|
|||||||
@@ -561,7 +561,8 @@ function mod:OnCreated(frame)
|
|||||||
moveDown:SetDuration(0.1)
|
moveDown:SetDuration(0.1)
|
||||||
moveDown:SetOffset(0, -35)
|
moveDown:SetOffset(0, -35)
|
||||||
moveDown:SetSmoothing("In")
|
moveDown:SetSmoothing("In")
|
||||||
moveDown:SetScript("OnFinished", function(self)
|
moveDown:SetScript("OnFinished", function()
|
||||||
|
local self = this
|
||||||
self:Reset()
|
self:Reset()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ local function LoadSkin()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i = 1, getn(skins) do
|
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
|
end
|
||||||
|
|
||||||
-- ChatMenus
|
-- ChatMenus
|
||||||
@@ -188,7 +190,7 @@ local function LoadSkin()
|
|||||||
|
|
||||||
for i = 1, getn(BlizzardHeader) do
|
for i = 1, getn(BlizzardHeader) do
|
||||||
local title = _G[BlizzardHeader[i].."Header"]
|
local title = _G[BlizzardHeader[i].."Header"]
|
||||||
if title then
|
if title and title.SetTexture then
|
||||||
title:SetTexture("")
|
title:SetTexture("")
|
||||||
title:ClearAllPoints()
|
title:ClearAllPoints()
|
||||||
if title == _G["GameMenuFrameHeader"] then
|
if title == _G["GameMenuFrameHeader"] then
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ local tabs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function S:HandleTab(tab)
|
function S:HandleTab(tab)
|
||||||
|
if not tab then return end
|
||||||
local name = tab:GetName()
|
local name = tab:GetName()
|
||||||
for _, object in pairs(tabs) do
|
for _, object in pairs(tabs) do
|
||||||
local tex = _G[name..object]
|
local tex = _G[name..object]
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ function UF:Construct_AuraIcon(button)
|
|||||||
button.overlay:SetTexture(nil)
|
button.overlay:SetTexture(nil)
|
||||||
|
|
||||||
button:RegisterForClicks("RightButtonUp")
|
button:RegisterForClicks("RightButtonUp")
|
||||||
button:SetScript("OnClick", function(self)
|
button:SetScript("OnClick", function()
|
||||||
|
local self = this
|
||||||
if E.db.unitframe.auraBlacklistModifier == "NONE"
|
if E.db.unitframe.auraBlacklistModifier == "NONE"
|
||||||
or not ((E.db.unitframe.auraBlacklistModifier == "SHIFT" and IsShiftKeyDown())
|
or not ((E.db.unitframe.auraBlacklistModifier == "SHIFT" and IsShiftKeyDown())
|
||||||
or (E.db.unitframe.auraBlacklistModifier == "ALT" and IsAltKeyDown())
|
or (E.db.unitframe.auraBlacklistModifier == "ALT" and IsAltKeyDown())
|
||||||
|
|||||||
@@ -18,13 +18,12 @@ function UF:CombobarDetachedUpdate()
|
|||||||
CombobarDetached:RegisterEvent("PLAYER_ENTERING_WORLD")
|
CombobarDetached:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
CombobarDetached:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
|
CombobarDetached:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
|
||||||
|
|
||||||
CombobarDetached:SetScript("OnEvent", function(self, event, unit)
|
CombobarDetached:SetScript("OnEvent", function()
|
||||||
print(self, event, unit)
|
|
||||||
if event == "PLAYER_ENTERING_WORLD" then
|
if event == "PLAYER_ENTERING_WORLD" then
|
||||||
E:ShapeshiftDelayedUpdate(ElvUF_Target.ComboPoints.Override, ElvUF_Target)
|
E:ShapeshiftDelayedUpdate(ElvUF_Target.ComboPoints.Override, ElvUF_Target)
|
||||||
end
|
end
|
||||||
|
|
||||||
ElvUF_Target.ComboPoints.Override(ElvUF_Target, event, unit)
|
ElvUF_Target.ComboPoints.Override(ElvUF_Target, event, arg1)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ local methods = {
|
|||||||
toggle:SetHeight(14)
|
toggle:SetHeight(14)
|
||||||
toggle:ClearAllPoints()
|
toggle:ClearAllPoints()
|
||||||
toggle:SetPoint("TOPRIGHT", button, "TOPRIGHT", -6, -1)
|
toggle:SetPoint("TOPRIGHT", button, "TOPRIGHT", -6, -1)
|
||||||
toggle:SetHighlightTexture("Interface\Buttons\UI-PlusButton-Hilight", "ADD")
|
toggle:SetHighlightTexture("Interface\\Buttons\\UI-PlusButton-Hilight", "ADD")
|
||||||
toggle:SetScript("OnClick", Button_OnClick)
|
toggle:SetScript("OnClick", Button_OnClick)
|
||||||
button.toggle = toggle
|
button.toggle = toggle
|
||||||
toggle.obj = button
|
toggle.obj = button
|
||||||
|
|||||||
@@ -1046,8 +1046,10 @@ E.Options.args.nameplate = {
|
|||||||
set = function(info, value) selectedFilter = value; UpdateFilterGroup() end,
|
set = function(info, value) selectedFilter = value; UpdateFilterGroup() end,
|
||||||
values = function()
|
values = function()
|
||||||
filters = {}
|
filters = {}
|
||||||
for filter in pairs(E.global["nameplates"]["filter"]) do
|
if E.global["nameplates"] and E.global["nameplates"]["filter"] then
|
||||||
filters[filter] = filter
|
for filter in pairs(E.global["nameplates"]["filter"]) do
|
||||||
|
filters[filter] = filter
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return filters
|
return filters
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,7 +3,15 @@
|
|||||||
# Turtle WoW ElvUI - Vanilla (1.12.1)
|
# Turtle WoW ElvUI - Vanilla (1.12.1)
|
||||||
## :exclamation: *Does NOT work with Retail - [Classic (1.13)](https://git.tukui.org/elvui/elvui-classic)*
|
## :exclamation: *Does NOT work with Retail - [Classic (1.13)](https://git.tukui.org/elvui/elvui-classic)*
|
||||||
|
|
||||||
# Due to Classic 1.13 release, development on this addon has halted. If you or your friends still play 1.12.1 Vanilla and are wanting to help with any bug fixes, please submit any PR requests as you please. At this time, we will not answer any support tickets you make or ask about in regards to current bugs. For now, development will stay quiet on this matter.
|
# This repository is actively being fixed and maintained to ensure compatibility with Turtle WoW.
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
- **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:** Resolved tooltip crash with ShaguTweaks by reusing existing `backdrop` frames in `CreateBackdrop` instead of unconditionally overwriting them.
|
||||||
|
- **Fix:** Made ElvUI's backported `table.wipe` resilient to `nil` values, fixing crashes with native Turtle WoW UI scripts (like `Turtle_ShopUI.lua`) and lazy addons.
|
||||||
|
- **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.
|
||||||
|
|
||||||
This is the backported version of ElvUI for World of Warcraft - Vanilla (1.12.1)
|
This is the backported version of ElvUI for World of Warcraft - Vanilla (1.12.1)
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
Reference in New Issue
Block a user