Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#76: Add FindBaseSpell fallback option #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not GetCursorInfo() then
if not GetCursorInfo() and FindBaseSpellByID then

work with client prior to 10.0

thanks, actually, i do not no this api, what i did, as you can see, is to create a CreateSpellOverrideMap

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to suggest the change above?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, let me know if it looks good to you

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh i see what you mean, lgtm ill give it a quick test today

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