Skip to content

Commit dc16075

Browse files
committed
Cleanups
1 parent ec7dfb0 commit dc16075

13 files changed

+29
-37
lines changed

Core.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ do
658658
end
659659
end
660660

661-
function API:StartFlagCaptures(bgcaptime, _, colors)
661+
function API:StartFlagCaptures(bgcaptime, colors)
662662
atlasColors = colors
663663
capTime = bgcaptime -- cap time
664664
landmarkCache = {}
@@ -670,7 +670,8 @@ do
670670
self:UnregisterEvent("AREA_POIS_UPDATED")
671671
end
672672

673-
function API:RestoreFlagCaptures(uiMapID, inProgressDataTbl, maxBarTime)
673+
function API:RestoreFlagCaptures(inProgressDataTbl, maxBarTime)
674+
local uiMapID = GetBestMapForUnit("player")
674675
local pois = GetAreaPOIForMap(uiMapID)
675676
for i = 1, #pois do
676677
local tbl = GetAreaPOIInfo(uiMapID, pois[i])

Core_BCC.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ do
733733
end
734734
end
735735

736-
function API:StartFlagCaptures(bgcaptime, _, colors)
736+
function API:StartFlagCaptures(bgcaptime, colors)
737737
atlasColors = colors
738738
capTime = bgcaptime -- cap time
739739
landmarkCache = {}
@@ -745,7 +745,8 @@ do
745745
self:UnregisterEvent("AREA_POIS_UPDATED")
746746
end
747747

748-
function API:RestoreFlagCaptures(uiMapID, inProgressDataTbl, maxBarTime)
748+
function API:RestoreFlagCaptures(inProgressDataTbl, maxBarTime)
749+
local uiMapID = GetBestMapForUnit("player")
749750
local pois = GetAreaPOIForMap(uiMapID)
750751
for i = 1, #pois do
751752
local tbl = GetAreaPOIInfo(uiMapID, pois[i])

Core_Vanilla.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ do
727727
end
728728
end
729729

730-
function API:StartFlagCaptures(bgcaptime, _, colors)
730+
function API:StartFlagCaptures(bgcaptime, colors)
731731
atlasColors = colors
732732
capTime = bgcaptime -- cap time
733733
landmarkCache = {}
@@ -739,7 +739,8 @@ do
739739
self:UnregisterEvent("AREA_POIS_UPDATED")
740740
end
741741

742-
function API:RestoreFlagCaptures(uiMapID, inProgressDataTbl, maxBarTime)
742+
function API:RestoreFlagCaptures(inProgressDataTbl, maxBarTime)
743+
local uiMapID = GetBestMapForUnit("player")
743744
local pois = GetAreaPOIForMap(uiMapID)
744745
for i = 1, #pois do
745746
local tbl = GetAreaPOIInfo(uiMapID, pois[i])

Core_Wrath.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ do
733733
end
734734
end
735735

736-
function API:StartFlagCaptures(bgcaptime, _, colors)
736+
function API:StartFlagCaptures(bgcaptime, colors)
737737
atlasColors = colors
738738
capTime = bgcaptime -- cap time
739739
landmarkCache = {}
@@ -745,7 +745,8 @@ do
745745
self:UnregisterEvent("AREA_POIS_UPDATED")
746746
end
747747

748-
function API:RestoreFlagCaptures(uiMapID, inProgressDataTbl, maxBarTime)
748+
function API:RestoreFlagCaptures(inProgressDataTbl, maxBarTime)
749+
local uiMapID = GetBestMapForUnit("player")
749750
local pois = GetAreaPOIForMap(uiMapID)
750751
for i = 1, #pois do
751752
local tbl = GetAreaPOIInfo(uiMapID, pois[i])

Modules/AlteracValley.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ local function AVSyncRequest()
179179
hasData = true
180180
end
181181

182-
local currentWorldMapId = 91
183182
do
184183
local timer = nil
185184
local function SendAVTimers()
@@ -214,7 +213,7 @@ do
214213
end
215214

216215
if next(inProgressDataTbl) then
217-
self:RestoreFlagCaptures(currentWorldMapId, inProgressDataTbl, 242)
216+
self:RestoreFlagCaptures(inProgressDataTbl, 242)
218217
end
219218
end
220219

@@ -243,11 +242,9 @@ do
243242
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
244243
function mod:EnterZone(id)
245244
if id == 2197 then
246-
currentWorldMapId = 1537
247-
self:StartFlagCaptures(241, currentWorldMapId) -- Korrak's Revenge (WoW 15th)
245+
self:StartFlagCaptures(241) -- Korrak's Revenge (WoW 15th)
248246
else
249-
currentWorldMapId = 91
250-
self:StartFlagCaptures(242, currentWorldMapId)
247+
self:StartFlagCaptures(242)
251248
end
252249
self:SetupHealthCheck("11946", L.hordeBoss, "Horde Boss", 236452, "colorAlliance") -- Interface/Icons/Achievement_Character_Orc_Male
253250
self:SetupHealthCheck("11948", L.allianceBoss, "Alliance Boss", 236444, "colorHorde") -- Interface/Icons/Achievement_Character_Dwarf_Male

Modules/AlteracValley_TBC.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ local function AVSyncRequest()
177177
hasData = true
178178
end
179179

180-
local currentWorldMapId = 1459
181180
do
182181
local timer = nil
183182
local function SendAVTimers()
@@ -212,7 +211,7 @@ do
212211
end
213212

214213
if next(inProgressDataTbl) then
215-
self:RestoreFlagCaptures(currentWorldMapId, inProgressDataTbl, 242)
214+
self:RestoreFlagCaptures(inProgressDataTbl, 242)
216215
end
217216
end
218217

@@ -241,11 +240,9 @@ do
241240
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
242241
function mod:EnterZone(id)
243242
if id == 2197 then
244-
currentWorldMapId = 1537
245-
self:StartFlagCaptures(241, currentWorldMapId) -- Korrak's Revenge (WoW 15th)
243+
self:StartFlagCaptures(241) -- Korrak's Revenge (WoW 15th)
246244
else
247-
currentWorldMapId = 1459
248-
self:StartFlagCaptures(245, currentWorldMapId)
245+
self:StartFlagCaptures(245)
249246
end
250247
self:SetupHealthCheck("11946", L.hordeBoss, "Horde Boss", 134170, "colorAlliance") -- Interface/Icons/Inv_misc_head_orc_01
251248
self:SetupHealthCheck("11948", L.allianceBoss, "Alliance Boss", 134159, "colorHorde") -- Interface/Icons/inv_misc_head_dwarf_01

Modules/AlteracValley_Vanilla.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ local function AVSyncRequest()
192192
hasData = true
193193
end
194194

195-
local currentWorldMapId = 1459
196195
do
197196
local timer = nil
198197
local function SendAVTimers()
@@ -227,7 +226,7 @@ do
227226
end
228227

229228
if next(inProgressDataTbl) then
230-
self:RestoreFlagCaptures(currentWorldMapId, inProgressDataTbl, 242)
229+
self:RestoreFlagCaptures(inProgressDataTbl, 242)
231230
end
232231
end
233232

@@ -256,11 +255,9 @@ do
256255
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
257256
function mod:EnterZone(id)
258257
if id == 2197 then
259-
currentWorldMapId = 1537
260-
self:StartFlagCaptures(241, currentWorldMapId) -- Korrak's Revenge (WoW 15th)
258+
self:StartFlagCaptures(241) -- Korrak's Revenge (WoW 15th)
261259
else
262-
currentWorldMapId = 1459
263-
self:StartFlagCaptures(300, currentWorldMapId)
260+
self:StartFlagCaptures(300)
264261
end
265262
self:SetupHealthCheck("11946", L.hordeBoss, "Horde Boss", 134170, "colorAlliance") -- Interface/Icons/Inv_misc_head_orc_01
266263
self:SetupHealthCheck("11948", L.allianceBoss, "Alliance Boss", 134159, "colorHorde") -- Interface/Icons/inv_misc_head_dwarf_01

Modules/AlteracValley_Wrath.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ local function AVSyncRequest()
192192
hasData = true
193193
end
194194

195-
local currentWorldMapId = 1459
196195
do
197196
local timer = nil
198197
local function SendAVTimers()
@@ -227,7 +226,7 @@ do
227226
end
228227

229228
if next(inProgressDataTbl) then
230-
self:RestoreFlagCaptures(currentWorldMapId, inProgressDataTbl, 242)
229+
self:RestoreFlagCaptures(inProgressDataTbl, 242)
231230
end
232231
end
233232

@@ -256,11 +255,9 @@ do
256255
local RequestBattlefieldScoreData = RequestBattlefieldScoreData
257256
function mod:EnterZone(id)
258257
if id == 2197 then
259-
currentWorldMapId = 1537
260-
self:StartFlagCaptures(241, currentWorldMapId) -- Korrak's Revenge (WoW 15th)
258+
self:StartFlagCaptures(241) -- Korrak's Revenge (WoW 15th)
261259
else
262-
currentWorldMapId = 1459
263-
self:StartFlagCaptures(245, currentWorldMapId)
260+
self:StartFlagCaptures(245)
264261
end
265262
self:SetupHealthCheck("11946", L.hordeBoss, "Horde Boss", 236452, "colorAlliance") -- Interface/Icons/Achievement_Character_Orc_Male
266263
self:SetupHealthCheck("11948", L.allianceBoss, "Alliance Boss", 236444, "colorHorde") -- Interface/Icons/Achievement_Character_Dwarf_Male

Modules/EyeOfTheStorm.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ do
7777
if id == 566 then -- Normal/Brawl
7878
self:RegisterEvent("RAID_BOSS_WHISPER")
7979
else -- Rated
80-
self:StartFlagCaptures(C_PvP.IsSoloRBG() and 30 or 60, nil, colors) -- 30 sec when solo RBG, 60 otherwise
80+
self:StartFlagCaptures(C_PvP.IsSoloRBG() and 30 or 60, colors) -- 30 sec when solo RBG, 60 otherwise
8181
end
8282
end
8383
end

Modules/EyeOfTheStorm_TBC.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ do
7777
--if id == 566 then -- Normal/Brawl
7878
-- self:RegisterEvent("RAID_BOSS_WHISPER")
7979
--else -- Rated
80-
-- self:StartFlagCaptures(C_PvP.IsSoloRBG() and 30 or 60, nil, colors)
80+
-- self:StartFlagCaptures(C_PvP.IsSoloRBG() and 30 or 60, colors)
8181
--end
8282
end
8383
end

0 commit comments

Comments
 (0)