From e58a7471161d461c7d60947d56eec2a462b5114b Mon Sep 17 00:00:00 2001 From: Xruptor Date: Thu, 12 Aug 2010 09:23:40 -0400 Subject: [PATCH] -Fixed a slight issue where focus targets weren't being processed correctly. -Fixed an issue with the initial frame positions. It should be centered on screen on initial drag. --- XanDebuffTimers.lua | 22 ++++++++++++---------- XanDebuffTimers.toc | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/XanDebuffTimers.lua b/XanDebuffTimers.lua index ecb5564..7b689a6 100644 --- a/XanDebuffTimers.lua +++ b/XanDebuffTimers.lua @@ -153,11 +153,11 @@ function f:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, eventType, srcGUID, src --process the spells based on GUID if dstGUID == targetGUID then f:ProcessDebuffs("target", timers) - elseif dstGUID == focusGUID then + end + if dstGUID == focusGUID then f:ProcessDebuffs("focus", timersFocus) end end - end ---------------------- @@ -454,26 +454,28 @@ function f:RestoreLayout(frame) ["relativePoint"] = "CENTER", ["PosX"] = 0, ["PosY"] = 0, + ["firsttime"] = true, } - opt = XDT_DB[frame]; + opt = XDT_DB[frame] end local x = opt.PosX; local y = opt.PosY; - local s = f:GetEffectiveScale(); + local s = f:GetEffectiveScale() - if not x or not y then - f:ClearAllPoints(); - f:SetPoint("CENTER", UIParent, "CENTER", 0, 0); + if not x or not y or opt.firsttime then + f:ClearAllPoints() + f:SetPoint("CENTER", UIParent, "CENTER", 0, 0) + if opt.firsttime then opt.firsttime = nil end return end --calculate the scale - x,y = x/s,y/s; + x,y = x/s, y/s --set the location - f:ClearAllPoints(); - f:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x, y); + f:ClearAllPoints() + f:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x, y) end diff --git a/XanDebuffTimers.toc b/XanDebuffTimers.toc index f96016b..5a60b25 100644 --- a/XanDebuffTimers.toc +++ b/XanDebuffTimers.toc @@ -2,7 +2,7 @@ ## Title: XanDebuffTimers ## Notes: A small text based progress bar system for target debuffs. ## Author: Xanthos -## Version: 1.8 +## Version: 1.9 ## SavedVariablesPerCharacter: XDT_DB XanDebuffTimers.lua -- 1.7.9.5