This commit is contained in:
Bunny67
2018-07-13 17:31:57 +03:00
parent 89e48a1432
commit c9f6edcd9b
13 changed files with 21 additions and 59 deletions
@@ -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
+3 -38
View File
@@ -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
+1 -2
View File
@@ -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