Skip to content

Commit

Permalink
Replace deprecated GetMapLandmarkInfo with C_WorldMap.GetMapLandmarkInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Mar 30, 2017
1 parent 0f93c06 commit ba95b67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions battlegrounds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ do -- POI handling
[152] = "alliance",
[154] = "horde",
}
local GetNumMapLandmarks, GetMapLandmarkInfo, GetPOITextureCoords = GetNumMapLandmarks, GetMapLandmarkInfo, GetPOITextureCoords
local GetNumMapLandmarks, GetMapLandmarkInfo, GetPOITextureCoords = GetNumMapLandmarks, C_WorldMap.GetMapLandmarkInfo, GetPOITextureCoords
local capTime = 0
local path = {136441}
GetIconData = function(icon)
Expand Down Expand Up @@ -678,7 +678,7 @@ do
end
function Capping:WinterAssault() -- scans POI landmarks for changes in wall textures
for i = 1, GetNumMapLandmarks(), 1 do
local name, _, textureIndex, x, y = GetMapLandmarkInfo(i)
local name, _, textureIndex, x, y = C_WorldMap.GetMapLandmarkInfo(i)
local tindex = floor(x * 10000).."_"..floor(y * 10000)
local ti = walls[tindex]
if (ti and ti ~= textureIndex) or (not ti and wallid[tindex]) then
Expand All @@ -694,7 +694,7 @@ do
end
walls = { }
for i = 1, GetNumMapLandmarks(), 1 do
local _, _, textureIndex, x, y = GetMapLandmarkInfo(i)
local _, _, textureIndex, x, y = C_WorldMap.GetMapLandmarkInfo(i)
local tindex = floor(x * 10000).."_"..floor(y * 10000)
if wallid[tindex] then
walls[tindex] = textureIndex
Expand Down
2 changes: 1 addition & 1 deletion core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ local function StartWorldTimers()
if not bar or prevColor == "info1" then
local currentmapid = GetCurrentMapAreaID()
SetMapByID((i == 2 and 708) or 501)
local _, _, ti, _, _ = GetMapLandmarkInfo(1)
local _, _, ti, _, _ = C_WorldMap.GetMapLandmarkInfo(1)
if ti == 46 then
color = "alliance"
elseif ti == 48 then
Expand Down

0 comments on commit ba95b67

Please sign in to comment.