Repository navigation
feat(items): use figurines and charms inside the inventory - #1470
icheat2win wants to merge 14 commits into
Conversation
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. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 109 |
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: 79006ad10a
ℹ️ 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".
| /// <inheritdoc /> | ||
| protected override ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration) | ||
| { | ||
| new CashShopItems(context, gameConfiguration).CreateFigurinesAndCharms(); |
There was a problem hiding this comment.
Reconnect existing shop products to the new item definitions
On an existing Season 6 database with the client-script shop catalog, product sequences 459–462 were initialized with null ItemDefinition references because these items did not exist. This update creates the definitions but never reconnects those products, whereas fresh initialization does. CashShopProductDelivery.GetDelivery consequently continues rejecting them even if the operator enables permanent variants. Rule 4 of docs/CODING_RULES.md requires upgrades to “ensure the final state”; relink the known null catalog references idempotently and cover that pre-upgrade state in the repair test.
AGENTS.md reference: AGENTS.md:L16-L17
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27f7dfd029
ℹ️ 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".
| } | ||
| else | ||
| { | ||
| this.OnItemAddedToInventory(convertedItem ?? item); |
There was a problem hiding this comment.
Synchronize temporary pickups with the normalized use state
When a player picks up a GM-created charm, GameMasterItemFactory supplies a TemporaryItem with durability 1. This new call normalizes only its persistent copy to 255. DroppedItem.TryPickUpAsync copies only the slot back to the temporary item, and PickupItemAction.PickupItemAsync passes that original object to IItemAppearPlugIn, so the item-added packet contains durability 1 while the server's inventory contains 255. Normalize the source too, or serialize the inserted persistent item, so the pickup response carries the actual inventory-use state.
Useful? React with 👍 / 👎.
|
I think some of the values are not correct (https://muonlinefanz.com/guide/systems/cash-item-shop/#talisman). I will check it out more thoroughly and come back. |
|
Shots taken with S6E3 client. Hawk and Goat figurines/status add to Critical Damage and Excelent Damage chance, not bonus (tooltip incorrect/incomplete):
Oak Charm is correct. Golden Oak Charm adds 100 HP and 500 SD.
Maple Charm and Golden Maple Charm have no rendering. Maybe they were never released or later? MU Fanz don't have them listed either. But the values are correct.
|
sven-n
left a comment
There was a problem hiding this comment.
This PR conflicts with current master, so I can't merge it. Please rebase it onto master. These files conflict:
src/GameLogic/Properties/PlugInResources.Designer.cssrc/GameLogic/Properties/PlugInResources.resxsrc/Persistence/Initialization/Properties/ItemNames.Designer.cssrc/Persistence/Initialization/Properties/ItemNames.de.resxsrc/Persistence/Initialization/Properties/ItemNames.resxsrc/Persistence/Initialization/Properties/ItemNames.zh-CN.resxsrc/Persistence/Initialization/Properties/PlugInResources.Designer.cssrc/Persistence/Initialization/Properties/PlugInResources.de.resxsrc/Persistence/Initialization/Properties/PlugInResources.resxsrc/Persistence/Initialization/Properties/PlugInResources.zh-CN.resxtests/MUnique.OpenMU.Persistence.Initialization.Tests/ItemStatProfilesDataTest.cs
Most of them are resource files (.resx / .Designer.cs) which other merged PRs also extended. When you resolve them, keep the entries of both sides, and regenerate the designer file instead of merging it by hand. I'll review it in full once it's rebased.
Generated by Claude Code
27f7dfd to
807ef82
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 807ef8278c
ℹ️ 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".
| public override string Name => PlugInName; | ||
|
|
||
| /// <inheritdoc /> | ||
| public override string Description => PlugInDescription; |
There was a problem hiding this comment.
Localize the update's exposed name and description
In a German or Chinese admin-panel session, the configuration-updates page still displays this update in English: Updates.UpdateViewModel reads IConfigurationUpdatePlugIn.Name and Description directly, not the localized [Display] metadata. These overrides return English constants instead of the translated resource entries added by this commit. Rule 10, “No user-facing literals,” in docs/CODING_RULES.md requires localized plugin and admin-panel text; return the corresponding resource properties here as well.
AGENTS.md reference: AGENTS.md:L16-L17
Useful? React with 👍 / 👎.
sven-n
left a comment
There was a problem hiding this comment.
Thanks for the rebase. Using the items inside the inventory looks well thought out: the state lives in the durability (254/255), only one item of a kind is in use, and the use ends when the item leaves the inventory but not when it moves within it.
Unfortunately, #1504 was merged in the meantime and regenerated GameLogic/Properties/PlugInResources.Designer.cs, so this PR conflicts again (GameLogic/Properties/PlugInResources.*, PlayerMessage.*, GameServer/Properties/PlugInResources.*). Please rebase once more: keep the entries of both sides in the .resx files, then regenerate the designers.
While you're at it: the description says the Worn Horseshoe (13/134) is left out because there's no attribute for the item drop rate yet. #1459 is merged now and added Stats.BonusItemDropRate, so the horseshoe could be added, either here or in a follow-up.
(Your item PRs #1458, #1461, #1464, #1470 and #1471 all add to the same resource files, so each merge makes the others conflict again. I'll take whichever is ready first.)
Generated by Claude Code
807ef82 to
f9cd937
Compare
1330266 to
6e541fc
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e541fc7c3
ℹ️ 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 the rebase. #1461, #1464 and #1471 were merged since, so it conflicts once more, now only in src/GameServer/Properties/PlugInResources.resx and its Designer.cs. Please rebase again: keep both sides' entries, then regenerate the designer. That should be the last of the item-PR conflicts. The code itself is fine, and I'll merge it once it's clean and green.
Generated by Claude Code
6e541fc to
da00aa9
Compare
Adds the Hawk and Goat Figurines and the (Golden) Oak and Maple Charms (13/128-133) of issue MUnique#1339. A right click inside the inventory (BF 20) puts them in use, which is stored in the durability like in the original game (254 in use, 255 not in use). While in use, their power-ups apply. Only one item of the same kind can be in use, and the use ends when the item leaves the inventory. The Worn Horseshoe (13/134) is left out, because there's no attribute for the item drop rate yet. Rebased onto master: this is the change of the earlier commits in one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc76CH3CGWUp5r4XmXWK
da00aa9 to
2fedc3c
Compare
The Season 6 Episode 3 client shows +100 maximum health and +500 maximum SD for the Golden Oak Charm (13/132), and its ItemAddOption.bmd has the same values. 150 and 50 were the values of older clients. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc7AE8XpAUWL9Zc3G1Bv
|
Rebased onto current master (b49c96d) as asked; the conflicts are resolved and the branch merges cleanly. With this PR the default item stat profile count in ItemStatProfilesDataTest is 252. I also pushed 58a2f17: the Golden Oak Charm (13/132) now gives +100 maximum health and +500 maximum SD, as the Season 6 Episode 3 client shows and its ItemAddOption.bmd has. 150 and 50 were the values of older clients. |
|
@ze-dom thanks, you were right about the Golden Oak Charm. Fixed in 58a2f17: it now gives +100 maximum HP and +500 maximum SD. That's what the Season 6 Episode 3 client shows, and its ItemAddOption.bmd has the same values (150/50 were the older values; MuMain still shows those because @sven-n it's rebased on master and merges cleanly. |
|
@icheat2win , thanks. You didn't address the figurines/statues. Current GMO shop also backs the percent values: |
Address the review of the inventory charms: - The durability values which tell whether an item is in use (254, 255) are now part of the InventoryItemUseConfiguration, as the coding rules ask for configurable values. The power-up factory gets the in-use state from its caller instead of checking the durability itself. - Requesting the use of an item which is already in use keeps its power-ups. Recreating them lowered the current health, mana or shield. - An item which leaves the inventory loses its power-ups, even when it was removed from the configuration in the meantime. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
The new optional parameter of IItemPowerUpFactory.GetPowerUps keeps the method group from converting to a Func with two parameters. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
…mmit Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
sven-n
left a comment
There was a problem hiding this comment.
Thanks for the updates. The Golden Oak Charm now has 100 HP and 500 SD, and the in-use durability is configurable. @ze-dom's review has two points left, though, plus a new conflict:
1. Figurine bonuses (as @ze-dom pointed out with the S6E3 screenshots, the emu ItemAddOption, MU Fanz and the current Webzen shop): the Hawk and Goat figurines raise the critical / excellent damage chance, not a damage bonus. In CashShopItems.CreateFigurinesAndCharms (and the update plugin, which uses it):
Create(128, ..HawkFigurine.., 1, (Stats.CriticalDamageChance, 0.1f));
Create(129, ..GoatFigurine.., 1, (Stats.ExcellentDamageChance, 0.1f));The chance stats are fractions (e.g. the Scroll of Battle adds CriticalDamageChance 0.2f, the ancient sets 0.05f), so +10 % is 0.1f, not 10. Please adjust FigurinesAndCharmsDataTest accordingly.
2. Pairs which can't be used at the same time: @ze-dom also noted that the Hawk and Goat Figurines, the Oak and Golden Oak Charms, and (probably) the Maple and Golden Maple Charms are mutually exclusive. Right now only a second item with the same definition is refused (other.Definition == item.Definition in UseInventoryItemAction.SetItemInUseAsync and InventoryStorage.OnItemAddedToInventory), so e.g. a Hawk and a Goat can be in use together. A small "exclusive group" per entry in InventoryItemUseConfiguration (e.g. figurines = 1, oak charms = 2, maple charms = 3) would cover this and keep it configurable. Please use it in both places and add a test.
3. Rebase: it conflicts with master again (GameLogic/Properties/PlugInResources.resx and its designer). Also note that #1528 just set the default-profile count in ItemStatProfilesDataTest to 246, so please add your items' change on top of that value.
Generated by Claude Code
… chance The Hawk and Goat Figurines raise the chance of a critical or excellent hit by 10%, not the damage of such a hit. The chance attributes are fractions, so the bonus is 0.1. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
…ntory Only one of the Hawk and Goat Figurines, of the Oak and Golden Oak Charms and of the Maple and Golden Maple Charms can be in use at the same time. Each configured item has an exclusive group now (figurines 1, oak charms 2, maple charms 3 by default), which the use action and the inventory check besides the same definition. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 098c2a8951
ℹ️ 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".
| /// The figurines, the oak charms and the maple charms each form an exclusive group, | ||
| /// see <see cref="InventoryUsedItemIdentifier.ExclusiveGroup"/>. | ||
| /// </remarks> | ||
| public IList<InventoryUsedItemIdentifier> Items { get; set; } = CreateDefaultItems(); |
There was a problem hiding this comment.
Expose the item list through an editable aggregate collection
When an operator opens this feature's configuration in the admin panel, Items is silently omitted: ObjectCollectionFieldBuilder.CanBuildComponent requires ICollection<>, while ValueListFieldBuilder accepts only parsable value types, so neither handles IList<InventoryUsedItemIdentifier>. Consequently, the usable items and exclusive groups cannot be edited through the configuration dialog. Use an aggregate ICollection<InventoryUsedItemIdentifier> with the existing inline-editing annotations, or provide a matching builder. Rule 3 of docs/CODING_RULES.md explicitly expects plugin configuration values to be “editable in the admin panel.”
AGENTS.md reference: AGENTS.md:L16-L17
Useful? React with 👍 / 👎.
…arms # Conflicts: # src/GameLogic/ItemPowerUpFactory.cs # src/Persistence/Initialization/Properties/PlugInResources.Designer.cs # src/Persistence/Initialization/Properties/PlugInResources.de.resx # src/Persistence/Initialization/Properties/PlugInResources.resx # src/Persistence/Initialization/Properties/PlugInResources.zh-CN.resx
…n panel The items list was an IList, which the admin panel can't edit, so it couldn't be changed there. It's now an ICollection, which is edited inline. The settings and the fields of the items got localized captions and descriptions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
When a new charm or horseshoe was picked up, only the persistent copy in the inventory got the durability of an item which isn't in use. The pickup packet used the temporary item with the old durability, so the client showed another use state. The temporary item now gets the durability of the added item. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
The update returned English constants as its name and description, so the updates page showed English in other languages. It now returns the resource entries, like the other updates. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi






Adds the Hawk and Goat Figurines and the (Golden) Oak and Maple Charms (13/128-133) of issue #1339. A right click inside the inventory (BF 20) puts them in use, which is stored in the durability like in the original game (254 in use, 255 not in use). While in use, their power-ups apply. Only one item of the same kind can be in use, and the use ends when the item leaves the inventory.
The Worn Horseshoe (13/134) is left out, because there's no attribute for the item drop rate yet.
Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi