/branches/zhTW_201107
-- make into AceTimer. |
-- @class file |
-- @name AceTimer-3.0 |
-- @release $Id: AceTimer-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $ |
-- @release $Id: AceTimer-3.0.lua 1037 2011-09-02 16:24:08Z mikk $ |
--[[ |
Basic assumptions: |
- ALLOWS unscheduling ANY timer (including the current running one) at any time, including during OnUpdate processing |
]] |
local MAJOR, MINOR = "AceTimer-3.0", 5 |
local MAJOR, MINOR = "AceTimer-3.0", 6 |
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceTimer then return end -- No upgrade needed |
-- Time to clean it out? |
local list = selfs[self] |
if (list.__ops or 0) < 250 then -- 250 slosh indices = ~10KB wasted (max!). For one 'self'. |
if (list.__ops or 0) < 250 then -- 250 slosh indices = ~10KB wasted (worst case!). For one 'self'. |
return |
end |
local n=0 |
for k,v in pairs(list) do |
newlist[k] = v |
n=n+1 |
if type(v)=="table" and v.callback then -- if the timer is actually live: count it |
n=n+1 |
end |
end |
newlist.__ops = 0 -- Reset operation count |
AceTimer.frame:SetScript("OnEvent", OnEvent) |
AceTimer.frame:RegisterEvent("PLAYER_REGEN_ENABLED") |
-- In theory, we should hide&show the frame based on there being timers or not. |
-- In theory, we could hide&show the frame based on there being timers or not. |
-- However, this job is fairly expensive, and the chance that there will |
-- actually be zero timers running is diminuitive to say the lest. |
-- actually be zero timers running is diminuitive to say the least. |
-- make into AceSerializer. |
-- @class file |
-- @name AceSerializer-3.0 |
-- @release $Id: AceSerializer-3.0.lua 910 2010-02-11 21:54:24Z mikk $ |
local MAJOR,MINOR = "AceSerializer-3.0", 3 |
-- @release $Id: AceSerializer-3.0.lua 1038 2011-10-03 01:39:58Z mikk $ |
local MAJOR,MINOR = "AceSerializer-3.0", 4 |
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
if not AceSerializer then return end |
local tconcat = table.concat |
-- quick copies of string representations of wonky numbers |
local serNaN = tostring(0/0) |
local serInf = tostring(1/0) |
local serNegInf = tostring(-1/0) |
local inf = math.huge |
local serNaN -- can't do this in 4.3, see ace3 ticket 268 |
local serInf = tostring(inf) |
local serNegInf = tostring(-inf) |
-- Serialization functions |
local function SerializeStringHelper(ch) -- Used by SerializeValue for strings |
elseif t=="number" then -- ^N = number (just tostring()ed) or ^F (float components) |
local str = tostring(v) |
if tonumber(str)==v or str==serNaN or str==serInf or str==serNegInf then |
if tonumber(str)==v --[[not in 4.3 or str==serNaN]] or str==serInf or str==serNegInf then |
-- translates just fine, transmit as-is |
res[nres+1] = "^N" |
res[nres+2] = str |
end |
local function DeserializeNumberHelper(number) |
if number == serNaN then |
--[[ not in 4.3 if number == serNaN then |
return 0/0 |
elseif number == serNegInf then |
return -1/0 |
else]]if number == serNegInf then |
return -inf |
elseif number == serInf then |
return 1/0 |
return inf |
else |
return tonumber(number) |
end |
Quick answers to current "problems" (see recent Change Log entries for additional details): |
[color="#7f1f1f"]-------------------------[/color] |
[color="#ff3f3f"][I][B][U]Recent Changes (Aloft 4.4.2):[/U][/B][/I] |
- merged in zhTW localization contributed by WoWInterface user aa9012456 |
- updated LibBabbleFaction-3.0 to latest/greatest (4.2-release9) |
- updated Ace3 to latest/greatest (r1039)[/color] |
[color="#ff3f3f"][I][B][U]Recent Changes (Aloft 4.4.1):[/U][/B][/I] |
- fixed problem wih TagCompiler-2.0 (that was introduced in Aloft-4.3.6) |
- fixed (subtle) problem with class colors in name text; please watch for side-effects (related to text tags) |
- increased frame delay slightly on state icon initialization (state icon may be reanchored after OnShow) |
- explicitly nullified frame level for bosses (with "bosses", Blizzard simply hides the underlying default nameplate level text region, and its content may be randomly initialized, or never initialized) |
- updated to Ace3 latest/greatest (r1023)[/color] |
[color="#ff3f3f"][I][B][U]Recent Changes (Aloft 4.3.0):[/U][/B][/I] |
- updated nameplate frame assembly detection to the new WoW 4.1 structure |
- implemented WoW 4.1 COMBAT_LOG_EVENT_UNFILTERED change (new parameter to the event) |
- updated Auto Show modules to use Blizzard's new nameplate "overlap" system; now known as the nameplate "motion" subsystem |
- please reconfigure your relevant AutoShow/Motion options (when no motion is applied: equivalent to Blizzard "Overlap" setting)[/color] |
[color="#7f1f1f"]---[/color] |
[color="#1f9f9f"][B]!!Tag Error!! Problems? Aloft options have disappeared? Aloft Presets not available or not loading properly?[/B] |
[I] |