TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, callbacks, silent, crazy)
In the hopes of making the meaning of those parameters more obvious:
lua Code:
-- TODO: Make this not suck
function TomTom:AddWaypoint(x, y, desc, persistent, minimap, world, silent)
local c,z = GetCurrentMapContinent(), GetCurrentMapZone()
if not c or not z or c < 1 then
--self:Print("Cannot find a valid zone to place the coordinates")
return
end
return self:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, nil, silent)
end
function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, callbacks, silent, crazy)
-- Convert the c,z,x,y tuple to m,f,x,y and pass the work off to AddMFWaypoint()
local mapId, floor = hbd:GetMapIDFromCZ(c, z)
if not mapId then
return
end
return self:AddMFWaypoint(mapId, floor, x/100, y/100, {
title = desc,
persistent = persistent,
minimap = minimap,
world = world,
callbacks = callbacks,
silent = silent,
crazy = crazy,
})
end