Quantcast

-Updated frame positioning to be one right on top of each other, like it used to be.

Xruptor [10-09-12 - 02:06]
-Updated frame positioning to be one right on top of each other, like it used to be.
-Frames now properly show up where they are supposed to and don't randomly wander.
-Changed to hooksecure functions to capture loot events and modify after it's been called.
-
Filename
LootRollMover.lua
LootRollMover.toc
diff --git a/LootRollMover.lua b/LootRollMover.lua
index f205e73..f9c7f40 100644
--- a/LootRollMover.lua
+++ b/LootRollMover.lua
@@ -78,13 +78,22 @@ local function RepositionLootFrames()
 	if ( frame ) then
 		frame:ClearAllPoints()
 		frame:SetPoint("BOTTOMLEFT", _G["LootRollMoverAnchor_Frame"], "BOTTOMLEFT", 4, 2)
-		frame:SetParent(UIParent)
 		frame:SetScale(LRMDB.scale)
 	end
 	for i=1, NUM_GROUP_LOOT_FRAMES do
 		frame = _G["GroupLootFrame" .. i]
-		if ( frame ) then
-			frame:SetScale(LRMDB.scale)
+		if i == 1 then
+			if ( frame ) then
+				frame:ClearAllPoints()
+				frame:SetPoint("BOTTOMLEFT", _G["LootRollMoverAnchor_Frame"], "BOTTOMLEFT", 4, 2)
+				frame:SetScale(LRMDB.scale)
+			end
+		elseif i > 1 then
+			if ( frame ) then
+				frame:ClearAllPoints()
+				frame:SetPoint("BOTTOM", "GroupLootFrame" .. (i-1), "TOP", 0, 3)
+				frame:SetScale(LRMDB.scale)
+			end
 		end
 	end
 end
@@ -94,6 +103,7 @@ hooksecurefunc("GroupLootContainer_RemoveFrame", RepositionLootFrames)
 hooksecurefunc("GroupLootFrame_OnShow", RepositionLootFrames)
 hooksecurefunc("GroupLootFrame_OpenNewFrame", RepositionLootFrames)
 hooksecurefunc("GroupLootFrame_OnEvent", RepositionLootFrames)
+hooksecurefunc("GroupLootContainer_Update", RepositionLootFrames)
 hooksecurefunc("AlertFrame_FixAnchors", RepositionLootFrames)

 function f:DrawAnchor()
diff --git a/LootRollMover.toc b/LootRollMover.toc
index a98cbd3..dd727f0 100644
--- a/LootRollMover.toc
+++ b/LootRollMover.toc
@@ -1,7 +1,7 @@
 ## Interface: 50001
 ## Title: LootRollMover
 ## Author: Xruptor
-## Version: 3.1
+## Version: 3.2
 ## Notes: A simple mod to move the default Blizzard Group Loot Roll Windows
 ## SavedVariables: LRMDB