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

Spells are usable only if they meet all of their power requirements #746

Merged
merged 3 commits into from Dec 17, 2020

Conversation

johnnylam88
Copy link
Contributor

These commits will cause a spell to not be suggested if their
power requirements cannot be met simply by waiting, e.g., chi,
holypower, combopoints, runicpower, etc.

This will cause most scripts to correctly fall through to other
spells which can be cast instead of suggesting a spell that is
waiting on resources.

The Blizzard API function GetPowerRegen() can return very small
numbers when the actual regeneration rate is zero. Treat very small
numbers to be equal to zero in getPowerRateAt().

Also, add some type signatures to getPowerRateAt() while we are
here.
Modify getTimeToPowerStateAt() to check every power type if one is
not specified, instead of just the primary resource type.

Fixes issue Sidoine#737.
@Sidoine Sidoine merged commit 18d7714 into Sidoine:master Dec 17, 2020
@johnnylam88 johnnylam88 deleted the bugfix/737 branch December 17, 2020 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants