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

Fix party max vitals being set to 0 resulting in a divide by 0 issue. #201

Merged

Conversation

Cheshire92
Copy link
Contributor

Resolves #199

This fix checks to see if the player's max vital for health or mana is over 0 before doing any math to see how to resize the bar, much like it works on the EntityBox. If max vital is not over 0, just set the bar to display as full like it does on the EntityBox.

@Cheshire92 Cheshire92 changed the title Fix party vitals being set to 0 resulting in a divide by 0 issue. Fix party max vitals being set to 0 resulting in a divide by 0 issue. May 8, 2020
Why even bother with the else? Assume it's full by default.

I copied the code from the EntityBox a litttle too eagerly.
@jcsnider
Copy link
Contributor

jcsnider commented May 8, 2020

Thanks Joyce. Looks good.

@jcsnider jcsnider merged commit 423f268 into AscensionGameDev:master May 8, 2020
jcsnider added a commit that referenced this pull request May 9, 2020
…#201) (#203)

* Fix a divide by zero issue causing party vitals to crash the client when health or mana is set to 0.

* Minor clean-up.

Why even bother with the else? Assume it's full by default.

I copied the code from the EntityBox a litttle too eagerly.

Co-authored-by: Joyce <azurebeats@hotmail.nl>
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.

Getting Client Crash when in party and click Party Icon
3 participants