Repository navigation
feat(items): add the worn horseshoe - #1534
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 19 |
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.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68cfa4bce7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e399ac5c72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0de5d8538c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
sven-n
left a comment
There was a problem hiding this comment.
Thanks for following up on the horseshoe. I reviewed the new commit ("feat(items): add the worn horseshoe"), and it looks good:
- The item is 1x1 with durability 1 and adds
BonusItemDropRate+0.2 (the client's "+20%"), which fits howDefaultDropGeneratorapplies the rate since #1459. InventoryItemUseConfigurationlists 13/134 without an exclusive group (0), so it can be used together with a figurine or a charm.AddWornHorseshoeUpdatePlugInis localized, depends on the seal and figurine updates, and only links products 463 while the shop uses the client's script. The packages stay off sale, which is right for time-limited products, and that makesIsMandatory = truefine here.
It can't be merged yet, though:
- It depends on #1470, which isn't merged. I'll re-review #1470 now: your updates there addressed ze-dom's points.
- Both conflict with
masterinGameLogic/Properties/PlugInResources.*andPersistence/Initialization/Properties/PlugInResources.*, because other PRs added texts. Please rebase #1470 ontomasterfirst, then this branch onto #1470. Keep both sides' entries and regenerate the designers. - When you rebase, please recheck the expected
"default: 253"inItemStatProfilesDataTestagainst the currentmaster, since other item PRs may have changed the count in the meantime.
Once #1470 is in and this branch is rebased, I'll run the tests and merge it.
Generated by Claude Code
sven-n
left a comment
There was a problem hiding this comment.
Request changes based on the existing, still-unresolved inline review findings at the current head:
- P1 — Cash-shop update ordering:
AddCashShopUpdatePlugIncan initialize the horseshoe before the seal-update prerequisite has createdBonusItemDropRate, aborting an existing-database update batch. Please declare the needed dependency on that update path and add an upgrade regression test. - P2 — Item-state synchronization: Newly picked-up or NPC-purchased inventory-use items can be serialized with durability
1before the server normalizes them to inactive255; client and server disagree. Please normalize before sending the corresponding packets.
This PR also builds on #1470, which has separate unresolved findings. I did not duplicate those existing inline comments.
sven-n
left a comment
There was a problem hiding this comment.
I checked the findings of the latest change request against the current head (53c13753), and they're addressed in the code. Only the review threads are still open:
- P1, cash-shop update ordering:
CashShopItems.CreateWornHorseshoe()now adds theBonusItemDropRateattribute when it's missing (53a6b63a), soAddCashShopUpdatePlugIncan no longer reach the horseshoe without its attribute, whatever order the updates run in. - P2, picked-up item state:
InventoryStoragecopies the normalized durability back to the temporary item (b7881e5e, from #1470). - P2, NPC purchase:
BuyNpcItemActionadds the item to the inventory before it sends the purchase (0b951310, with a test inBuyNpcItemActionTests).
What's left is the order: #1470 has to be rebased and merged first, then this branch rebased onto master. When you do that, please also recheck the expected default-profile count in ItemStatProfilesDataTest.
Generated by Claude Code
53c1375 to
d1a0f15
Compare
|
I rebased the two Worn Horseshoe commits onto the current head of #1470 and pushed I verified that the legacy cash-shop update can create the horseshoe when The solution build passed with no new warnings. All 24 targeted gameplay tests and 14 database initialization tests passed, including the Season 6 default-profile count of 253. This PR still depends on #1470 merging first. The earlier changes-requested review is still showing, so a re-review would be welcome once #1470 lands. |
sven-n
left a comment
There was a problem hiding this comment.
#1470 is merged, and this branch passed all tests on top of master, including Persistence.Initialization.Tests (980 passed), so the horseshoe itself is ready.
But because #1470 went in as a squash commit, GitHub now sees conflicts here: the branch still carries #1470's original commits. Your two horseshoe commits apply cleanly on top of the current master (I checked), so please move them over:
git fetch upstream
git rebase --onto upstream/master 717f5f87 feat/worn-horseshoe
git push --force-with-lease(717f5f87 is the last #1470 commit on this branch.) Then I'll merge it.
Generated by Claude Code
The Worn Horseshoe (13/134) is used inside the inventory like the figurines and charms. While it's in use, it adds 0.2 to the Bonus Item Drop Rate, which the client shows as "item drop rate increase 20 %". The update adds the item to existing databases and links its cash shop products; the packages stay not for sale because they're time-limited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xNc7AE8XpAUWL9Zc3G1Bv
The older cash shop update creates the worn horseshoe, too. On a database without the item drop rate attribute, which the update of the seals adds otherwise, its power-up had no attribute to target. CreateWornHorseshoe now adds the attribute when it's missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
d1a0f15 to
c674e66
Compare
|
Thanks for checking the horseshoe changes. After #1470 was squash-merged, I rebased the two horseshoe commits onto |
sven-n
left a comment
There was a problem hiding this comment.
Thanks for the rebase onto master: the horseshoe commits alone look good. I built it on master (before #1571) and ran the tests, including Persistence.Initialization.Tests (986 passed). The only failure was the known flaky AddedMapGroupIsAssignedToAllMaps.
Unfortunately, #1571 (Lord's Mix) was merged right before, so it conflicts again, only in src/Persistence/Initialization/Properties/PlugInResources.resx / .de / .zh-CN (both add update texts at the end). Please rebase and keep both sides' entries (and check that the designer contains both). Then I'll merge it.
Generated by Claude Code
# Conflicts: # src/Persistence/Initialization/Properties/PlugInResources.de.resx # src/Persistence/Initialization/Properties/PlugInResources.resx # src/Persistence/Initialization/Properties/PlugInResources.zh-CN.resx
|
Thanks for resolving the conflicts. I built the rebased branch on current master and ran the tests again, including Generated by Claude Code |
What it does
Adds the Worn Horseshoe (13/134). Like the figurines and charms of #1470, it's used inside the inventory with a right click. While it's in use, it adds 0.2 to Stats.BonusItemDropRate (added by #1459 for the seals), so monsters roll their item drops with a rate of 1.2.
The value comes from the client: MuMain shows "Item drop rate increase +20%" for ITEM_HELPER + 134 in its item tooltip (ZzzInventory.cpp), and the client already lists 13/134 as an item used inside the inventory (IsInvenItem). The default configuration of the Items used inside the inventory feature plugin already contains 13/134, so no game logic changes are needed.
Changes
CashShopItems.CreateWornHorseshoe() creates the item (1x1, durability 1, power-up BonusItemDropRate +0.2 as internal const).
New mandatory update Add the worn horseshoe: adds the item to existing Season 6 databases and links the cash shop products 463 (packages 356/357). The packages stay not for sale, because their products are time-limited. It depends on AddSealItemDropRateUpdatePlugIn (the attribute) and AddFigurinesAndCharmsUpdatePlugIn.
Name and update texts in en/de/zh-CN.
Docs: server-features/inventory-charms.md lists the horseshoe and drops the "not added yet" note.
Tests
WornHorseshoeDataTest: fresh database, update on an existing database (applied twice), cash shop product linking.
UseInventoryItemActionTest.WornHorseshoeIncreasesItemDropRateWhileInUseAsync.
ItemStatProfilesDataTest: "default: 253".
Ran locally: dotnet test on MUnique.OpenMU.Persistence.Initialization.Tests (WornHorseshoe, FigurinesAndCharms, ItemStatProfilesDataTest, CashShopUpdateTest: 35 passed) and MUnique.OpenMU.Tests (UseInventoryItemActionTest: 9 passed).