Skip to content

Commit

Permalink
#76: Add FindBaseSpell fallback option (#77)
Browse files Browse the repository at this point in the history
* #76: Add FindBaseSpell fallback option

* Update Myslot.lua

Co-authored-by: Boshi Lian <[email protected]>

---------

Co-authored-by: hewozuoai <[email protected]>
Co-authored-by: Boshi Lian <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2025
1 parent e778a71 commit 951dfc5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Myslot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,14 @@ function MySlot:RecoverData(msg, opt)
end
end

-- another fallback option - try to get base spell
if not GetCursorInfo() and FindBaseSpellByID then
local baseSpellId = FindBaseSpellByID(index)
if baseSpellId then
PickupSpell(baseSpellId)
end
end

if not GetCursorInfo() then
MySlot:Print(L["Ignore unlearned skill [id=%s], %s"]:format(index, GetSpellLink(index) or ""))
end
Expand Down

0 comments on commit 951dfc5

Please sign in to comment.