Skip to content

Commit

Permalink
Update TomTom integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravendwyr committed Jun 23, 2024
1 parent 8e74762 commit a27303b
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,29 @@ end
local function createWaypoint(mapFile, coord)
local x, y = HandyNotes:getXY(coord)
local point = points[mapFile] and points[mapFile][coord]
local _, mode = point:match("(%d+):(.*)")
local text

if mode == "H" then text = "Honor the Flame"
elseif mode == "D" then text = "Desecrate this Fire!"
elseif mode == "C" then text = "Steal the City's Flame" end

TomTom:AddWaypoint(mapFile, x, y, { title = "Midsummer Bonfire", persistent = nil, minimap = true, world = true })
TomTom:AddWaypoint(mapFile, x, y, { title = text, from = addOnName, persistent = false, minimap = true, world = true })
end

local function createAllWaypoints()
local questID, mode

for mapFile, coords in next, points do
if not continents[mapFile] then
for coord, value in next, coords do
questID, mode = value:match("(%d+):(.*)")
for coord, value in next, coords do
local questID = value:match("(%d+):(.*)")

if coord and (db.completed or not completedQuests[tonumber(questID)]) then
createWaypoint(mapFile, coord)
if coord and (db.completed or not completedQuests[tonumber(questID)]) then
createWaypoint(mapFile, coord)
end
end
end
end
end

TomTom:SetClosestWaypoint()
end

Expand Down

0 comments on commit a27303b

Please sign in to comment.