Skip to content

fix(drops): let a party member in a safezone pick up money - #1314

Merged
sven-n merged 2 commits into
MUnique:masterfrom
openmubr:pr/party-money-safezone
Oct 29, 2026
Merged

sven-n merged 2 commits into
MUnique:masterfrom
openmubr:pr/party-money-safezone

Conversation

@openmubr

Copy link
Copy Markdown
Contributor

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=true of this branch alone: no errors, no new warnings in the changed files.
  • dotnet test src/MUnique.OpenMU.sln -c Release -p:ci=true with this change: MUnique.OpenMU.Tests 2411 passed; the 3 failures are DiscordCommandsTest, which fail on master on Windows as well (line endings). All other test projects passed.
  • Running on our live server since 2026-10-18.

Note

Adds PickupItemAction.MaximumPickupDistance exactly like the offline pickup PR does, so both merge in any order.

🤖 Generated with Claude Code

@codacy-production

codacy-production Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 10 complexity · 0 duplication

Metric Results
Complexity 10
Duplication 0

View in Codacy

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.

sven-n commented Oct 26, 2026

Copy link
Copy Markdown
Member

Private code review — P2: invalid pickup packets can amplify information-level logs (src/GameLogic/PlayerActions/Items/PickupItemAction.cs, new logging around lines ~65–69 and ~88–117).

The money-sharing correction in DroppedMoney.cs appears sound: the picker is eligible even when standing in a safe zone, without making other idle party members eligible. However, the new GetLogLevel returns LogLevel.Information for ordinary players, including the default branch for nonexistent drop IDs. A connected client can repeatedly request an invalid drop ID, producing an information log entry for every packet, with no deduplication/rate limit. This is an avoidable log-volume and resource-amplification risk.

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.

openmubr and others added 2 commits October 28, 2026 19:31
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>
@openmubr
openmubr force-pushed the pr/party-money-safezone branch from 8146a74 to c605e76 Compare October 28, 2026 22:49
@openmubr

Copy link
Copy Markdown
Contributor Author

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.

@sven-n
sven-n merged commit f81b119 into MUnique:master Oct 29, 2026
1 check 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.

2 participants