changeset 66:44d3716aba8d

fixed init sequence on PLAYER_AURAS_CHANGED
author Flick <flickerstreak@gmail.com>
date Wed, 28 May 2008 17:41:29 +0000
parents 5ea65ec7d162
children 84721edaa749
files modules/ReAction_State/ReAction_State.lua
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/ReAction_State/ReAction_State.lua	Wed May 28 17:26:27 2008 +0000
+++ b/modules/ReAction_State/ReAction_State.lua	Wed May 28 17:41:29 2008 +0000
@@ -188,8 +188,16 @@
 
 function module:PLAYER_AURAS_CHANGED()
   self:UnregisterEvent("PLAYER_AURAS_CHANGED")
-  -- for some classes the number of stances is 0 until this event fires
-  InitRules()
+  -- on login the number of stances is 0 until this event fires during the init sequence.
+  -- however if you reload just the UI the number of stances is correct immediately
+  -- and this event won't fire until you gain/lose buffs/debuffs, at which point you might
+  -- be in combat.
+  if not InCombatLockdown() then
+    InitRules()
+    for name, bar in ReAction:IterateBars() do
+      self:OnRefreshBar("OnRefreshBar",bar,name)
+    end
+  end
 end
 
 function module:OnRefreshBar(event, bar, name)