Core: Add compatibility shims for Spell and SpellBook functions - #88
Open
PatTheMav wants to merge 3 commits into
Open
Core: Add compatibility shims for Spell and SpellBook functions#88PatTheMav wants to merge 3 commits into
PatTheMav wants to merge 3 commits into
Conversation
Lua does not support mixing of function calls that return multiple values and logical expressions. The original call would have only ever yielded the "name" value, as all other return values would have been truncated.
PatTheMav
force-pushed
the
usablespell-fix-wow11
branch
2 times, most recently
from
September 29, 2024 12:09
ac19d38 to
1d28a12
Compare
PatTheMav
force-pushed
the
usablespell-fix-wow11
branch
from
September 29, 2024 12:17
1d28a12 to
9f6dd16
Compare
The IsUsableSpell method has been renamed to C_Spell.IsSpellUsable, the call and return signatures have not changed however, so a simple alias is sufficient.
PatTheMav
force-pushed
the
usablespell-fix-wow11
branch
from
September 30, 2024 11:10
9f6dd16 to
ea4b2c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many Spell- and SpellBook-related functions were deprecated in Dragonflight and removed in The War Within (as expected).
Those functions have been moved out of the global namespace and into the
C_SpellandC_SpellBooknamespaces respectively and have also been split up into specific functions interacting with spells or the spell book.Shims for the old functions thus need to use different function calls depending on the call signature (probably a reason why this was split up).
This will fix a whole lot of issues related with spell flyout menus, as
LibActionButtonis severely outdated and still uses the long-deprecated old global functions.Note
This is a band-aid over the fact that
LibActionButtonhas not been updated in years and should ideally replaced entirely.This PR is based on #86 and should be merged before this PR. A rebase-merge should eliminate the superfluous two commits automatically then.