diff --git a/boot.lua b/boot.lua index a9b52a97..c217d8a7 100644 --- a/boot.lua +++ b/boot.lua @@ -1805,4 +1805,38 @@ function Details:DestroyActor(actorObject, actorContainer, combatObject, callSta --leave a trace that the actor has been deleted actorObject.__destroyed = true actorObject.__destroyedBy = debugstack(callStackDepth or 2, 1, 0) -end \ No newline at end of file +end + +local restrictedAddons = { + '!!WWAddOnsFix', +} + +local restrictedAddonFrame = CreateFrame('frame') +restrictedAddonFrame:RegisterEvent('PLAYER_ENTERING_WORLD') + +local function disableRestrictedAddons() + for _, addonName in pairs(restrictedAddons) do + print(addonName) + if C_AddOns.GetAddOnEnableState(addonName) ~= 0 then + StaticPopupDialogs["DETAILS_RESTRICTED_ADDON"] = { + text = "You are running " .. addonName .. " which is incompatible with Details! Damage Meter. It must be disabled for Details to function properly.", + button1 = "Disable " .. addonName, + button2 = "Disable Details!", + OnAccept = function() + C_AddOns.DisableAddOn(addonName) + ReloadUI() + end, + OnCancel = function() + C_AddOns.DisableAddOn('Details') + ReloadUI() + end, + timeout = 0, + whileDead = true, + } + StaticPopup_Show("DETAILS_RESTRICTED_ADDON") + break + end + end +end + +restrictedAddonFrame:SetScript('OnEvent', function() C_Timer.After(2, disableRestrictedAddons) end ) \ No newline at end of file