Skip to content

A job-level gate says the job level, not the class - #2294

Open
denislauri1999 wants to merge 1 commit into
NosCoreIO:masterfrom
denislauri1999:pr/wear-job-level-message
Open

A job-level gate says the job level, not the class#2294
denislauri1999 wants to merge 1 commit into
NosCoreIO:masterfrom
denislauri1999:pr/wear-job-level-message

Conversation

@denislauri1999

Copy link
Copy Markdown
Contributor

The check is JobLevel < LevelJobMinimum and the answer was CanNotBeWornDifferentClass — "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:

if (item.LevelMinimum > ... || (item.Sex != 0 && ...) || (item.Class != 0 && ...))
{
    // -> CanNotWearThat
}
...
if (session.Character.JobLevel < item.LevelJobMinimum)
{
    // -> CanNotBeWornDifferentClass   <- here
}

Game18NConstString.CanNotBeWornLowJobLevel already exists and was unused. OpenNos answers LOW_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.

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.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 8 minutes.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: eb70f7ae-6f99-47e5-9870-8a5c70a03bcb

📥 Commits

Reviewing files that changed from the base of the PR and between 55dc38c and 231bf05.

📒 Files selected for processing (2)
  • src/NosCore.GameObject/Messaging/Handlers/UseItem/WearHandler.cs
  • test/NosCore.GameObject.Tests/Messaging/Handlers/UseItem/WearHandlerTests.cs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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