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

Modified reloadModifiers() to wrap the content in a delayed task to fix a bug #345

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robertosu
Copy link

If a hit that should kill you with your normal health, let's say 100 damage, but you have 500 health from the plugin for example and with this hit you level up a skill, calling reloadModifiers() is bugged and kills you. If the damage is not lethal, the damage is also miscalculated and you are left with only 20hp.

A video showing the bug:

2025-01-02.00-41-43.mp4

The bug "patched":

2025-01-02.00-47-45.mp4

Modified reloadModifiers() to wrap the content in a delayed task and ensure the player's health after reload is the same as it was before reloadPlayer() was called.
Make sure that currentHealth does not exceed the new maxHealth in edge cases.
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.

1 participant