Quantcast

PvP stuff mover

Darthpred [11-23-12 - 13:04]
PvP stuff mover
Filename
ElvUI_SLE/modules/load_modules.xml
ElvUI_SLE/modules/pvpmover/pvpmover.lua
diff --git a/ElvUI_SLE/modules/load_modules.xml b/ElvUI_SLE/modules/load_modules.xml
index 465f2f2..cf1a02d 100644
--- a/ElvUI_SLE/modules/load_modules.xml
+++ b/ElvUI_SLE/modules/load_modules.xml
@@ -1,6 +1,7 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/">
 	<Script file='install.lua'/>
 	<Script file='options.lua'/>
+	<Script file='pvpmover\pvpmover.lua'/>
 	<Include file='autorelease\load_autorelease.xml'/>
 	<Include file='backgrounds\load_backgrounds.xml'/>
 	<Include file='chat\load_chat.xml'/>
diff --git a/ElvUI_SLE/modules/pvpmover/pvpmover.lua b/ElvUI_SLE/modules/pvpmover/pvpmover.lua
new file mode 100644
index 0000000..d59a149
--- /dev/null
+++ b/ElvUI_SLE/modules/pvpmover/pvpmover.lua
@@ -0,0 +1,19 @@
+local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
+local P = E:NewModule('PvPMover', 'AceHook-3.0', 'AceEvent-3.0');
+
+local function update()
+	if WorldStateCaptureBar1 then
+		local bar = WorldStateCaptureBar1
+		bar:HookScript("OnShow", function(self) self:SetPoint("TOP", WorldStateAlwaysUpFrame, "BOTTOM", 0, -10) end)
+		bar:Hide()
+		bar:Show()
+		P:UnregisterEvent("UPDATE_WORLD_STATES")
+	end
+end
+
+function P:Initialize()
+	self:RegisterEvent("UPDATE_WORLD_STATES", update)
+	E:CreateMover(WorldStateAlwaysUpFrame, "PvPMover", "PvP", nil, nil, nil, "ALL,S&L")
+end
+
+E:RegisterModule(P:GetName())
\ No newline at end of file