Skip to content

feat(items): use figurines and charms inside the inventory - #1470

Open
icheat2win wants to merge 14 commits into
MUnique:masterfrom
icheat2win:feat/inventory-charms
Open

icheat2win wants to merge 14 commits into
MUnique:masterfrom
icheat2win:feat/inventory-charms

Conversation

@icheat2win

Copy link
Copy Markdown
Contributor

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T01:14:34.623270Z 430ec45 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codacy-production

codacy-production Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 109 complexity

Metric Results
Complexity 109

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread src/GameLogic/InventoryStorage.cs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/GameLogic/InventoryStorage.cs Resolved
}
else
{
this.OnItemAddedToInventory(convertedItem ?? item);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@ze-dom

ze-dom commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

@ze-dom

ze-dom commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Shots taken with S6E3 client.

Hawk and Goat figurines/status add to Critical Damage and Excelent Damage chance, not bonus (tooltip incorrect/incomplete):
emu: 1, 2, 3 | MU online Fanz
They also can't be used at the same time.

Screenshot from 2026-11-12 16-13-51 Screenshot from 2026-11-12 16-13-57

Oak Charm is correct. Golden Oak Charm adds 100 HP and 500 SD.
They also can't be used at the same time.

Screenshot from 2026-11-12 16-14-02 Screenshot from 2026-11-12 16-14-10

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.
They also (probably) can't be used at the same time.

Screenshot from 2026-11-12 16-14-34 Screenshot from 2026-11-12 16-14-41

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.cs
  • src/GameLogic/Properties/PlugInResources.resx
  • src/Persistence/Initialization/Properties/ItemNames.Designer.cs
  • src/Persistence/Initialization/Properties/ItemNames.de.resx
  • src/Persistence/Initialization/Properties/ItemNames.resx
  • src/Persistence/Initialization/Properties/ItemNames.zh-CN.resx
  • 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
  • tests/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

@icheat2win
icheat2win force-pushed the feat/inventory-charms branch from 27f7dfd to 807ef82 Compare November 14, 2026 15:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +46 to +49
public override string Name => PlugInName;

/// <inheritdoc />
public override string Description => PlugInDescription;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ze-dom

ze-dom commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

@sven-n , check my comment below

@icheat2win
icheat2win force-pushed the feat/inventory-charms branch from 1330266 to 6e541fc Compare November 15, 2026 11:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@icheat2win
icheat2win force-pushed the feat/inventory-charms branch from 6e541fc to da00aa9 Compare November 16, 2026 06:54
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
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
@icheat2win
icheat2win requested a review from sven-n November 16, 2026 15:28
@icheat2win

Copy link
Copy Markdown
Contributor Author

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.

@icheat2win

Copy link
Copy Markdown
Contributor Author

@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 LJH_MOD_CHANGED_GOLDEN_OAK_CHARM_STAT isn't defined there). The data test and the docs page are updated too.

@sven-n it's rebased on master and merges cleanly.

@ze-dom

ze-dom commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

@icheat2win , thanks. You didn't address the figurines/statues. Current GMO shop also backs the percent values:
https://shop-muonline.webzen.com/GameShop/MuShopMainFrm.asp (Category: Normal -> Equipment)

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

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

sven-n and others added 3 commits November 16, 2026 21:28
… 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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

This branch has not been deployed

No deployments
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.

4 participants