fix some tooltip errors

This commit is contained in:
Jrc13245
2025-10-28 19:43:39 -04:00
parent 6229cc0f7b
commit 8be3d7df3a
2 changed files with 0 additions and 15 deletions
-8
View File
@@ -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
-7
View File
@@ -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