Thread Tools Display Modes
01-27-24, 11:11 PM   #1
Hubb777
A Flamescale Wyrmkin
 
Hubb777's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2024
Posts: 112
Integration with TomTom

Code:
local addonName, addon = ...
local listener = CreateFrame("Frame")
listener:RegisterEvent("CHAT_MSG_MONSTER_SAY")
listener:SetScript("OnEvent", function(self, event, text, monsterName)
    if event == "CHAT_MSG_MONSTER_SAY" then
        local mapID = C_Map.GetBestMapForUnit("player")
        if mapID ~= 2024 then return end
        
        for _, data in pairs(addon.db) do
            local announce = data.announce
            if announce and announce[GetLocale()] and (announce[GetLocale()] == text) then
                if C_Map.CanSetUserWaypointOnMap(mapID) then
                    local point = UiMapPoint.CreateFromCoordinates(2024, data.coordX/100, data.coordY/100)
                    C_Map.SetUserWaypoint(point)
                    C_SuperTrack.SetSuperTrackedUserWaypoint(true)
                end
if (IsAddOnLoaded("TomTom")) then
            addon.uid = TomTom:AddWaypoint(2024, data.coordX/100, data.coordY/100, {title = data.name} )
        end
            end
        end
    end
end)
The problem is that the direction arrow does not appear immediately. And it appears only after I have left this point. At 200-300 meters.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Integration with TomTom


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off