From 5b0d33ed30eab9f0dad2cc990e6bc626e15c0823 Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Mon, 21 Nov 2022 12:21:49 -0800 Subject: [PATCH] Various bug fixes for Dragonflight (#759) This CL fixes the addon not loading for users and eliminates most errors so the Addon is usable. This CL does not add new features or support for the new bag type in Retail, yet. A set of more comprehensive updates will be released at a later date. * Fixed a nil value bug in ItemLevel.lua * Updated docmeta * Fixed bug that caused item borders not to update. * Updated config TOC --- .docmeta | 4 ++-- AdiBags_Config/AdiBags_Config.toc | 2 +- modules/ItemLevel.lua | 2 ++ widgets/ItemButton.lua | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.docmeta b/.docmeta index 94d9f7c0..450b1b22 100644 --- a/.docmeta +++ b/.docmeta @@ -1,4 +1,4 @@ - - type: textile - input-file: README.textile + type: markdown + input-file: README.md output-page: Main diff --git a/AdiBags_Config/AdiBags_Config.toc b/AdiBags_Config/AdiBags_Config.toc index 825072cf..f6d1f3bd 100644 --- a/AdiBags_Config/AdiBags_Config.toc +++ b/AdiBags_Config/AdiBags_Config.toc @@ -1,4 +1,4 @@ -## Interface: 100000 +## Interface: 100002 ## Title: AdiBags Configuration ## Notes: Adirelle's bag addon. diff --git a/modules/ItemLevel.lua b/modules/ItemLevel.lua index 17c501f0..648e645a 100644 --- a/modules/ItemLevel.lua +++ b/modules/ItemLevel.lua @@ -165,6 +165,7 @@ function mod:UpdateButton_Retail(event, button) and (quality ~= ITEM_QUALITY_POOR or not settings.ignoreJunk) and (loc ~= "" or not settings.equippableOnly) and (quality ~= ITEM_QUALITY_HEIRLOOM or not settings.ignoreHeirloom) + and colorSchemes[settings.colorScheme] ~= nil then color = {colorSchemes[settings.colorScheme](level, quality, reqLevel, (loc ~= ""))} shouldShow = true @@ -213,6 +214,7 @@ function mod:UpdateButton_Classic(event, button) if level >= settings.minLevel and (quality ~= LE_ITEM_QUALITY_POOR or not settings.ignoreJunk) and (loc ~= "" or not settings.equippableOnly) + and colorSchemes[settings.colorScheme] ~= nil then if SyLevel then if settings.useSyLevel then diff --git a/widgets/ItemButton.lua b/widgets/ItemButton.lua index c7b1d7ce..b009b81c 100644 --- a/widgets/ItemButton.lua +++ b/widgets/ItemButton.lua @@ -434,7 +434,7 @@ end -- Bugfix: This fixes a bug where hasItem might be set to 1 by -- some internal Blizzard code. local function hasItem(i) - return i and i ~= 1 + return i end function buttonProto:UpdateBorder(isolatedEvent)