Skip to content

Read teleport fares and champion level gates from the teleporter rows - #3895

Merged
erwan-joly merged 1 commit into
masterfrom
claude/project-thread-tn1s5o
Nov 29, 2026
Merged

erwan-joly merged 1 commit into
masterfrom
claude/project-thread-tn1s5o

Conversation

@erwan-joly

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

Copy link
Copy Markdown
Collaborator

Requested by Erwan · project thread

What

Every teleport menu handler hardcoded what its trip costs: 1 000 gold per option for the town teleporter, 5 000 per option in Act V, 500 for the wedding gazebo, 25 000 for two champion area NPCs picked by dialog id, a Rune Piece (5919) for the Grenigas Temple trip, and champion level 1 / 60 gates. That is game data in server logic.

  • Teleporter gets three columns: Fare, FareItemVNum (one used per trip) and MinimumHeroLevel.
  • TeleporterFares in NosCore.Parser holds the table; TeleporterParser writes it on every row and updates a stored row in place when its fare differs, so a rerun on a filled database fills the new columns and changes nothing else.
  • NpcTeleportHandler reads the row: champion level (silent without any champion level, ChampionLevelRequirement otherwise, as before), fare item, gold. The per-handler Cost and MayTravelAsync overrides are gone; MoveToMapHandler is now just its runner.

Behaviour is unchanged.

Tests

  • Parser: fare on a captured row, a stored row taking its fare in place on rerun, the fare table and the champion level table.
  • Handlers: the existing teleporter and champion area specs now feed the fare through the row; all 145 Nrun tests pass, Parser.Tests 501/501, Database.Tests (migration check) 16/16.

Manual checks (added to documentation/manual-test-plan.md)

  • Rerun the parser on a filled database: the NosVille town teleporter takes 1 000 / 2 000 gold for its second / third destination
  • Serizad's Grenigas Temple trip uses one Rune Piece and says so; without one the player stays
  • The champion tower ignores a player without champion level; the volunteers' guard asks for level 60 and 25 000 gold

Client check

The NosVille town teleporter (MapNpc 1904) was copied next to Tester on Chicken Farm Path with its own Teleporter rows, and Tester has 10 000 gold. Master was parsed with master's parser. The branch ran after a parser rerun on that filled database, which gave the rows Fare 1 000 / 2 000. The scene then copied the rows. Both builds go through the same steps: Teleport, then To Western Krem (option 1).

master this branch
gold before
teleport menu
arrived, inventory open

Both builds land in Western Krem, and the gold goes from 10,000 to 9,000, so the fare now comes from the row unchanged.

The client's own menu labels these destinations "(Free)" while both builds charge 1 000 / 2 000. That predates this PR and is worth a separate look.


Generated by Claude Code

@erwan-joly erwan-joly self-assigned this Nov 29, 2026
@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 c402b6c and 8b67819.

Files ignored due to path filters: 1

  • src/NosCore.Database/Migrations/20261129121213_AddTeleporterFares.Designer.cs is excluded by !**/*.Designer.cs
Files selected for processing: 21

  • documentation/manual-test-plan.md
  • src/NosCore.Database/Entities/Teleporter.cs
  • src/NosCore.Database/Migrations/20261129121213_AddTeleporterFares.cs
  • src/NosCore.Database/Migrations/NosCoreContextModelSnapshot.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/ActVTeleporterHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/ForgottenArchipelagoTeleporterHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/GlacerusCaveTeleporterHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/GrenigasTempleTeleporterHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/MortazDesertReturnHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/MoveToMapHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/NextDimensionHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/NpcTeleportHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/ReturnFromGlacernonHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/TeleporterHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/TravelToMapHandler.cs
  • src/NosCore.GameObject/Messaging/Handlers/Nrun/WeddingGazeboTeleporterHandler.cs
  • src/NosCore.Parser/Parsers/TeleporterFares.cs
  • src/NosCore.Parser/Parsers/TeleporterParser.cs
  • test/NosCore.GameObject.Tests/Messaging/Handlers/Nrun/ChampionAreaTravelHandlerTests.cs
  • test/NosCore.GameObject.Tests/Messaging/Handlers/Nrun/TeleporterHandlerTests.cs
  • test/NosCore.Parser.Tests/TeleporterParserTests.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

Review: OK in substance. The fares follow the parser-table pattern and the parser updates rows in place. It conflicts on NosCoreContextModelSnapshot.cs, and AddTeleporterFares.Designer.cs was generated before #3857, so it still has the removed default_act3 respawn value. Rebase, delete the two AddTeleporterFares files, take master's snapshot, and run dotnet ef migrations add AddTeleporterFares. Several migration PRs are queued ahead of this one (#3864, #3865, #3855, #3867, #3875, #3880, #3870), so it may need regenerating again after those land.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn


Generated by Claude Code

Rebased on master and regenerated the AddTeleporterFares migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn
@erwan-joly
erwan-joly force-pushed the claude/project-thread-tn1s5o branch from d23f20b to 8b67819 Compare November 29, 2026 12:12
@erwan-joly
erwan-joly merged commit 42e04b3 into master Nov 29, 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.

1 participant