From 8be3d7df3a6b5b5fb20be9f209ab6cde8f9a02a2 Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Tue, 28 Oct 2025 19:43:39 -0400 Subject: [PATCH] fix some tooltip errors --- Core.lua | 8 -------- Extensions/Tooltip/Generic.lua | 7 ------- 2 files changed, 15 deletions(-) diff --git a/Core.lua b/Core.lua index 2f1c995..893f682 100644 --- a/Core.lua +++ b/Core.lua @@ -738,13 +738,11 @@ function CleveRoids.ParseMacro(name) local macroID = GetMacroIndexByName(name) - -- Try Blizzard macro first (macroID may be nil/0 if not found on 1.12) local _, texture, body if macroID and macroID ~= 0 then _, texture, body = GetMacroInfo(macroID) end - -- Fallback: SuperMacro "Super" tab if (not body) and GetSuperMacroInfo then _, texture, body = GetSuperMacroInfo(name) end @@ -782,7 +780,6 @@ function CleveRoids.ParseMacro(name) -- #showtooltip and item/spell/macro specified, only use this tooltip if st and tt ~= "" then - showTooltipHasArg = true for _, arg in ipairs(CleveRoids.splitStringIgnoringQuotes(tt)) do macro.actions.tooltip = CleveRoids.CreateActionInfo(arg) local action = CleveRoids.CreateActionInfo(CleveRoids.GetParsedMsg(arg)) @@ -809,11 +806,6 @@ function CleveRoids.ParseMacro(name) action.args = arg action.isReactive = CleveRoids.reactiveSpells[action.action] table.insert(macro.actions.list, action) - - -- NEW FIX: If #showtooltip with no args, use first action as tooltip - if hasShowTooltip and not showTooltipHasArg and not macro.actions.tooltip then - macro.actions.tooltip = action - end end end end diff --git a/Extensions/Tooltip/Generic.lua b/Extensions/Tooltip/Generic.lua index 2b68241..426d607 100644 --- a/Extensions/Tooltip/Generic.lua +++ b/Extensions/Tooltip/Generic.lua @@ -136,7 +136,6 @@ function CleveRoids.IndexItems() slotsIndex = 1, } items[itemID] = name - -- ADDED: Also index by lowercase name for case-insensitive lookup items[string.lower(name)] = name else items[name].count = (items[name].count or 0) + (count or 0) @@ -164,7 +163,6 @@ function CleveRoids.IndexItems() link = link, } items[itemID] = name - -- ADDED: Also index by lowercase name for case-insensitive lookup items[string.lower(name)] = name else items[name].inventoryID = inventoryID @@ -253,10 +251,8 @@ end function CleveRoids.GetItem(text) if not text or text == "" then return end - -- IMPROVED: Try exact match first, then lowercase match local item = CleveRoids.Items[text] or CleveRoids.Items[tostring(text)] if not item then - -- Try lowercase lookup local lowerText = string.lower(text) local canonicalName = CleveRoids.Items[lowerText] if canonicalName and type(canonicalName) == "string" then @@ -293,7 +289,6 @@ function CleveRoids.GetItem(text) } if name then CleveRoids.Items[name] = it - -- ADDED: Also cache by lowercase CleveRoids.Items[string.lower(name)] = name end if itemID then CleveRoids.Items[itemID] = name end @@ -330,7 +325,6 @@ function CleveRoids.GetItem(text) } if name then CleveRoids.Items[name] = it - -- ADDED: Also cache by lowercase CleveRoids.Items[string.lower(name)] = name end if itemID then CleveRoids.Items[itemID] = name end @@ -396,7 +390,6 @@ function CleveRoids.GetItem(text) if not name then return end local fallback = { id = text, name = name, link = link, texture = texture } CleveRoids.Items[name] = fallback - -- ADDED: Also cache by lowercase CleveRoids.Items[string.lower(name)] = name return fallback end