Skip to content

Tell both players how much reputation a player kill moved - #3970

Merged
erwan-joly merged 3 commits into
masterfrom
claude/project-thread-h7fnr1
Nov 30, 2026
Merged

erwan-joly merged 3 commits into
masterfrom
claude/project-thread-h7fnr1

Conversation

@erwan-joly

Copy link
Copy Markdown
Collaborator

Requested by Erwan · project thread

Fixes #3969

What changes

A player kill outside an arena already moved level × 50 reputation from a victim with at least 50 000 to the killer, silently. Now:

  • the victim gets sayi "Reputation reduced: -N", with N = 0 when it had under 50 000 and kept everything;
  • the killer gets sayi "Reputation increased: +N" next to its fd refresh when it gained something.

Arena falls are unchanged (no reputation, no line).

Tests

PlayerRevivalHandlerTests: the two transfer specs now also check both chat lines, and that a spared victim gives the killer no line.

Manual test plan

Added "Reputation moved by a player kill" to documentation/manual-test-plan.md. Client screenshots will follow in a comment.


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 41 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 10bc056 and 594d401.

Files selected for processing: 3

  • documentation/manual-test-plan.md
  • src/NosCore.GameObject/Messaging/Handlers/Battle/PlayerRevivalHandler.cs
  • test/NosCore.GameObject.Tests/Messaging/Handlers/Battle/PlayerRevivalHandlerTests.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 after one fix. PlayerRevivalHandler.cs:127-129 duplicates PlayerBundleExtensions.SetReputationAsync and skips the in broadcast that refreshes the killer's reputation icon for others. Use await killer.SetReputationAsync(killer.Reputation + transfer);. Follow-up, not for this PR: the Level * 50 amount and the 50 000 threshold belong in NosCore.Algorithm.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn


Generated by Claude Code

@erwan-joly

Copy link
Copy Markdown
Collaborator Author

Client check, master (left) vs this branch (right)

Tester kills Buddy (level 10, 60 000 reputation) on Chicken Farm Path, with a local-only build where every map is PvP (not committed). Killer's chat: master shows nothing, the branch shows Reputation increased: +500.

killer

Buddy kills Tester (level 10, 60 000 reputation). Victim's chat: master only shows Dignity reduced: -10, the branch adds Reputation reduced: -500.

victim


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Review: MERGE

The earlier note is applied: the killer goes through SetReputationAsync, which also broadcasts in. I checked whether the victim's own fd is refreshed: PlayerRevivalHandler.cs:132 already sends it after the block, so nothing is missing. The tests read typed SayiPackets. The client text is Game18NConstString, the plan has three checks, and there is no !, BOM or provenance.

Fixed: nothing.

Left:

  • Only CodeRabbit has run on head 148cadc. Let CI run.
  • Follow-up, not for this PR: the Level * 50 amount and the 50 000 threshold (PlayerRevivalHandler.cs:122) belong in NosCore.Algorithm.

Screenshots: done. Killer and victim chat are posted, master next to the branch.

🤖 Generated with Claude Code


Generated by Claude Code

claude and others added 3 commits November 30, 2026 02:32
@erwan-joly
erwan-joly force-pushed the claude/project-thread-h7fnr1 branch from 148cadc to 594d401 Compare November 30, 2026 02:34
@erwan-joly
erwan-joly merged commit 1e6960d into master Nov 30, 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.

A player kill moves reputation without telling either player

2 participants