comparison ReAction.lua @ 43:dc898780fea8

handle profile resets
author Flick <flickerstreak@gmail.com>
date Thu, 03 Apr 2008 23:15:32 +0000
parents e0d8074a5bc7
children aa0b7fd68462
comparison
equal deleted inserted replaced
42:11ddb9610770 43:dc898780fea8
140 } 140 }
141 } 141 }
142 -- default profile is character-specific 142 -- default profile is character-specific
143 ) 143 )
144 self.db.RegisterCallback(self,"OnProfileChanged") 144 self.db.RegisterCallback(self,"OnProfileChanged")
145 self.db.RegisterCallback(self,"OnProfileReset","OnProfileChanged")
145 self.callbacks = LibStub("CallbackHandler-1.0"):New(self) 146 self.callbacks = LibStub("CallbackHandler-1.0"):New(self)
146 self:RegisterChatCommand("reaction", SlashHandler) 147 self:RegisterChatCommand("reaction", SlashHandler)
147 self:RegisterChatCommand("rxn", SlashHandler) 148 self:RegisterChatCommand("rxn", SlashHandler)
148 self:RegisterEvent("PLAYER_REGEN_DISABLED") 149 self:RegisterEvent("PLAYER_REGEN_DISABLED")
149 150
214 function ReAction:CallModuleMethod(modulename, method, ...) 215 function ReAction:CallModuleMethod(modulename, method, ...)
215 local m = self:GetModule(modulename,true) 216 local m = self:GetModule(modulename,true)
216 if not m then 217 if not m then
217 LoadAddOn(("ReAction_%s"):format(modulename)) 218 LoadAddOn(("ReAction_%s"):format(modulename))
218 m = self:GetModule(modulename,true) 219 m = self:GetModule(modulename,true)
220 if m then
221 dbprint(("succesfully loaded LOD module: %s"):format(modulename))
222 end
219 end 223 end
220 if m then 224 if m then
221 if type(m) == "table" and type(m[method]) == "function" then 225 if type(m) == "table" and type(m[method]) == "function" then
222 m[method](m,...) 226 m[method](m,...)
223 else 227 else