fix: bank view alt+click
This commit is contained in:
+2
-2
@@ -421,7 +421,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
|
|||||||
button:Show()
|
button:Show()
|
||||||
|
|
||||||
local matchesFilter = self:PassesSearchFilter(itemData)
|
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
|
button.inUse = true
|
||||||
|
|
||||||
col = col + 1
|
col = col + 1
|
||||||
@@ -539,7 +539,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
|
|||||||
button:ClearAllPoints()
|
button:ClearAllPoints()
|
||||||
button:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", x + currentBottomX + (sCol * (buttonSize + spacing)), itemY - (sRow * (buttonSize + spacing)))
|
button:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", x + currentBottomX + (sCol * (buttonSize + spacing)), itemY - (sRow * (buttonSize + spacing)))
|
||||||
button:Show()
|
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
|
button.inUse = true
|
||||||
|
|
||||||
sCol = sCol + 1
|
sCol = sCol + 1
|
||||||
|
|||||||
+11
-3
@@ -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
|
||||||
-- Check if an item is a quest item by scanning its tooltip and determine type
|
-- 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
|
if not bagID or not slotID then return false end
|
||||||
|
|
||||||
scanTooltip:ClearLines()
|
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 isQuestItem = false
|
||||||
local isQuestStarter = 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
|
if link and addon and addon.Modules and addon.Modules.Utils then
|
||||||
local itemID = addon.Modules.Utils:ExtractItemID(link)
|
local itemID = addon.Modules.Utils:ExtractItemID(link)
|
||||||
if itemID then
|
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
|
if isQuest and addon.Modules.QuestItemBar and addon.Modules.QuestItemBar.PinItem then
|
||||||
addon.Modules.QuestItemBar:PinItem(itemID)
|
addon.Modules.QuestItemBar:PinItem(itemID)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user