Repository navigation
fix(drops): let a party member in a safezone pick up money - #1314
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 10 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Private code review — P2: invalid pickup packets can amplify information-level logs ( The money-sharing correction in Suggested fix: Log expected invalid/repeated pickup refusals at Debug, or rate-limit repeated identical refusals. Add a test verifying repeated invalid requests do not generate unbounded info-level logs. |
The safezone rule keeps party members idling in town out of the money split, but it excluded the picking player as well. With only that player having a share, or nobody else eligible, the money could never be picked up. The picking player is now always eligible. Pick up refusals are also logged with the reason and the player's server position (the client only gets a generic failure), bots and offline players at debug level because they retry often. Test: PartyMemberInSafezoneCanPickUpMoneyAsync (fails without the fix). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A connected client can send any number of pick up requests with invalid drop ids, each of which produced an information log entry. Now a player gets at most one refusal per 10 seconds logged as information; the others are logged for debugging. Adds tests for the log level selection. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
8146a74 to
c605e76
Compare
|
Addressed the log volume: refused pick ups are now logged as information at most once per 10 seconds per player; all further refusals are logged at debug level (offline players stay at debug). Added tests for the log level selection. |
Summary
The safezone rule keeps party members idling in town out of the money split, but it excluded the picking player
as well. With only that player having a share, or nobody else eligible, the money could never be picked up. The
picking player is now always eligible.
Pick up refusals are also logged with the reason and the player's server position (the client only gets a
generic failure), bots and offline players at debug level because they retry often.
Test: PartyMemberInSafezoneCanPickUpMoneyAsync (fails without the fix).
Testing
dotnet build src/MUnique.OpenMU.sln -c Release -p:ci=trueof this branch alone: no errors, no new warnings in the changed files.dotnet test src/MUnique.OpenMU.sln -c Release -p:ci=truewith this change:MUnique.OpenMU.Tests2411 passed; the 3 failures areDiscordCommandsTest, which fail onmasteron Windows as well (line endings). All other test projects passed.Note
Adds
PickupItemAction.MaximumPickupDistanceexactly like the offline pickup PR does, so both merge in any order.🤖 Generated with Claude Code