-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly check for known spells in InUsableSpell() (#811)
* fix: properly check for known spells in InUsableSpell() Revert 86439eb and fix the underlying problem in a different way. That commit used the WoW IsUsableSpell() API function to determine whether a spell is known, but that returns false if the spell is genuinely not usable due to either cooldown or power requirements. Fix this in a better way by teaching SpellBook.ts:IsKnownSpell() to check for a spell being known to the player even if it's not in the spellbook by using the WoW IsSpellKnown() API function. While here, adjust IsUsableSpell() so that there is only a single exit point from the function to make the profiler stats work correctly.
- Loading branch information
1 parent
36bb313
commit 305c5bf
Showing
2 changed files
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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