comparison modules/ReAction_State/ReAction_State.lua @ 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
comparison
equal deleted inserted replaced
65:5ea65ec7d162 66:44d3716aba8d
186 ReAction.RegisterCallback(self, "OnConfigModeChanged") 186 ReAction.RegisterCallback(self, "OnConfigModeChanged")
187 end 187 end
188 188
189 function module:PLAYER_AURAS_CHANGED() 189 function module:PLAYER_AURAS_CHANGED()
190 self:UnregisterEvent("PLAYER_AURAS_CHANGED") 190 self:UnregisterEvent("PLAYER_AURAS_CHANGED")
191 -- for some classes the number of stances is 0 until this event fires 191 -- on login the number of stances is 0 until this event fires during the init sequence.
192 InitRules() 192 -- however if you reload just the UI the number of stances is correct immediately
193 -- and this event won't fire until you gain/lose buffs/debuffs, at which point you might
194 -- be in combat.
195 if not InCombatLockdown() then
196 InitRules()
197 for name, bar in ReAction:IterateBars() do
198 self:OnRefreshBar("OnRefreshBar",bar,name)
199 end
200 end
193 end 201 end
194 202
195 function module:OnRefreshBar(event, bar, name) 203 function module:OnRefreshBar(event, bar, name)
196 local c = self.db.profile.bars[name] 204 local c = self.db.profile.bars[name]
197 if c then 205 if c then