Skip to content

Commit

Permalink
Stop logging when exiting desired map IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudbells committed Apr 16, 2021
1 parent 86fd198 commit 7617802
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions AutoLoggerClassic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local Y_SPACING = -25
local BUTTONS_PER_ROW = 3

-- Variables.
local hasInitialized = false -- true if init has been called.
local minimapIcon = LibStub("LibDBIcon-1.0")
local buttons = {}
local raids = {
Expand Down Expand Up @@ -157,9 +158,11 @@ function AutoLoggerClassic_OnEvent(self, event, ...)
elseif event == "RAID_INSTANCE_WELCOME" then
toggleLogging()
elseif event == "PLAYER_ENTERING_WORLD" then
init()
AutoLoggerClassicFrame:Hide()
if not hasInitialized then
init()
AutoLoggerClassicFrame:Hide()
hasInitialized = true
end
toggleLogging()
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end

0 comments on commit 7617802

Please sign in to comment.