remove debugs

This commit is contained in:
Salikh Gurgenidze
2026-01-23 23:41:28 +04:00
parent 1e7e6be311
commit 9305b46a85
3 changed files with 2 additions and 69 deletions
+2 -16
View File
@@ -735,28 +735,20 @@ end
-- Check if item has "Permanently..." text (enchanting scrolls/vellums)
-- These should NOT be considered quest items even if they have Quest category
local function IsPermanentEnchantItem(tooltip, tooltipName)
if not tooltip then
addon:Debug("IsPermanentEnchantItem: tooltip is nil")
return false
end
if not tooltip then return false end
local numLines = tooltip:NumLines() or 0
addon:Debug("IsPermanentEnchantItem: scanning %d lines", numLines)
for i = 1, numLines do
local line = getglobal(tooltipName .. "TextLeft" .. i)
if line then
local text = line:GetText()
if text then
local tl = string.lower(text)
addon:Debug("IsPermanentEnchantItem line %d: %s", i, tl)
-- Just check for "permanently" anywhere (green text doesn't have "Use:" prefix)
if string.find(tl, "permanently") then
addon:Debug("IsPermanentEnchantItem: FOUND permanently!")
return true
end
end
end
end
addon:Debug("IsPermanentEnchantItem: NOT found")
return false
end
@@ -802,23 +794,17 @@ function Utils:IsQuestItem(bagID, slotID, itemData, isOtherChar, isBank)
-- Priority 1: If explicitly categorized as Quest, check if it's actually an enchant item first
if isQuestCategory then
addon:Debug("IsQuestItem: Quest category detected, checking for permanent enchant...")
-- Check tooltip for "Permanently" (enchanting scrolls should not be quest items)
if not isOtherChar and bagID and slotID then
local tooltip = GetScanTooltip()
tooltip:ClearLines()
tooltip:SetBagItem(bagID, slotID)
local isPermanent = IsPermanentEnchantItem(tooltip, "GudaBagScanTooltip")
addon:Debug("IsQuestItem: IsPermanentEnchantItem returned %s", tostring(isPermanent))
if isPermanent then
if IsPermanentEnchantItem(tooltip, "GudaBagScanTooltip") then
return false, false -- Not a quest item, it's an enchant scroll
end
-- Also scan for quest starter text
local _, starterDetected = ScanTooltipForQuest(tooltip, "GudaBagScanTooltip")
return true, starterDetected
else
addon:Debug("IsQuestItem: Skipping permanent enchant check (otherChar=%s, bagID=%s, slotID=%s)",
tostring(isOtherChar), tostring(bagID), tostring(slotID))
end
return true, false
end