From 06054a8eadc9782caca0a2f6f8e1512dbc08ad17 Mon Sep 17 00:00:00 2001 From: mBlinkii Date: Wed, 16 Nov 2022 18:24:42 +0100 Subject: [PATCH 01/13] fix for Dropdonw Macro Button --- core/mDropdown.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mDropdown.lua b/core/mDropdown.lua index 1af4cfcd..32b630f8 100644 --- a/core/mDropdown.lua +++ b/core/mDropdown.lua @@ -82,8 +82,8 @@ function mMT:mDropDown(list, frame, menuparent, ButtonWidth, HideDelay) if not frame.buttons[i] then if list[i].macro then frame.buttons[i] = CreateFrame("Button", "MacroButton", frame, "SecureActionButtonTemplate") - frame.buttons[i]:SetAttribute("type*", "macro") - --frame.buttons[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp") + frame.buttons[i]:SetAttribute("type", "macro") + frame.buttons[i]:RegisterForClicks("LeftButtonUp", "LeftButtonDown") frame.buttons[i]:SetAttribute("macrotext1", list[i].macro) else frame.buttons[i] = CreateFrame("Button", nil, frame) From 61f052f768aff68d90f0f21d8cb750c133ec0b55 Mon Sep 17 00:00:00 2001 From: mBlinkii Date: Wed, 16 Nov 2022 18:47:51 +0100 Subject: [PATCH 02/13] FIX for Dropdown Macro Buttons --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index f1bc8e71..87f5dbc7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ - UPDATE Dropdpwn Text Update Bugfix - UPDATE Temporary disabled the tooltip icons for Retail - FIX Healthmarker Option, custom raneg is disabeld if Auto range is enabled +- FIX for Dropdown Macro Buttons ### Added - NEW Statusbar Texture K31 From 0035a1b936298b4698571054d51e935ef5578ad3 Mon Sep 17 00:00:00 2001 From: mBlinkii Date: Thu, 17 Nov 2022 18:43:38 +0100 Subject: [PATCH 03/13] bugfix keys to chat --- misc/mKeystoneToChat.lua | 15 +++++++++------ misc/mTipIcon.lua | 4 +++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/misc/mKeystoneToChat.lua b/misc/mKeystoneToChat.lua index a1248261..4e816afb 100644 --- a/misc/mKeystoneToChat.lua +++ b/misc/mKeystoneToChat.lua @@ -29,15 +29,17 @@ local function mCheckText(text) end end -local function mGetKey() +local function mGetKeyLink() local mKeys = {} for bag = 0, NUM_BAG_SLOTS do local bSlots = GetContainerNumSlots(bag) for slot = 1, bSlots do - local itemLink, _, _, itemID = select(7, GetContainerItemInfo(bag, slot)) - -- 180653 = SL/ 187786 = Legion - if itemID == 180653 or itemID == 187786 then - mKeys[itemID] = itemLink + local containerInfo = GetContainerItemInfo(bag, slot) + if containerInfo then + -- 180653 = SL/ 187786 = Legion + if containerInfo.itemID == 180653 or containerInfo.itemID == 187786 then + mKeys[containerInfo.itemID] = containerInfo.hyperlink + end end end end @@ -57,7 +59,7 @@ local function OnEvent(self, event, ...) channel = "RAID" end - local myKeys = mGetKey() + local myKeys = mGetKeyLink() if myKeys then local link = nil -- 180653 = SL/ 187786 = Legion @@ -68,6 +70,7 @@ local function OnEvent(self, event, ...) else link = myKeys[187786] end + if link and channel then SendChatMessage(link, channel) end diff --git a/misc/mTipIcon.lua b/misc/mTipIcon.lua index 4ebada24..1d01b85a 100644 --- a/misc/mTipIcon.lua +++ b/misc/mTipIcon.lua @@ -19,7 +19,9 @@ local function AddTooltipIcon(self, icon) end local function hookTip(tip) - if tip then + if tip and E.Retail then + --TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Item, OnTooltipSetItem) + else tip:HookScript("OnTooltipSetItem", function(self, ...) local _, link = self:GetItem() local icon = link and GetItemIcon(link) From af67cf41e0417982ba9de2d8852a9a90940a37da Mon Sep 17 00:00:00 2001 From: mBlinkii Date: Thu, 17 Nov 2022 18:49:04 +0100 Subject: [PATCH 04/13] Fix Anima in Bags --- misc/CurrencyShadowlands/mAnima.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc/CurrencyShadowlands/mAnima.lua b/misc/CurrencyShadowlands/mAnima.lua index f8ed1eb1..539f7021 100644 --- a/misc/CurrencyShadowlands/mAnima.lua +++ b/misc/CurrencyShadowlands/mAnima.lua @@ -36,11 +36,12 @@ local function mBagCheck() for bagID = BACKPACK_CONTAINER, NUM_BAG_SLOTS do local slots = GetContainerNumSlots(bagID) for slot = 1, slots do - local itemID = select(10, GetContainerItemInfo(bagID, slot)) - local itemCount = select(2, GetContainerItemInfo(bagID, slot)) - local _, spellID = GetItemSpell(itemID) - if spellID and Animas[spellID] then - mAmount = mAmount + (Animas[spellID] * itemCount) + local containerInfo = GetContainerItemInfo(bagID, slot) + if containerInfo then + local _, spellID = GetItemSpell(containerInfo.itemID) + if spellID and Animas[spellID] then + mAmount = mAmount + (Animas[spellID] * containerInfo.stackCount) + end end end end From 15fdcafd1f00b476e94dc5e9b73e0e10d1685796 Mon Sep 17 00:00:00 2001 From: mBlinkii Date: Thu, 17 Nov 2022 18:53:55 +0100 Subject: [PATCH 05/13] Code cleanup Cataloged Research --- misc/CurrencyShadowlands/mCatalogedResearch.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/misc/CurrencyShadowlands/mCatalogedResearch.lua b/misc/CurrencyShadowlands/mCatalogedResearch.lua index 8149fb96..6af5c694 100644 --- a/misc/CurrencyShadowlands/mCatalogedResearch.lua +++ b/misc/CurrencyShadowlands/mCatalogedResearch.lua @@ -11,11 +11,7 @@ local strjoin = strjoin --WoW API / Variables local _G = _G -local GetContainerNumSlots = C_Container.GetContainerNumSlots -local GetContainerItemInfo = C_Container.GetContainerItemInfo -local GetItemSpell = GetItemSpell local C_CurrencyInfo = C_CurrencyInfo -local IsAddOnLoaded = IsAddOnLoaded --Variables local displayString, lastPanel = "", nil @@ -24,9 +20,7 @@ local mTextName = "mCatalogedResearch" local mCurrencyID = 1931 local hideCurrency = false -local function mBagCheck() - local mAmount = 0 - local mResearch = { +local mResearch = { [186685] = 1, [187322] = 8, [187457] = 8, @@ -56,7 +50,10 @@ local function mBagCheck() [187350] = 300, [187335] = 300, } + +local function mBagCheck() local mAmount = 0 + for itemID, mValue in pairs(mResearch) do local mCount = GetItemCount(itemID, true) mAmount = mAmount + mCount * mValue @@ -175,4 +172,4 @@ DT:RegisterDatatext( OnLeave, mText, ValueColorUpdate -) +) \ No newline at end of file From 0e0a843e9e05de5549a076dbb2d659019d39332c Mon Sep 17 00:00:00 2001 From: mBlinkii Date: Thu, 17 Nov 2022 19:59:29 +0100 Subject: [PATCH 06/13] Fixed Tooltip Icon for Retail --- .vscode/settings.json | 3 ++- core/mFunctions.lua | 2 +- misc/load_misc.xml | 2 +- misc/mTipIcon.lua | 39 +++++++++++++++++++++++++++++++-------- 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 74a0907b..65f105f8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -111,7 +111,8 @@ "GameTooltip", "GetContainerItemInfo", "GetContainerNumSlots", - "GetCursorPosition" + "GetCursorPosition", + "TooltipDataProcessor" ], "Lua.diagnostics.disable": [ "redundant-parameter", diff --git a/core/mFunctions.lua b/core/mFunctions.lua index cef13321..1a8e357f 100644 --- a/core/mFunctions.lua +++ b/core/mFunctions.lua @@ -40,7 +40,7 @@ function mMT:mMisc() mMT:mNamePlateBorderColor() end - if E.db[mPlugin].mTIcon and not E.Retail then + if E.db[mPlugin].mTIcon then mMT:TipIconSetup() end diff --git a/misc/load_misc.xml b/misc/load_misc.xml index 3cf7d292..d1e87293 100644 --- a/misc/load_misc.xml +++ b/misc/load_misc.xml @@ -18,7 +18,7 @@