View Single Post
07-03-22, 06:41 PM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,936
One of the ways I recall handling this type of recursive callback process in regular programming is to have a variable set when you start processing and then test for that for future calls.

So, something like the following may help, if you can't think of anything wowapi wise.

Lua Code:
  1. -- Addon wide variable ( at top of file )
  2. local isProcessing = false
You might also need to reset this on a reload

And then in your event code
Lua Code:
  1. elseif event == "PLAYER_EQUIPMENT_CHANGED" then
  2.      -- return out immediately if in the middle of an update
  3.      if isProcessing then return end
  4.  
  5.      -- new update, so set processing flag
  6.      isProcessing = true
  7.  
  8.     --------------------------------------------
  9.     -- Rest of your code after this point
  10.    ---------------------------------------------
  11.    
  12.    -- finished processing so reset processing flag
  13.    isProcessing = false
  14.  
  15. end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 07-03-22 at 06:43 PM.
  Reply With Quote