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

Fire Multiple Levelled Up Events #39

Merged
merged 3 commits into from
Aug 31, 2023
Merged

Fire Multiple Levelled Up Events #39

merged 3 commits into from
Aug 31, 2023

Conversation

cjmellor
Copy link
Owner

Updated to appropriately fire events for each level gained and not just the final level. Removed the direct update of the user's level within the levelUp method and instead implemented a function to calculate and update to the highest possible level based on a user's current points. This ensures that levelling up and firing of events occur for each level achieved, rather than skipping to the final level.

Further fixes #36

Updated the level-up system to appropriately fire events for each level gained and not just the final level. Removed the direct update of the user's level within the levelUp method and instead implemented a function to calculate and update to the highest possible level based on a user's current points. This ensures that levelling up and firing of events occur for each level achieved, rather than skipping to the final level. Additionally, methods within the GiveExperience.php file were rearranged for better readability and maintenance.
@cjmellor cjmellor added the bug Something isn't working label Aug 30, 2023
@cjmellor cjmellor self-assigned this Aug 30, 2023
@cjmellor cjmellor merged commit d04f99b into main Aug 31, 2023
6 checks passed
@cjmellor cjmellor deleted the dispatch-multiple-events branch August 31, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Event fired only once even when user has points for multiple levels
1 participant