mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update
This commit is contained in:
@@ -338,9 +338,7 @@ function E:CreateMover(parent, name, text, overlay, snapoffset, postdrag, moverT
|
||||
E.CreatedMovers[name]["shouldDisable"] = shouldDisable
|
||||
|
||||
E.CreatedMovers[name]["type"] = {}
|
||||
local types = {split(",", moverTypes)}
|
||||
for i = 1, getn(types) do
|
||||
local moverType = types[i]
|
||||
for _, moverType in {split(",", moverTypes)} do
|
||||
E.CreatedMovers[name]["type"][moverType] = true
|
||||
end
|
||||
end
|
||||
|
||||
+4
-4
@@ -931,7 +931,7 @@ function E:RegisterModule(name, loadFunc)
|
||||
|
||||
--Add module name to registry
|
||||
self.ModuleCallbacks[name] = true
|
||||
self.ModuleCallbacks["CallPriority"][getn(self.ModuleCallbacks["CallPriority"]) + 1] = name
|
||||
tinsert(self.ModuleCallbacks["CallPriority"], name)
|
||||
|
||||
--Register loadFunc to be called when event is fired
|
||||
E:RegisterCallback(name, loadFunc, E:GetModule(name))
|
||||
@@ -941,7 +941,7 @@ function E:RegisterModule(name, loadFunc)
|
||||
if self.initialized then
|
||||
self:GetModule(name):Initialize()
|
||||
else
|
||||
self["RegisteredModules"][getn(self["RegisteredModules"]) + 1] = name
|
||||
tinsert(self["RegisteredModules"], name)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -957,13 +957,13 @@ function E:RegisterInitialModule(name, loadFunc)
|
||||
|
||||
--Add module name to registry
|
||||
self.InitialModuleCallbacks[name] = true
|
||||
self.InitialModuleCallbacks["CallPriority"][getn(self.InitialModuleCallbacks["CallPriority"]) + 1] = name
|
||||
tinsert(self.InitialModuleCallbacks["CallPriority"], name)
|
||||
|
||||
--Register loadFunc to be called when event is fired
|
||||
E:RegisterCallback(name, loadFunc, E:GetModule(name))
|
||||
--Old deprecated initialize method
|
||||
else
|
||||
self["RegisteredInitialModules"][getn(self["RegisteredInitialModules"]) + 1] = name
|
||||
tinsert(self["RegisteredInitialModules"], name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -117,8 +117,7 @@ function AceSerializer:Serialize(...)
|
||||
local nres = 1
|
||||
|
||||
for i = 1, arg.n do
|
||||
local v = select(i, unpack(arg))
|
||||
nres = SerializeValue(v, serializeTbl, nres)
|
||||
nres = SerializeValue(arg[i], serializeTbl, nres)
|
||||
end
|
||||
|
||||
serializeTbl[nres+1] = "^^" -- "^^" = End of serialized data
|
||||
|
||||
@@ -14,6 +14,7 @@ end
|
||||
|
||||
local pairs, select, tonumber = pairs, select, tonumber
|
||||
local find, gsub, match, lower = string.find, string.gsub, string.match, string.lower
|
||||
local getn = table.getn
|
||||
|
||||
local GetItemInfo = GetItemInfo
|
||||
|
||||
|
||||
@@ -36,41 +36,6 @@ local function enableTargetUpdate(object)
|
||||
end
|
||||
Private.enableTargetUpdate = enableTargetUpdate
|
||||
|
||||
local function updateActiveUnit(self, event, unit)
|
||||
return true
|
||||
end
|
||||
|
||||
local function iterateChildren(...)
|
||||
for i = 1, getn(arg) do
|
||||
local obj = arg[i]
|
||||
|
||||
if(type(obj) == "table" and obj.isChild) then
|
||||
updateActiveUnit(obj, "iterateChildren")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function onAttributeChanged(self, name, value)
|
||||
if(name == "unit" and value) then
|
||||
if(self.hasChildren) then
|
||||
iterateChildren(self:GetChildren())
|
||||
end
|
||||
|
||||
if(not self.onlyProcessChildren) then
|
||||
updateActiveUnit(self, "OnAttributeChanged")
|
||||
end
|
||||
|
||||
if(self.unit and self.unit == value) then
|
||||
return
|
||||
else
|
||||
if(self.hasChildren) then
|
||||
iterateChildren(self:GetChildren())
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
local frame_metatable = {
|
||||
__index = CreateFrame("Button")
|
||||
}
|
||||
@@ -278,7 +243,7 @@ local function onShow(self)
|
||||
end
|
||||
|
||||
local function initObject(unit, style, styleFunc, header, ...)
|
||||
local num = getn(arg)
|
||||
local num = arg.n
|
||||
for i = 1, num do
|
||||
local object = arg[i]
|
||||
local objectUnit = object.guessUnit or unit
|
||||
@@ -452,8 +417,8 @@ do
|
||||
function getCondition(...)
|
||||
local cond = ""
|
||||
|
||||
for i = 1, getn(arg) do
|
||||
local short = select(i, unpack(arg))
|
||||
for i = 1, arg.n do
|
||||
local short = arg[i]
|
||||
|
||||
local condition = conditions[short]
|
||||
if(condition) then
|
||||
|
||||
@@ -5,8 +5,7 @@ function Private.argcheck(value, num, ...)
|
||||
assert(type(num) == 'number', "Bad argument #2 to 'argcheck' (number expected, got " .. type(num) .. ')')
|
||||
|
||||
for i = 1, arg.n do
|
||||
-- if(type(value) == arg[i]) then return end
|
||||
if(type(value) == select(i, unpack(arg))) then return end
|
||||
if(type(value) == arg[i]) then return end
|
||||
end
|
||||
|
||||
local types = strjoin(', ', unpack(arg))
|
||||
|
||||
@@ -3,7 +3,7 @@ local oUF = ns.oUF
|
||||
assert(oUF, "oUF not loaded")
|
||||
|
||||
local cos, sin, sqrt2, max, atan2 = math.cos, math.sin, math.sqrt(2), math.max, math.atan2
|
||||
local tinsert, tremove = table.insert, table.remove
|
||||
local getn, tinsert, tremove = table.getn, table.insert, table.remove
|
||||
local pi2 = 3.141592653589793 / 2
|
||||
|
||||
local GetPlayerMapPosition = GetPlayerMapPosition
|
||||
|
||||
@@ -9,7 +9,7 @@ local _G = _G
|
||||
local unpack, select, pairs, ipairs = unpack, select, pairs, ipairs
|
||||
local floor, min, max, huge = math.floor, math.min, math.max, math.huge
|
||||
local format = string.format
|
||||
local wipe, tinsert, tsort, tremove = table.wipe, table.insert, table.sort, table.remove
|
||||
local getn, wipe, tinsert, tsort, tremove = table.getn, table.wipe, table.insert, table.sort, table.remove
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
local GetInventoryItemQuality = GetInventoryItemQuality
|
||||
|
||||
@@ -5,7 +5,7 @@ local Search = LibStub("LibItemSearch-1.2");
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local ipairs, pairs, pcall, tonumber, select, unpack = ipairs, pairs, pcall, tonumber, select, unpack
|
||||
local tinsert, tremove, tsort, twipe = table.insert, table.remove, table.sort, table.wipe
|
||||
local getn, tinsert, tremove, tsort, twipe = table.getn, table.insert, table.remove, table.sort, table.wipe
|
||||
local floor, mod = math.floor, math.mod
|
||||
local band = bit.band
|
||||
local match, gmatch, find = string.match, string.gmatch, string.find
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local E, L, V, P, G = unpack(ElvUI) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local S = E:GetModule("Skins")
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local S = E:GetModule("Skins");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local E, L, V, P, G = unpack(ElvUI) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local S = E:GetModule("Skins")
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local S = E:GetModule("Skins");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
|
||||
@@ -535,7 +535,7 @@ function S:AddCallbackForAddon(addonName, eventName, loadFunc, forceLoad, bypass
|
||||
else
|
||||
--Insert eventName in this addons' registry
|
||||
self.addonCallbacks[addonName][eventName] = true
|
||||
self.addonCallbacks[addonName]["CallPriority"][getn(self.addonCallbacks[addonName]["CallPriority"]) + 1] = eventName
|
||||
tinsert(self.addonCallbacks[addonName]["CallPriority"], eventName)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -558,7 +558,7 @@ function S:AddCallback(eventName, loadFunc)
|
||||
|
||||
--Add event name to registry
|
||||
self.nonAddonCallbacks[eventName] = true
|
||||
self.nonAddonCallbacks["CallPriority"][getn(self.nonAddonCallbacks["CallPriority"]) + 1] = eventName
|
||||
tinsert(self.nonAddonCallbacks["CallPriority"], eventName)
|
||||
|
||||
--Register loadFunc to be called when event is fired
|
||||
E.RegisterCallback(E, eventName, loadFunc)
|
||||
|
||||
@@ -5,7 +5,7 @@ local TT = E:NewModule("Tooltip", "AceHook-3.0", "AceEvent-3.0");
|
||||
--Lua functions
|
||||
local _G = _G
|
||||
local unpack = unpack
|
||||
local twipe, tinsert, tconcat = table.wipe, table.insert, table.concat
|
||||
local getn, twipe, tinsert, tconcat = table.getn, table.wipe, table.insert, table.concat
|
||||
local floor = math.floor
|
||||
local find, format, match = string.find, string.format, string.match
|
||||
--WoW API / Variables
|
||||
|
||||
Reference in New Issue
Block a user