From b84835a567eb7e22978411e9a222b6e3856bcf6d Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 17 Jul 2026 21:25:25 -0500 Subject: [PATCH] Use GetInventoryItemID instead of string parsing --- Extensions/Tooltip/Generic.lua | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Extensions/Tooltip/Generic.lua b/Extensions/Tooltip/Generic.lua index ab0ef7b..556be71 100644 --- a/Extensions/Tooltip/Generic.lua +++ b/Extensions/Tooltip/Generic.lua @@ -747,20 +747,17 @@ function CleveRoids.FindItemQuick(text) for inv = 1, 19 do local link = GetInventoryItemLink("player", inv) if link then - local _, _, itemID = string_find(link, "item:(%d+)") - if itemID then - itemID = tonumber(itemID) - -- ID match: fast path - if qid and qid == itemID then + local itemID = GetInventoryItemID("player", inv) + -- ID match: fast path + if qid and qid == itemID then + return makeInventoryItem(inv, link, Items) + end + -- Name match: extract name from link (faster than GetItemInfo) + if qname then + local nm = GetNameFromLink(link) + if nm and string_lower(nm) == qname then return makeInventoryItem(inv, link, Items) end - -- Name match: extract name from link (faster than GetItemInfo) - if qname then - local nm = GetNameFromLink(link) - if nm and string_lower(nm) == qname then - return makeInventoryItem(inv, link, Items) - end - end end end end