Quantcast

-Fixed for the new Criteria Alerts that are associated with the updated Achievements system.

Xruptor [09-29-12 - 03:55]
-Fixed for the new Criteria Alerts that are associated with the updated Achievements system.
-Criteria Alerts will now honor the position of the Achievement alert frames.
Filename
xanAchievementMover.lua
xanAchievementMover.toc
diff --git a/xanAchievementMover.lua b/xanAchievementMover.lua
index fd75086..2cf64a3 100644
--- a/xanAchievementMover.lua
+++ b/xanAchievementMover.lua
@@ -9,7 +9,7 @@ f:SetScript("OnEvent", function(self, event, ...) if self[event] then return sel
 ----------------------

 local function customFixAnchors(...)
-	local frame, frame2, frameD, frameG = AchievementAlertFrame1, AchievementAlertFrame2, DungeonCompletionAlertFrame1, GuildChallengeAlertFrame
+	local frame, frame2, frameD, frameG, frameA = AchievementAlertFrame1, AchievementAlertFrame2, DungeonCompletionAlertFrame1, GuildChallengeAlertFrame, AlertFrame

 	--check for dungeon shown
 	if (frameD:IsShown()) then
@@ -34,6 +34,19 @@ local function customFixAnchors(...)
 		end
 	end

+	--position the criteria alerts
+	for i=1, MAX_ACHIEVEMENT_ALERTS do
+		local achframe = _G["CriteriaAlertFrame"..i];
+		if ( achframe and achframe:IsShown() ) then
+			achframe:ClearAllPoints()
+			if i == 1 then
+				f:LoadPositionHook("CriteriaAlertFrame1", "xanAchievementMover_Ach1")
+			elseif _G["CriteriaAlertFrame"..(i-1)] then
+				achframe:SetPoint("TOPLEFT", _G["CriteriaAlertFrame"..(i-1)], "BOTTOMLEFT", 0, 4)
+			end
+		end
+	end
+
 end

 ----------------------
diff --git a/xanAchievementMover.toc b/xanAchievementMover.toc
index 8828603..5bb039c 100644
--- a/xanAchievementMover.toc
+++ b/xanAchievementMover.toc
@@ -2,7 +2,7 @@
 ## Title: xanAchievementMover
 ## Notes: A simple addon that allows the user to move the Achievement and Dungeon notifications.
 ## Author: Xruptor
-## Version: 1.1
+## Version: 1.2
 ## SavedVariables: XanAM_DB

 localization\localization.lua