Skip to content

Commit

Permalink
Fix some buggy logic and bracket mess.
Browse files Browse the repository at this point in the history
  • Loading branch information
QartemisT committed Dec 22, 2023
1 parent 90b722c commit 6f61bf2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ACP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,15 @@ function ACP:IsAddonCompatibleWithCurrentIntefaceVersion(addon)
return true -- Get to the choppa!
end

local max_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""))) or
(GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX_ORG) .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""))
local slug = isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""
local max_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX .. slug)) or
(GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX_ORG .. slug))
if not max_supported then
max_supported = GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX) or GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MAX_ORG)
end

local min_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""))) or
(GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN_ORG) .. (isClassic and "-Classic" or isBCC and "-BCC" or isWrath and "-Wrath" or ""))
local min_supported = (GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN .. slug)) or
(GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN_ORG .. slug))
if not min_supported then
min_supported = GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN) or GetAddOnMetadata(addonnum, ACP.TAGS.INTERFACE_MIN_ORG)
end
Expand Down

0 comments on commit 6f61bf2

Please sign in to comment.