Skip to content

Commit

Permalink
route: skip arrow updates while frame is not ready
Browse files Browse the repository at this point in the history
There seem to be issues with the loading order here lately without
having anything changed in the code. Maybe again related to windows
updates that changed timing behaviour somewhere.
  • Loading branch information
shagu committed Nov 17, 2023
1 parent 6b2c263 commit c6fc61b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions route.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ local defcolor = "|cffffcc00"
local r, g, b

pfQuest.route.arrow:SetScript("OnUpdate", function()
-- abort if the frame is not initialized yet
if not this.parent then return end

xplayer, yplayer = GetPlayerMapPosition("player")
wrongmap = xplayer == 0 and yplayer == 0 and true or nil
target = this.parent.coords and this.parent.coords[1] and this.parent.coords[1][4] and this.parent.coords[1] or nil
Expand Down

0 comments on commit c6fc61b

Please sign in to comment.