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

#2142 makes Move Tutors edit your level #2275

Closed
eatthepear opened this issue Aug 30, 2022 · 6 comments · Fixed by #2282
Closed

#2142 makes Move Tutors edit your level #2275

eatthepear opened this issue Aug 30, 2022 · 6 comments · Fixed by #2282

Comments

@eatthepear
Copy link

Disclaimer: my game has a number of changes in both the move tutor code and the level up code, but after looking through the code, I think it is still a bug in rhh's code. Essentially, CB2_ReturnToPartyMenuWhileLearningMove contains SetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_LEVEL, &sFinalLevel); // to avoid displaying incorrect level
However, this line is reached when learning a new move tutor move, resulting in your Pokemon's level being set to whatever the last sFinalLevel was.

@gruxor
Copy link

gruxor commented Aug 30, 2022

Have you pulled changes since #2233 was merged?

If so, the changes most likely conflict with your existing changes. If not, then this bug (if it truly was caused by #2142) probably isn't an issue anymore, as #2233 reworked the entire system.

@eatthepear
Copy link
Author

Yep, I encountered this bug a couple hours ago when I pulled from RHH, and #2233 was already merged at the time. I just looked through that particular PR and found no mention of sFinalLevel, meaning I think the bug remains. I could be wrong, of course, but would love if someone has a vanilla save file to test it out.

@gruxor
Copy link

gruxor commented Aug 30, 2022

There isn't an sFinalLevel anywhere in the codebase, nor does CB2_ReturnToPartyMenuWhileLearningMove contain a SetMonData call as far as I can see.

Either this is an addition from elsewhere, or it's leftover from a previous version and was since removed.

@eatthepear
Copy link
Author

Are you sure you're looking at the right file? I'm looking at this file: https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/party_menu.c

@gruxor
Copy link

gruxor commented Aug 30, 2022

Whoops, looks like I was the one out of date.

Yeah, I see the code now - not sure why it was added. I'll do some poking around.

@AsparagusEduardo
Copy link
Collaborator

#2282

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 a pull request may close this issue.

3 participants