Skip to content

Commit c94e162

Browse files
committed
Core: Cleanup
1 parent 3ada63a commit c94e162

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

Core.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,15 +657,16 @@ do
657657
end
658658
end
659659

660-
function API:StartFlagCaptures(bgcaptime, uiMapID, colors)
660+
local GetBestMapForUnit = C_Map.GetBestMapForUnit
661+
function API:StartFlagCaptures(bgcaptime, _, colors)
661662
atlasColors = colors
662663
capTime = bgcaptime -- cap time
663-
curMapID = C_Map.GetBestMapForUnit("player") or uiMapID -- current map
664+
curMapID = GetBestMapForUnit("player") -- current map
664665
landmarkCache = {}
665666
curMod = self
666-
local pois = GetAreaPOIForMap(uiMapID)
667+
local pois = GetAreaPOIForMap(curMapID)
667668
for i = 1, #pois do
668-
local tbl = GetAreaPOIInfo(uiMapID, pois[i])
669+
local tbl = GetAreaPOIInfo(curMapID, pois[i])
669670
local icon = tbl.textureIndex
670671
local atlasName = tbl.atlasName
671672
if icon then

Core_BCC.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,15 +732,16 @@ do
732732
end
733733
end
734734

735-
function API:StartFlagCaptures(bgcaptime, uiMapID, colors)
735+
local GetBestMapForUnit = C_Map.GetBestMapForUnit
736+
function API:StartFlagCaptures(bgcaptime, _, colors)
736737
atlasColors = colors
737738
capTime = bgcaptime -- cap time
738-
curMapID = C_Map.GetBestMapForUnit("player") or uiMapID -- current map
739+
curMapID = GetBestMapForUnit("player") -- current map
739740
landmarkCache = {}
740741
curMod = self
741-
local pois = GetAreaPOIForMap(uiMapID)
742+
local pois = GetAreaPOIForMap(curMapID)
742743
for i = 1, #pois do
743-
local tbl = GetAreaPOIInfo(uiMapID, pois[i])
744+
local tbl = GetAreaPOIInfo(curMapID, pois[i])
744745
local icon = tbl.textureIndex
745746
local atlasName = tbl.atlasName
746747
if icon then

Core_Vanilla.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,15 +726,16 @@ do
726726
end
727727
end
728728

729-
function API:StartFlagCaptures(bgcaptime, uiMapID, colors)
729+
local GetBestMapForUnit = C_Map.GetBestMapForUnit
730+
function API:StartFlagCaptures(bgcaptime, _, colors)
730731
atlasColors = colors
731732
capTime = bgcaptime -- cap time
732-
curMapID = C_Map.GetBestMapForUnit("player") or uiMapID -- current map
733+
curMapID = GetBestMapForUnit("player") -- current map
733734
landmarkCache = {}
734735
curMod = self
735-
local pois = GetAreaPOIForMap(uiMapID)
736+
local pois = GetAreaPOIForMap(curMapID)
736737
for i = 1, #pois do
737-
local tbl = GetAreaPOIInfo(uiMapID, pois[i])
738+
local tbl = GetAreaPOIInfo(curMapID, pois[i])
738739
local icon = tbl.textureIndex
739740
local atlasName = tbl.atlasName
740741
if icon then

Core_Wrath.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,15 +732,16 @@ do
732732
end
733733
end
734734

735-
function API:StartFlagCaptures(bgcaptime, uiMapID, colors)
735+
local GetBestMapForUnit = C_Map.GetBestMapForUnit
736+
function API:StartFlagCaptures(bgcaptime, _, colors)
736737
atlasColors = colors
737738
capTime = bgcaptime -- cap time
738-
curMapID = C_Map.GetBestMapForUnit("player") or uiMapID -- current map
739+
curMapID = GetBestMapForUnit("player") -- current map
739740
landmarkCache = {}
740741
curMod = self
741-
local pois = GetAreaPOIForMap(uiMapID)
742+
local pois = GetAreaPOIForMap(curMapID)
742743
for i = 1, #pois do
743-
local tbl = GetAreaPOIInfo(uiMapID, pois[i])
744+
local tbl = GetAreaPOIInfo(curMapID, pois[i])
744745
local icon = tbl.textureIndex
745746
local atlasName = tbl.atlasName
746747
if icon then

0 commit comments

Comments
 (0)