fix: usable weapons were marked as QuestItem

This commit is contained in:
Salikh Gurgenidze
2026-01-08 23:42:42 +04:00
parent 85389255cc
commit e7289cac06
5 changed files with 92 additions and 48 deletions
+15
View File
@@ -212,6 +212,21 @@ function Utils:IsQuestItemTooltip(bagID, slotID)
string.find(tl, "starts a quest") or
string.find(tl, "quest item") or
string.find(tl, "manual") then
-- Double check category to avoid misidentifying equipment with "Use:"
local link = GetContainerItemLink(bagID, slotID)
if link and self.ExtractItemID and self.GetItemInfoSafe then
local itemID = self:ExtractItemID(link)
if itemID then
local _, _, _, _, itemCategory, itemType = self:GetItemInfoSafe(itemID)
-- If it's Weapon or Armor, and NOT categorized as Quest, then it's not a Quest Item
if (itemCategory == "Weapon" or itemCategory == "Armor" or itemType == "Weapon" or itemType == "Armor") and
(itemCategory ~= "Quest" and itemType ~= "Quest") then
return false
end
end
end
return true
end
end