fixed eventlisteners outside trials
René Welbers [01-26-16 - 13:36]
fixed eventlisteners outside trials
diff --git a/RaidNotifier.lua b/RaidNotifier.lua
index 73d7eaf..2c7ce75 100644
--- a/RaidNotifier.lua
+++ b/RaidNotifier.lua
@@ -5,7 +5,7 @@ RaidNotifier = RaidNotifier or {}
RaidNotifier.name = 'RaidNotifier'
RaidNotifier.slash = '/rn'
-RaidNotifier.version = '1.3.2'
+RaidNotifier.version = '1.3.3'
RaidNotifier.versionDB = 1
RaidNotifier.loaded = false
RaidNotifier.author = 'silentgecko'
@@ -221,6 +221,12 @@ function RaidNotifier.sanctumDebuffs(_, change, _, name, unit, _, _, _, _, _, _,
if (unit ~= 'player') then return end
local self = RaidNotifier
+ -- remove event listener, the api won't get it on zoning
+ if IsRaidInProgress() == false then
+ self.removeEventListeners()
+ return
+ end
+
local buffsDebuffs = self.BuffsDebuffs.sanctum_ophidia
-- only notice on effect added
@@ -284,6 +290,11 @@ function RaidNotifier.maelstromDebuffs(_, change, _, name, unit, _, _, _, _, _,
if (unit ~= 'player') then return end
local self = RaidNotifier
+ -- remove event listener, the api won't get it on zoning
+ if IsRaidInProgress() == false then
+ self.removeEventListeners()
+ return
+ end
local buffsDebuffs = self.BuffsDebuffs.maelstrom
-- only notice on effect added
@@ -321,6 +332,11 @@ function RaidNotifier.generalBuffFoodReminder(_, _, _, _, unit, _, _, _, _, _, _
if (unit ~= 'player') then return end
local self = RaidNotifier
+ -- remove event listener, the api won't get it on zoning
+ if IsRaidInProgress() == false then
+ self.removeEventListeners()
+ return
+ end
-- return if the player don't want the reminder
if self.savedVariables.general.buffFood_reminder == false then
diff --git a/RaidNotifier.txt b/RaidNotifier.txt
index ab8eef1..321a04c 100644
--- a/RaidNotifier.txt
+++ b/RaidNotifier.txt
@@ -1,7 +1,7 @@
## Title: |cEFEBBERaidNotifier|r
## Description: Displays on-screen notifications on different events during trials.
## Author: |c009ad6silentgecko|r
-## Version: 1.3.2
+## Version: 1.3.3
## APIVersion: 100013
## SavedVariables: RNVars
## OptionalDependsOn: LibAddonMenu-2.0