Quantcast

-Fixed a slight issue where focus targets weren't being processed correctly.

Xruptor [08-12-10 - 13:23]
-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.
Filename
XanDebuffTimers.lua
XanDebuffTimers.toc
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