Commit d33c274c authored by Simpy's avatar Simpy 🐹
Browse files

cache for stuff

parent 74bbfaf6
......@@ -30,7 +30,6 @@ local UnitIsMercenary = UnitIsMercenary
local UnitStat = UnitStat
local C_PetBattles_IsInBattle = C_PetBattles.IsInBattle
local C_PvP_IsRatedBattleground = C_PvP.IsRatedBattleground
local C_UIWidgetManager_GetStatusBarWidgetVisualizationInfo = C_UIWidgetManager.GetStatusBarWidgetVisualizationInfo
local FACTION_HORDE = FACTION_HORDE
local FACTION_ALLIANCE = FACTION_ALLIANCE
local ERR_NOT_IN_COMBAT = ERR_NOT_IN_COMBAT
......
......@@ -19,9 +19,9 @@ local GetNumGuildMembers = GetNumGuildMembers
local GuildControlGetNumRanks = GuildControlGetNumRanks
local GuildControlGetRankName = GuildControlGetRankName
local GuildUninvite = GuildUninvite
local ReloadUI = ReloadUI
local ResetCPUUsage = ResetCPUUsage
local SendChatMessage = SendChatMessage
local ReloadUI = ReloadUI
local SetCVar = SetCVar
local UpdateAddOnCPUUsage = UpdateAddOnCPUUsage
-- GLOBALS: ElvUIGrid, ElvDB
......
......@@ -12,7 +12,6 @@ local rawget, rawset, setmetatable = rawget, rawset, setmetatable
local CreateFrame = CreateFrame
local GetCVar = GetCVar
local GetCVarBool = GetCVarBool
local GetSpellInfo = GetSpellInfo
local GetNumGroupMembers = GetNumGroupMembers
local GetSpecialization = GetSpecialization
local hooksecurefunc = hooksecurefunc
......
......@@ -5,13 +5,13 @@ local LSM = E.Libs.LSM
local _G = _G
local floor, format, tinsert = floor, format, tinsert
local select, unpack, strmatch = select, unpack, strmatch
local CreateFrame = CreateFrame
local GetInventoryItemQuality = GetInventoryItemQuality
local GetInventoryItemTexture = GetInventoryItemTexture
local GetItemQualityColor = GetItemQualityColor
local GetWeaponEnchantInfo = GetWeaponEnchantInfo
local RegisterAttributeDriver = RegisterAttributeDriver
local RegisterStateDriver = RegisterStateDriver
local CreateFrame = CreateFrame
local UnitAura = UnitAura
local GetTime = GetTime
......
......@@ -3,6 +3,7 @@ local DB = E:GetModule('DataBars')
local LSM = E.Libs.LSM
local _G = _G
local unpack = unpack
local pairs, select = pairs, select
local CreateFrame = CreateFrame
local GetInstanceInfo = GetInstanceInfo
......
......@@ -2,6 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateD
local NP = E:GetModule('NamePlates')
local ipairs = ipairs
local CreateFrame = CreateFrame
local UIWidgetSetLayoutDirection = Enum.UIWidgetSetLayoutDirection
local UIWidgetLayoutDirection = Enum.UIWidgetLayoutDirection
......
......@@ -7,7 +7,7 @@ assert(ElvUF, 'ElvUI was unable to locate oUF.')
local _G = _G
local pairs, ipairs, wipe, tinsert = pairs, ipairs, wipe, tinsert
local format, select, strsplit = format, select, strsplit
local format, select, strsplit, tostring = format, select, strsplit, tostring
local CreateFrame = CreateFrame
local GetCVar = GetCVar
......
......@@ -4,7 +4,6 @@ local S = E:GetModule('Skins')
local _G = _G
local hooksecurefunc = hooksecurefunc
-- SHADOWLANDS
function S:Blizzard_AnimaDiversionUI()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.animaDiversion) then return end
......
......@@ -6,7 +6,6 @@ local ipairs, select, unpack = ipairs, select, unpack
local CLASS_SORT_ORDER = CLASS_SORT_ORDER
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
function S:Blizzard_Calendar()
......
......@@ -3,9 +3,6 @@ local S = E:GetModule('Skins')
local _G = _G
local hooksecurefunc = hooksecurefunc
local CreateFrame = CreateFrame
-- 9.0 SHADOWLANDS
function S:Blizzard_CovenantPreviewUI()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.covenantPreview) then return end
......
......@@ -5,8 +5,6 @@ local _G = _G
local gsub, ipairs = gsub, ipairs
local hooksecurefunc = hooksecurefunc
-- 9.0 SHADOWLANDS
local function HandleIconString(self, text)
if not text then text = self:GetText() end
if not text or text == '' then return end
......
......@@ -14,6 +14,8 @@ local GetItemInfo = GetItemInfo
local GetItemQualityColor = GetItemQualityColor
local hooksecurefunc = hooksecurefunc
local LEGENDARY_COLOR = Enum.ItemQuality.Legendary or 5
local function HandleButton(btn, ...)
S:HandleButton(btn, ...)
if btn:GetFontString() then
......@@ -493,23 +495,23 @@ function S:Blizzard_EncounterJournal()
S:HandleScrollBar(LootJournal.PowersFrame.ScrollBar)
local IconColor = E.QualityColors[Enum.ItemQuality.Legendary or 5] -- legendary color
hooksecurefunc(LootJournal.PowersFrame, "RefreshListDisplay", function(button)
if not button.elements then return end
local IconColor = E.QualityColors[LEGENDARY_COLOR]
hooksecurefunc(LootJournal.PowersFrame, "RefreshListDisplay", function(buttons)
if not buttons.elements then return end
for i = 1, button:GetNumElementFrames() do
local button = button.elements[i]
if button and not button.IsSkinned then
button.Background:SetAlpha(0)
button.CircleMask:Hide()
S:HandleIcon(button.Icon, true)
button.Icon.backdrop:SetBackdropBorderColor(IconColor.r, IconColor.g, IconColor.b)
for i = 1, buttons:GetNumElementFrames() do
local btn = buttons.elements[i]
if btn and not btn.IsSkinned then
btn.Background:SetAlpha(0)
btn.CircleMask:Hide()
S:HandleIcon(btn.Icon, true)
btn.Icon.backdrop:SetBackdropBorderColor(IconColor.r, IconColor.g, IconColor.b)
button:CreateBackdrop('Transparent')
button.backdrop:Point('TOPLEFT', 3, 0)
button.backdrop:Point('BOTTOMRIGHT', -2, 1)
btn:CreateBackdrop('Transparent')
btn.backdrop:Point('TOPLEFT', 3, 0)
btn.backdrop:Point('BOTTOMRIGHT', -2, 1)
button.IsSkinned = true
btn.IsSkinned = true
end
end
end)
......
......@@ -6,7 +6,6 @@ local unpack, pairs, ipairs, select = unpack, pairs, ipairs, select
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
local IsAddOnLoaded = IsAddOnLoaded
local function showFollower(s)
S:HandleFollowerAbilities(s)
......
......@@ -2,7 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local S = E:GetModule('Skins')
local _G = _G
local pairs = pairs
local next, pairs, ipairs = next, pairs, ipairs
local hooksecurefunc = hooksecurefunc
local function handleGossipText()
......
......@@ -3,9 +3,7 @@ local S = E:GetModule('Skins')
local _G = _G
local select, unpack = select, unpack
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
function S:Blizzard_GuildBankUI()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.gbank) then return end
......
......@@ -2,8 +2,6 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local S = E:GetModule('Skins')
local _G = _G
local select, unpack = select, unpack
function S:HelpFrame()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.help) then return end
......
......@@ -3,7 +3,6 @@ local S = E:GetModule('Skins')
local _G = _G
local unpack = unpack
local hooksecurefunc = hooksecurefunc
function S:MerchantFrame()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.merchant) then return end
......
......@@ -3,6 +3,7 @@ local S = E:GetModule('Skins')
local _G = _G
local pairs = pairs
local ipairs = ipairs
local unpack = unpack
local hooksecurefunc = hooksecurefunc
......
......@@ -19,11 +19,11 @@ function S:Blizzard_RuneforgeUI()
S:HandleNextPrevButton(pageControl.BackwardButton)
S:HandleNextPrevButton(pageControl.ForwardButton)
hooksecurefunc(powerFrame.PowerList, 'RefreshListDisplay', function(self)
if not self.elements then return end
hooksecurefunc(powerFrame.PowerList, 'RefreshListDisplay', function(list)
if not list.elements then return end
for i = 1, self:GetNumElementFrames() do
local button = self.elements[i]
for i = 1, list:GetNumElementFrames() do
local button = list.elements[i]
if button and not button.IsSkinned then
button.Border:SetAlpha(0)
button.CircleMask:Hide()
......
......@@ -3,8 +3,6 @@ local S = E:GetModule('Skins')
local _G = _G
local pairs = pairs
local unpack = unpack
local hooksecurefunc = hooksecurefunc
function S:Blizzard_ScrappingMachineUI()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.scrapping) then return end
......
......@@ -4,7 +4,6 @@ local S = E:GetModule('Skins')
local _G = _G
local unpack = unpack
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
function S:TradeFrame()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.trade) then return end
......
......@@ -7,7 +7,7 @@ local hooksecurefunc = hooksecurefunc
-- Credits Siweia | AuroraClassic
local function UpdateSelection(frame, state)
local function UpdateSelection(frame)
if not frame.backdrop then return end
if frame.SelectedTexture:IsShown() then
......
......@@ -2,6 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local UF = E:GetModule('UnitFrames');
local CreateFrame = CreateFrame
function UF:Construct_AltPowerBar(frame)
local altpower = CreateFrame('StatusBar', '$parent_AlternativePower', frame)
altpower:SetStatusBarTexture(E.media.blankTex)
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local UnitPhaseReason = UnitPhaseReason
local unpack = unpack
local texCoords = {
{1/128, 33/128, 1/64, 33/64},
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
local UF = E:GetModule('UnitFrames')
local _, ns = ...
local ElvUF = ns.oUF
assert(ElvUF, 'ElvUI was unable to locate oUF.')
......
......@@ -3,6 +3,8 @@ local C, L = unpack(select(2, ...))
local DB = E:GetModule('DataBars')
local ACH = E.Libs.ACH
local tonumber = tonumber
local SharedOptions = {
enable = ACH:Toggle(L["Enable"], nil, 1),
textFormat = ACH:Select(L["Text Format"], nil, 2, { NONE = L["NONE"], CUR = L["Current"], REM = L["Remaining"], PERCENT = L["Percent"], CURMAX = L["Current - Max"], CURPERC = L["Current - Percent"], CURREM = L["Current - Remaining"], CURPERCREM = L["Current - Percent (Remaining)"] }),
......
......@@ -7,12 +7,11 @@ local Minimap = E:GetModule('Minimap')
local ACH = E.Libs.ACH
local _G = _G
local wipe = wipe
local type, pairs, ipairs = type, pairs, ipairs
local gsub, next, wipe = gsub, next, wipe
local tonumber = tonumber
local tostring = tostring
local format = format
local pairs = pairs
local type = type
-- GLOBALS: AceGUIWidgetLSMlists
local currencyList = {}
......
local E, _, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local C, L = unpack(select(2, ...))
local AB = E:GetModule('ActionBars')
local B = E:GetModule('Blizzard')
local ACH = E.Libs.ACH
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment