Skip to content

Commit

Permalink
[Baggins-Search]Update for C_Addons Change
Browse files Browse the repository at this point in the history
  • Loading branch information
doadin committed Jan 6, 2024
1 parent 2fe18f0 commit 5528ca9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Baggins-Search.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--luacheck: no max line length

local NumberofAddons = _G.GetNumAddOns()
local DisableAddOn = _G.DisableAddOn
local NumberofAddons = C_AddOns.GetNumAddOns()
local DisableAddOn = C_AddOns.DisableAddOn
StaticPopupDialogs["BAGGINS_SEARCH"] = { --luacheck: ignore 112
text = "Addon Baggins Search was found, however Baggins has search built-in, Would you like to disable Baggins Search?(requires reloadui, may need to disable manually)",
button1 = "Yes",
button2 = "No",
OnAccept = function()
for i=1,NumberofAddons do
local _, title, _, _, _, _, _ = GetAddOnInfo(i)
local _, title, _, _, _, _, _ = C_AddOns.GetAddOnInfo(i)
if title == "Baggins Search" or title == "Baggins_Search" then
DisableAddOn(i)
DisableAddOn(i)
Expand All @@ -24,7 +24,7 @@ StaticPopupDialogs["BAGGINS_SEARCH"] = { --luacheck: ignore 112

if NumberofAddons >= 1 then
for i=1,NumberofAddons do
local _, title, _, _, reason, _, _ = GetAddOnInfo(i)
local _, title, _, _, reason, _, _ = C_AddOns.GetAddOnInfo(i)
if title == "Baggins Search" or title == "Baggins_Search" then
if reason == nil or reason ~= "DISABLED" then
StaticPopup_Show("BAGGINS_SEARCH")
Expand Down

0 comments on commit 5528ca9

Please sign in to comment.