Skip to content

Commit

Permalink
Login -> Disable Addon -> Log Out -> Log In -> Enable Addon
Browse files Browse the repository at this point in the history
  • Loading branch information
Nnoggie committed Sep 7, 2023
1 parent 5afef79 commit 57b8231
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ f:SetScript("OnEvent", function(self, event, ...)
if addon.db.enabled then
SetCVar("Sound_EnableSFX", 0)
end
for i = 1, GetNumAddOns() do
local name = GetAddOnInfo(i)
if name == addonName then
local enabled = GetAddOnEnableState(nil, i)
if enabled == 0 then
addon.db.installed = false
end
end
end
elseif event == "CHAT_MSG_PING" then
if addon.db.enabled and not isLoadingFinished then
addon:AddonPrint("Ping sounds will play after the loading process has finished.")
Expand Down

0 comments on commit 57b8231

Please sign in to comment.