Fix job levels being reset when adding new jobs via >addjob#357
Closed
kenedos wants to merge 1 commit intoNoCode-NoLife:masterfrom
Closed
Fix job levels being reset when adding new jobs via >addjob#357kenedos wants to merge 1 commit intoNoCode-NoLife:masterfrom
kenedos wants to merge 1 commit intoNoCode-NoLife:masterfrom
Conversation
Member
|
Thanks for the PR, but I think this might've been fixed in a different way already. You're right that the level was calculated based on the job's total exp and the character's total rank, but that was actually a bug, and the jobs should never have used the total rank. Instead, they should've used their own rank, ie the rank they were added as. This caused issues with all types of rank and level requirements and was fixed a little while ago. I just tested your steps to reproduce this issue and it seems like it's working fine now. Perhaps you could try again as well, just to confirm that this is no longer an issue in the latest version of Melia. |
Member
|
I'll close this PR for now, assuming that the issue was indeed fixed. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue where existing job levels would be incorrectly reduced when adding a new job with the
>addjobcommand.Root Cause
The Job.Level property is dynamically calculated from TotalExp and the character's current rank (sum of all job
circles). When a new job is added, the rank increases, which changes the EXP curve - the same TotalExp value now
corresponds to a lower level at the higher rank.
Steps to reproduce (before this fix):
>joblevelup 14(Archer is now level 15)>addjob 3002(Hunter)>joblevelup 44(Hunter is now level 45)>addjob 3005(Sapper) - Hunter drops from level 45 to level 9 (not shown in client)>joblevelup 44(Sapper is now level 45)Fix
Before adding a new job, store the current levels of all existing jobs. After adding the job (which increases the
rank), recalculate TotalExp for each existing job to maintain their levels at the new rank.