Skip to content

Commit 030fff2

Browse files
committed
Modules/WarsongGulchTwinPeaks: Tweak
1 parent cb60bfe commit 030fff2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Modules/WarsongGulchTwinPeaks.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11

2-
local mod, L
2+
local mod, L, isRetail
33
do
44
local _, core = ...
55
mod, L = core:NewMod()
6+
isRetail = core.isRetail
67
end
78

89
local strmatch = string.match
910
do
1011
local icon = {136441, C_Minimap.GetPOITextureCoords(45)}
1112
function mod:CHAT_MSG(msg)
1213
if strmatch(msg, L.capturedTheTrigger) then -- flag was captured
13-
self:StartBar(L.flagRespawns, 12, self.isRetail and icon or 134420, "colorOther") -- White flag, or inv_misc_rune_07 (WSG rune)
14+
self:StartBar(L.flagRespawns, 12, isRetail and icon or 134420, "colorOther") -- White flag, or inv_misc_rune_07 (WSG rune)
1415
end
1516
end
1617
end
@@ -52,15 +53,15 @@ do
5253
function mod:EnterZone()
5354
self:RegisterEvent("CHAT_MSG_BG_SYSTEM_HORDE", "CHAT_MSG")
5455
self:RegisterEvent("CHAT_MSG_BG_SYSTEM_ALLIANCE", "CHAT_MSG")
55-
if not self.isRetail then
56-
self:RegisterEvent("UPDATE_UI_WIDGET", "WSGTimeLeft")
57-
else
56+
if isRetail then
5857
local func = function() GetTimeRemaining(self) end
5958
self:Timer(5, func)
6059
self:Timer(30, func)
6160
self:Timer(60, func)
6261
self:Timer(130, func)
6362
self:Timer(240, func)
63+
else
64+
self:RegisterEvent("UPDATE_UI_WIDGET", "WSGTimeLeft")
6465
end
6566
end
6667
end

0 commit comments

Comments
 (0)