From adb27771e55380e44679d298c3bf95e22fec4ca1 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 22 Feb 2013 11:50:00 +0400 Subject: [PATCH] Nothing interesting --- ElvUI_SLE/modules/autorelease/autorelease.lua | 64 ++++++++++++------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/ElvUI_SLE/modules/autorelease/autorelease.lua b/ElvUI_SLE/modules/autorelease/autorelease.lua index 7996296..7946ab1 100644 --- a/ElvUI_SLE/modules/autorelease/autorelease.lua +++ b/ElvUI_SLE/modules/autorelease/autorelease.lua @@ -1,33 +1,33 @@ ---Credit to Repooc. ---Remade his auto release featule to module which allows profile setting of the function not the global one. -local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore -local AR = E:NewModule('AutoRelease', 'AceHook-3.0', 'AceEvent-3.0'); - -function AR:Releasing() - local inInstance, instanceType = IsInInstance() - if (inInstance and (instanceType == "pvp")) then - if E.db.sle.pvpautorelease then - local soulstone = GetSpellInfo(20707) - if ((E.myclass ~= "SHAMAN") and not (soulstone and UnitBuff("player", soulstone))) then - RepopMe() - end - end - end - - -- auto resurrection for world PvP area...when active - if E.db.sle.pvpautorelease then - for index = 1, GetNumWorldPVPAreas() do - local pvpID, localizedName, isActive, canQueue, startTime, canEnter = GetWorldPVPAreaInfo(index) - - if (GetRealZoneText() == localizedName and isActive) then - RepopMe() - end - end - end -end - -function AR:Initialize() - self:RegisterEvent("PLAYER_DEAD", "Releasing"); -end - +--Credit to Repooc. +--Remade his auto release featule to module which allows profile setting of the function not the global one. +local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore +local AR = E:NewModule('AutoRelease', 'AceHook-3.0', 'AceEvent-3.0'); + +function AR:Releasing() + local inInstance, instanceType = IsInInstance() + if (inInstance and (instanceType == "pvp")) then + if E.db.sle.pvpautorelease then + local soulstone = GetSpellInfo(20707) + if ((E.myclass ~= "SHAMAN") and not (soulstone and UnitBuff("player", soulstone))) then + RepopMe() + end + end + end + + -- auto resurrection for world PvP area...when active + if E.db.sle.pvpautorelease then + for index = 1, GetNumWorldPVPAreas() do + local _, localizedName, isActive = GetWorldPVPAreaInfo(index) + + if (GetRealZoneText() == localizedName and isActive) then + RepopMe() + end + end + end +end + +function AR:Initialize() + self:RegisterEvent("PLAYER_DEAD", "Releasing"); +end + E:RegisterModule(AR:GetName()) \ No newline at end of file -- 1.7.9.5