View Single Post
04/25/23, 09:15 AM   #16
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Lua Code:
  1. if MyAddon.travelLoop == false then
  2.    MyAddon.travelLoop = true
  3.    zo_callLater(function()
  4.       MyAddon.travelLoop = true
  5.       JumpToGuildMember(displayName)
  6.       MyAddon.travelLoop = false
  7.    end, effectDelay)
  8. end

Like this?
Will call the zo_callLater only if travelLoop is false.
As the 1st call set's it true BEFORE the zo_callLater AND within before the jump,
and then does the zo_calllater where travelLoop gets reset to false again after the JumpToGuildMember is executed again, you should not have any double attempts that way?
You'd have to test this.

Your call to JumpToGuildMember would start the same code again, where it checks if MyAddon.travelLoop == false -> MyAddon.travelLoop = true
directly before the jump again so it should be always true there if the check is done,
until after the call of JumpToGuildMember where it getsr eset to false
  Reply With Quote