diff --git a/UI/BankFrame.lua b/UI/BankFrame.lua index 1b955c8..f29dd8b 100644 --- a/UI/BankFrame.lua +++ b/UI/BankFrame.lua @@ -421,7 +421,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName) button:Show() local matchesFilter = self:PassesSearchFilter(itemData) - Guda_ItemButton_SetItem(button, bagID, slot, itemData, true, isOtherChar and charName or nil, matchesFilter, true) + Guda_ItemButton_SetItem(button, bagID, slot, itemData, true, isOtherChar and charName or nil, matchesFilter, isOtherChar or isReadOnlyMode) button.inUse = true col = col + 1 @@ -539,7 +539,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName) button:ClearAllPoints() button:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", x + currentBottomX + (sCol * (buttonSize + spacing)), itemY - (sRow * (buttonSize + spacing))) button:Show() - Guda_ItemButton_SetItem(button, item.bagID, item.slotID, item.itemData, true, isOtherChar and charName or nil, self:PassesSearchFilter(item.itemData), true) + Guda_ItemButton_SetItem(button, item.bagID, item.slotID, item.itemData, true, isOtherChar and charName or nil, self:PassesSearchFilter(item.itemData), isOtherChar or isReadOnlyMode) button.inUse = true sCol = sCol + 1 diff --git a/UI/ItemButton.lua b/UI/ItemButton.lua index 51dc495..fcbd304 100644 --- a/UI/ItemButton.lua +++ b/UI/ItemButton.lua @@ -10,11 +10,19 @@ scanTooltip:SetOwner(WorldFrame, "ANCHOR_NONE") -- Check if an item is a quest item by scanning its tooltip -- Check if an item is a quest item by scanning its tooltip and determine type -local function IsQuestItem(bagID, slotID) +local function IsQuestItem(bagID, slotID, isBank) if not bagID or not slotID then return false end scanTooltip:ClearLines() - scanTooltip:SetBagItem(bagID, slotID) + if isBank and bagID == -1 then + if scanTooltip.SetInventoryItem then + scanTooltip:SetInventoryItem("player", 39 + slotID) + else + scanTooltip:SetBagItem(bagID, slotID) + end + else + scanTooltip:SetBagItem(bagID, slotID) + end local isQuestItem = false local isQuestStarter = false @@ -338,7 +346,7 @@ function Guda_ItemButton_OnLoad(self) if link and addon and addon.Modules and addon.Modules.Utils then local itemID = addon.Modules.Utils:ExtractItemID(link) if itemID then - local isQuest = IsQuestItem(this.bagID, this.slotID) + local isQuest = IsQuestItem(this.bagID, this.slotID, this.isBank) if isQuest and addon.Modules.QuestItemBar and addon.Modules.QuestItemBar.PinItem then addon.Modules.QuestItemBar:PinItem(itemID) return