A job-level gate says the job level, not the class - #2294
Conversation
The check is `JobLevel < LevelJobMinimum` and the answer was "you do not belong to the required class" - accusing the one thing that was fine. Reported from play as "NosCore will not let me wear an SP", with a reason pointing away from the cause: a Wild Keeper card needs job level 55, and a class change resets the job level to 1. The two messages were crossed. The class restriction is part of the combined level/sex/class gate further up, which sends CanNotWearThat; the job-level gate had the class message. Game18NConstString.CanNotBeWornLowJobLevel already existed and was unused. The sibling codebase answers "Your joblevel is too low!" on this same condition. The test asserts both halves: the job-level message is sent, and the class message is not. Being wrong here sends a real message on the right condition, so nothing raises - the player is just told the wrong reason.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. WalkthroughWearHandler now returns the low-job-level message for items rejected because the character's job level is too low. Tests verify the new message and confirm that the different-class message is absent. ChangesWear item job-level validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change corrects the message shown for insufficient job level and adds regression coverage for the affected behavior. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The check is
JobLevel < LevelJobMinimumand the answer wasCanNotBeWornDifferentClass— "you do not belong to the required class", accusing the one thing that was fine.The two messages are crossed. The class restriction is part of the combined level/sex/class gate further up, which sends
CanNotWearThat:Game18NConstString.CanNotBeWornLowJobLevelalready exists and was unused. OpenNos answersLOW_JOB_LVL("Your joblevel is too low!") on this same condition.Where it shows up in play: a Wild Keeper card needs job level 55, and a class change resets the job level to 1 — so the player is told they are the wrong class right after changing class, which is the most misleading moment possible.
The test asserts both halves: the job-level message is sent, and the class message is not. Being wrong here sends a real message on the right condition, so nothing raises — the player is just told the wrong reason.
Summary by CodeRabbit
Bug Fixes
Tests