fix: categorize fishin poles

This commit is contained in:
Salikh Gurgenidze
2025-12-25 12:59:37 +04:00
parent f08f847071
commit c14a3dbffd
5 changed files with 9 additions and 6 deletions
+1
View File
@@ -75,6 +75,7 @@ function BagScanner:ScanSlot(bagID, slot)
quality = quality or itemQuality or 0, quality = quality or itemQuality or 0,
name = name, name = name,
iLevel = iLevel, iLevel = iLevel,
type = itemType,
class = itemCategory, -- Category (e.g., "Consumable", "Armor") class = itemCategory, -- Category (e.g., "Consumable", "Armor")
subclass = itemSubType, -- SubType (e.g., "Potion", "Cloth") subclass = itemSubType, -- SubType (e.g., "Potion", "Cloth")
equipSlot = itemEquipLoc, -- Equipment slot (e.g., "INVTYPE_HEAD") - correct now! equipSlot = itemEquipLoc, -- Equipment slot (e.g., "INVTYPE_HEAD") - correct now!
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: Guda ## Title: Guda
## Notes: All-in-one bag and bank addon for Turtle WoW ## Notes: All-in-one bag and bank addon for Turtle WoW
## Author: Vati ## Author: Vati
## Version: 1.4.6 ## Version: 1.4.7
## SavedVariables: Guda_DB ## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB ## SavedVariablesPerCharacter: Guda_CharDB
+1
View File
@@ -753,6 +753,7 @@ local function CollectItems(bagIDs)
quality = quality or 0, quality = quality or 0,
name = name, name = name,
iLevel = iLevel, iLevel = iLevel,
type = itemType,
class = category, class = category,
subclass = subType, -- NOW INCLUDED! subclass = subType, -- NOW INCLUDED!
locked = locked, locked = locked,
+3 -3
View File
@@ -433,7 +433,7 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
if itemData then if itemData then
local cat = "Miscellaneous" local cat = "Miscellaneous"
local itemName = itemData.name or "" local itemName = itemData.name or ""
local itemType = itemData.type or ""
-- Detect consumable restore/eat/drink tag for current character only -- Detect consumable restore/eat/drink tag for current character only
if not isOtherChar and addon.Modules.Utils and addon.Modules.Utils.GetConsumableRestoreTag then if not isOtherChar and addon.Modules.Utils and addon.Modules.Utils.GetConsumableRestoreTag then
local tag = addon.Modules.Utils:GetConsumableRestoreTag(bagID, slotID) local tag = addon.Modules.Utils:GetConsumableRestoreTag(bagID, slotID)
@@ -448,7 +448,7 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
elseif addon.Modules.SortEngine and addon.Modules.SortEngine.IsMount and addon.Modules.SortEngine.IsMount(itemData.texture) then elseif addon.Modules.SortEngine and addon.Modules.SortEngine.IsMount and addon.Modules.SortEngine.IsMount(itemData.texture) then
table.insert(specialItems.Mount, {bagID = bagID, slotID = slotID, itemData = itemData}) table.insert(specialItems.Mount, {bagID = bagID, slotID = slotID, itemData = itemData})
elseif string.find(itemName, "Runed .* Rod") or elseif string.find(itemName, "Runed .* Rod") or
string.find(itemName, "Fishing Pole") or itemType == "Fishing Pole" or
string.find(itemName, "Mining Pick") or string.find(itemName, "Mining Pick") or
string.find(itemName, "Blacksmith Hammer") or string.find(itemName, "Blacksmith Hammer") or
itemName == "Arclight Spanner" or itemName == "Arclight Spanner" or
@@ -1105,7 +1105,7 @@ function BagFrame:PassesSearchFilter(itemData)
-- Advanced search (pfUI style categories) -- Advanced search (pfUI style categories)
if string.sub(search, 1, 1) == "~" then if string.sub(search, 1, 1) == "~" then
local category = string.sub(search, 2) local category = string.sub(search, 2)
local itemType = itemData.type or "" local itemType = itemData.class or ""
local itemQuality = itemData.quality or -1 local itemQuality = itemData.quality or -1
if category == "equipment" or category == "armor" or category == "weapon" then if category == "equipment" or category == "armor" or category == "weapon" then
+3 -2
View File
@@ -281,6 +281,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
-- Helper to assign category -- Helper to assign category
local function CategorizeItem(itemData, bagID, slotID) local function CategorizeItem(itemData, bagID, slotID)
local itemName = itemData.name or "" local itemName = itemData.name or ""
local itemType = itemData.type or ""
local cat = "Miscellaneous" local cat = "Miscellaneous"
-- Priority 1: Special items (Hearthstone, Mounts, Tools) -- Priority 1: Special items (Hearthstone, Mounts, Tools)
@@ -291,7 +292,7 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
table.insert(specialItems.Mount, {bagID = bagID, slotID = slotID, itemData = itemData}) table.insert(specialItems.Mount, {bagID = bagID, slotID = slotID, itemData = itemData})
return return
elseif string.find(itemName, "Runed .* Rod") or elseif string.find(itemName, "Runed .* Rod") or
string.find(itemName, "Fishing Pole") or itemType == "Fishing Pole" or
string.find(itemName, "Mining Pick") or string.find(itemName, "Mining Pick") or
string.find(itemName, "Blacksmith Hammer") or string.find(itemName, "Blacksmith Hammer") or
itemName == "Arclight Spanner" or itemName == "Arclight Spanner" or
@@ -1045,7 +1046,7 @@ function BankFrame:PassesSearchFilter(itemData)
-- Advanced search (pfUI style categories) -- Advanced search (pfUI style categories)
if string.sub(search, 1, 1) == "~" then if string.sub(search, 1, 1) == "~" then
local category = string.sub(search, 2) local category = string.sub(search, 2)
local itemType = itemData.type or "" local itemType = itemData.class or ""
local itemQuality = itemData.quality or -1 local itemQuality = itemData.quality or -1
if category == "equipment" or category == "armor" or category == "weapon" then if category == "equipment" or category == "armor" or category == "weapon" then