fixed event handling

René Welbers [01-20-16 - 22:50]
fixed event handling
Filename
RaidNotifier.lua
diff --git a/RaidNotifier.lua b/RaidNotifier.lua
index 8b99955..0393880 100644
--- a/RaidNotifier.lua
+++ b/RaidNotifier.lua
@@ -119,12 +119,12 @@ function RaidNotifier.addEventListeners()

     -- add general
     if raidId > 0 then
-        EVENT_MANAGER:RegisterForEvent(self.name, EVENT_EFFECT_CHANGED, self.generalBuffFoodReminder)
+        EVENT_MANAGER:RegisterForEvent(self.name .. "_BUFFFOOD", EVENT_EFFECT_CHANGED, self.generalBuffFoodReminder)
     end

     -- add sanctum
     if raidId == 3 then
-        EVENT_MANAGER:RegisterForEvent(self.name, EVENT_EFFECT_CHANGED, self.sanctumDebuffs)
+        EVENT_MANAGER:RegisterForEvent(self.name .. "_SANCTUM", EVENT_EFFECT_CHANGED, self.sanctumDebuffs)
     end
 end

@@ -133,7 +133,8 @@ function RaidNotifier.removeEventListeners()
     local self   = RaidNotifier
     local raidId = GetCurrentParticipatingRaidId()

-    EVENT_MANAGER:UnregisterForEvent(self.name, EVENT_EFFECT_CHANGED)
+    EVENT_MANAGER:UnregisterForEvent(self.name .. "_BUFFFOOD", EVENT_EFFECT_CHANGED)
+    EVENT_MANAGER:UnregisterForEvent(self.name .. "_SANCTUM", EVENT_EFFECT_CHANGED)
 end

 function RaidNotifier.sanctumDebuffs(_, change, buff, name, unit, start, finish, stack, icon, _, effectType, abilityType, statusEffectType, unitName, unitId, abilityId)