Skip to content

Make the Pet Trainer Bead take only 6-star pets - #3880

Merged
erwan-joly merged 1 commit into
masterfrom
fix/issue-3281
Dec 1, 2026
Merged

erwan-joly merged 1 commit into
masterfrom
fix/issue-3281

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #3281

What changes for the player

  • An empty Pet Trainer Bead (8570, 8581) refuses a pet below 6 stars with the client's "Cannot put NosMate in the bead." (CanNotPutNosmateInBead); the pet and the bead stay as they were. Its description reads "Can only contain 6-star pets."
  • The plain Pet Bead refuses a 6-star pet with the same message, as its description says "The bead cannot contain a 6-star pet."

No pet can reach 6 stars yet: pets start at 1 to 5 stars and evolution does not exist, so until it does the Trainer Bead refuses every pet. That matches the client, where only an evolved pet fits in it.

Changes

  • Item.HoldsOnlyTopStarPets: a new boolean column (migration AddPetTrainerBead, additive with a false default). Item.dat gives both beads the same box effect, so nothing else tells them apart.
  • PetTrainerBeads + PetTrainerBeadParser in NosCore.Parser set the column on 8570 and 8581; it updates rows in place, so re-running the parser is safe. Logged through the new PET_TRAINER_BEADS_PARSED key.
  • NosMateBeadHandler checks the pet's StarRating against the bead before asking or storing.

Keeping a pet's rating while it is inside a bead is #3875 and is not touched here.

Tests

  • NosMateBeadHandlerTests: 13 passed, 0 failed. New: a Trainer Bead refuses a 5-star pet, takes a 6-star pet, and a plain Pet Bead refuses a 6-star pet.
  • PetTrainerBeadParserTests (new): 2 passed, 0 failed.
  • NosCore.Database.Tests MigrationTests: 1 passed.
  • dotnet build NosCore.sln: 0 warnings, 0 errors.

Client check

Tester with a level 7 Chicken (pet 333) out, its StarRating set in the Mate table; the pet is selected and the bead double-clicked (the client asks "Use the item." first). The branch ran its own parser so 8570/8581 carry the new column. This branch includes the commits of the PRs it is stacked on.

  1. Master, 2-star pet, Pet Trainer Bead 8570: the server asks "Put the pet in the bead?"
    master: Put the pet in the bead? for a 2-star pet
  2. Master, after Confirm: "Pet is now in the bead."
    master: the 2-star pet is stored
  3. This branch, same 2-star pet: "Cannot put NosMate in the bead." and the pet stays out, with no question asked.
    branch: refusal for the 2-star pet
  4. This branch, the pet set to 6 stars: asked, confirmed, "Pet is now in the bead."
    branch: a 6-star pet is stored in the Pet Trainer Bead
  5. This branch, the plain Pet Bead 285 on the 6-star pet: "Cannot put NosMate in the bead."
    branch: the Pet Bead refuses the 6-star pet

Manual test plan

Added under "NosMate beads" in documentation/manual-test-plan.md (run the parser first):

  • Select a pet below 6 stars, double-click the Pet Trainer Bead ($CreateItem 8570) and confirm: "Cannot put NosMate in the bead." shows, the pet stays and the bead stays empty
  • Set a pet's "StarRating" to 6 in the "Mate" table, log in and use the Pet Trainer Bead on it: the pet goes into the bead as with a Pet Bead
  • Use the plain Pet Bead (285) on that 6-star pet: "Cannot put NosMate in the bead." shows and the pet stays


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

Next included review available in 8 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5dbff06 and 8e1606e.

Files ignored due to path filters: 1

  • src/NosCore.Database/Migrations/20261201094502_AddPetTrainerBead.Designer.cs is excluded by !**/*.Designer.cs
Files selected for processing: 12

  • documentation/manual-test-plan.md
  • src/NosCore.Data/Enumerations/I18N/LanguageKey.cs
  • src/NosCore.Data/Resource/LocalizedResources.resx
  • src/NosCore.Database/Entities/Item.cs
  • src/NosCore.Database/Migrations/20261201094502_AddPetTrainerBead.cs
  • src/NosCore.Database/Migrations/NosCoreContextModelSnapshot.cs
  • src/NosCore.GameObject/Messaging/Handlers/UseItem/NosMateBeadHandler.cs
  • src/NosCore.Parser/ImportFactory.cs
  • src/NosCore.Parser/Parsers/PetTrainerBeadParser.cs
  • src/NosCore.Parser/Parsers/PetTrainerBeads.cs
  • test/NosCore.GameObject.Tests/Messaging/Handlers/UseItem/NosMateBeadHandlerTests.cs
  • test/NosCore.Parser.Tests/PetTrainerBeadParserTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown
Collaborator Author

The red build check (job 141306586610) ran for 6f14c6f, an old commit of this branch that is no longer the head. The jobs it depends on were cancelled when the branch was pushed again, and the gate fails whenever it sees cancelled. The current head f8e1657 has not run CI yet. No code failure is involved, so no fix is pushed.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Review: MERGE-WITH-NOTE

Fixed: none needed in this PR's own commit (f8e1657). There is no source wording, no ! and no BOM. The refusal reuses the client's CanNotPutNosmateInBead, the bead list is a NosCore.Parser table written to the database, the parse log uses a LogLanguageKey resource, and the manual test plan has three checks.

  • Build: 0 warnings, 0 errors. NosMateBeadHandlerTests pass (in the 45/45 run) and PetTrainerBeadParserTests pass (in the 118/118 parser run).

Left

  • test/NosCore.Parser.Tests/PetTrainerBeadParserTests.cs:38: new PetTrainerBeadParser(...) is built by hand. Most parser tests do the same today, but the rule is World.Create<T>(). I did not change it here, because a commit in the middle of the stack would break Give the family bonuses that family quests award #3870's base.

Stack note: this branch also carries the commits of #3865, #3855 and #3867, which are still open. Their comments still name a source (CostumeMorphParser/InPacketAppearance comments, MapNpcParser/PortalParser/MapChangeService comments, the team blessing test plan line), and #3865's commit message says "the official server". Fix those in their own PRs before this stack merges. I did not touch them here, and no migration file was changed.

Screenshots: none. The refusal is visible to the player. Add "Cannot put NosMate in the bead." after using the Pet Trainer Bead (8570) on a 5-star pet, and the plain Pet Bead refusing a 6-star pet, on this branch, plus master accepting the 5-star pet into 8570.

🤖 Generated with Claude Code


Generated by Claude Code

erwan-joly pushed a commit that referenced this pull request Nov 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkVYHFq6wdFRBtmzrW5
Rebased on the migration stack and regenerated the AddPetTrainerBead migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn
@erwan-joly
erwan-joly merged commit 14da490 into master Dec 1, 2026
15 checks passed
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.

Pet Trainer Bead only takes 6-star pets

2 participants