View Single Post
04-24-14, 05:38 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
If you really need to, you can briefly unregister an event for all frames then re-register when done.

Lua Code:
  1. local Frames={GetFramesRegisteredForEvent("ZONE_CHANGED_NEW_AREA")};
  2. for i,j in ipairs(Frames) do j:UnregisterEvent("ZONE_CHANGED_NEW_AREA"); end
  3.  
  4. --  Do whatever you need here
  5.  
  6. for i,j in ipairs(Frames) do j:RegisterEvent("ZONE_CHANGED_NEW_AREA"); end

I wouldn't suggest doing this very often as it creates a new table each time it's run.
For the sake of simplicity, I didn't include a table recycling function to use in such case.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 04-24-14 at 05:41 PM.
  Reply With Quote