Skip to content

Commit

Permalink
Blanket switching to using actionID over spellID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicebar committed Jul 24, 2024
1 parent a4b5d89 commit 71c84e7
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions Shims.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,28 +157,19 @@ function SHIM:GetSpellBookItemInfo(index, bookType)
end

local itemType = "UNKNOWN"
local spellID

if info.itemType == Enum.SpellBookItemType.PetAction then
if info.itemType == Enum.SpellBookItemType.Spell then
itemType = "SPELL"
elseif info.itemType == Enum.SpellBookItemType.None then
itemType = "NONE"
elseif info.itemType == Enum.SpellBookItemType.Flyout then
itemType = "FLYOUT"
elseif info.itemType == Enum.SpellBookItemType.FutureSpell then
itemType = "FUTURESPELL"
elseif info.itemType == Enum.SpellBookItemType.PetAction then
itemType = "PETACTION"

-- For whatever reason spellBookItemInfo has a different key for spellIDs... 🤦‍♂️
spellID = info.actionID
else
spellID = info.spellID

if info.itemType == Enum.SpellBookItemType.Spell then
itemType = "SPELL"
elseif info.itemType == Enum.SpellBookItemType.None then
itemType = "NONE"
elseif info.itemType == Enum.SpellBookItemType.Flyout then
itemType = "FLYOUT"
elseif info.itemType == Enum.SpellBookItemType.FutureSpell then
itemType = "FUTURESPELL"
end
end

return itemType, spellID, info.isPassive
return itemType, info.actionID, info.isPassive
end

return GetSpellBookItemInfo(index, bookType)
Expand Down

0 comments on commit 71c84e7

Please sign in to comment.