use pfui swingtimer if SP not available, fix vanish regeant count

This commit is contained in:
Jrc13245
2026-02-27 07:59:05 -05:00
parent 836c0e0020
commit a50a5c7e7c
4 changed files with 111 additions and 87 deletions
+11 -2
View File
@@ -58,7 +58,7 @@ function CleveRoids.IndexSpells()
else
local cost, reagent = CleveRoids.GetSpellCost(i, bookType)
-- Fallback for known reagent spells if tooltip scan failed
if not reagent and CleveRoids.ReagentBySpell then
if (not reagent or reagent == "") and CleveRoids.ReagentBySpell then
reagent = CleveRoids.ReagentBySpell[spellName]
end
local texture = GetSpellTexture(i, bookType)
@@ -84,6 +84,10 @@ function CleveRoids.IndexSpells()
}
spells[bookType][spellName].highest = spells[bookType][spellName][spellRank]
end
-- For spells with no rank string, the base entry is the highest
if not spellRank and not spells[bookType][spellName].highest then
spells[bookType][spellName].highest = spells[bookType][spellName]
end
if reagent then
CleveRoids.countedItemTypes[reagent] = true
@@ -458,7 +462,12 @@ function CleveRoids.GetSpell(text)
for book, spells in CleveRoids.Spells do
if spells and spells[name] then
return spells[name][rank or "highest"]
local entry = spells[name][rank or "highest"]
if entry then return entry end
-- Fallback: for spells with no rank, return base entry
if not rank and spells[name].spellSlot then
return spells[name]
end
end
end
end