Repository navigation
Read teleport fares and champion level gates from the teleporter rows - #3895
Conversation
|
Warning Review limit reachedYou'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. View limit details
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. |
|
Review: OK in substance. The fares follow the parser-table pattern and the parser updates rows in place. It conflicts on 🤖 Generated with Claude Code https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014gSmkVYHFq6wdFRBtmzrW5
15a872c to
d23f20b
Compare
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
d23f20b to
8b67819
Compare
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.
Teleportergets three columns:Fare,FareItemVNum(one used per trip) andMinimumHeroLevel.TeleporterFaresinNosCore.Parserholds the table;TeleporterParserwrites 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.NpcTeleportHandlerreads the row: champion level (silent without any champion level,ChampionLevelRequirementotherwise, as before), fare item, gold. The per-handlerCostandMayTravelAsyncoverrides are gone;MoveToMapHandleris now just its runner.Behaviour is unchanged.
Tests
Manual checks (added to
documentation/manual-test-plan.md)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
Fare1 000 / 2 000. The scene then copied the rows. Both builds go through the same steps: Teleport, then To Western Krem (option 1).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