Skip to content

feat(items): add the talisman of resurrection - #1461

Merged
sven-n merged 2 commits into
MUnique:masterfrom
icheat2win:feat/talisman-of-resurrection
Nov 14, 2026
Merged

sven-n merged 2 commits into
MUnique:masterfrom
icheat2win:feat/talisman-of-resurrection

Conversation

@icheat2win

Copy link
Copy Markdown
Contributor

The Talisman of Resurrection (13/69) was missing, so its packages of the in-game shop couldn't be sold. When a player dies while it carries one in its inventory, a spawn gate plugin respawns it at the place of its death instead of the safezone, and one talisman is used up. It doesn't apply in mini games, duels and guild wars, which have their own spawn gates.

An optional update adds the item to existing Season 6 databases and puts its two packages on sale, when the shop uses the client's script.

Part of #1339.

Claude-Session: https://claude.ai/code/session_011xNc75fJTee8EPxDxQxuGi

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 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-14T18:36:52.821558Z 61ee619 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 9, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 47 complexity · 24 duplication

Metric Results
Complexity 47
Duplication 24

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: 5f85456a7c

ℹ️ 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 +29 to +31
|| player.CurrentMiniGame is not null
|| player.DuelRoom is not null
|| player.GuildWarContext is not null

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 Preserve Castle Siege's side-specific respawn gates

During an active Castle Siege, participants use a separate CastleSiegeContext, so none of these exclusions applies. If this selector runs before CastleSiegePlugIn, for example after the siege plugin is deactivated and reactivated, it sets args.Gate first. CastleSiegePlugIn.SelectSpawnGateAsync then skips its side-specific gate because it requires args.Gate to be null. A talisman consequently lets attackers respawn behind the castle gates instead of returning to their side's respawn area. Exclude active siege participants or otherwise guarantee that siege gate selection precedes this consumptive fallback.

Useful? React with 👍 / 👎.

Comment thread src/GameLogic/ItemConstants.cs Resolved
Comment on lines +41 to +44
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 Return localized strings from the update's public properties

For German or Chinese admin sessions, the Updates page still displays these English constants. Updates.razor.cs forwards IConfigurationUpdatePlugIn.Name and .Description directly, so the localized [Display] attribute does not make the newly added translations appear on that page. This violates the user-facing localization requirement in rule 10 of docs/CODING_RULES.md. Return the corresponding PlugInResources strings from both overrides, as resource-backed update plugins already do.

AGENTS.md reference: AGENTS.md:L16-L17

Useful? React with 👍 / 👎.

Comment on lines +39 to +41
args.Gate = new ExitGate
{
Map = map.Definition,

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 Preserve forced safezone evacuation before consuming a talisman

When a lethal hit destroys a character's only flying mount on Icarus, AttackByAsync has already called OnDeathAsync before DecreasePetDurabilityAsync attempts the mandatory safezone evacuation. WarpToSafezoneAsync invokes this selector too, so the dead character's talisman is consumed and the required move to Devias is replaced with its current Icarus position, even though it no longer satisfies the map's CanFly requirement. Restrict this consumption to actual death-respawn requests and preserve mandatory evacuation when the current map's requirements are no longer met.

Useful? React with 👍 / 👎.

@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: c06b1922a6

ℹ️ 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 +59 to +60
await inventory.RemoveItemAsync(talisman).ConfigureAwait(false);
await player.PersistenceContext.DeleteAsync(talisman).ConfigureAwait(false);

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 Keep talismans when a dead player disconnects

If a player disconnects during the three-second death delay on an ordinary map, Player.DisconnectAsync first changes its state to Disconnected, then HandleMoveToNextSafezoneAsync cancels the respawn and calls WarpToSafezoneAsync. That cleanup path invokes this selector and deletes a talisman, but PlayerMapTransitions.WarpToAsync immediately returns for disconnected players. The cash-shop item is therefore permanently consumed without performing a resurrection. Reject disconnected/finished players here, or defer consumption until a death respawn is actually executed.

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.

See codex review comments

@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/talisman-of-resurrection branch 2 times, most recently from 711bb9b to 7f99b43 Compare November 14, 2026 16:20

@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: 7f99b43f8e

ℹ️ 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 +55 to +57
if (new CashShopItems(context, gameConfiguration).CreateTalismanOfResurrection() is { } talisman)
{
ItemRules.Apply([talisman]);

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 Apply talisman rules when the cash-shop update creates it

When upgrading a Season 6 database that has not yet installed AddCashShopUpdatePlugIn, that older update now creates 13/69 through CashShopItems.Initialize() before this update runs. CreateTalismanOfResurrection() consequently returns null here, so ItemRules.Apply is skipped and the item retains ItemDefinition's default permissive flags. MoveItemAction, DropItemAction, and SellItemToNpcAction therefore allow trading, dropping, and selling the paid item on this upgrade path, although fresh databases correctly prohibit those actions. Apply the restrictions when either update creates the item, and cover the chained upgrade to satisfy rule 4 of docs/CODING_RULES.md, which requires handling every upgrade path.

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. The code looks good to me: the spawn-gate plugin skips mini games, duels, guild wars, castle siege participants and maps whose requirements the player no longer fulfills, and the update plugin is localized and only touches the client-script shop.

Unfortunately, #1504 was merged in the meantime and regenerated GameLogic/Properties/PlugInResources.Designer.cs, so this PR conflicts again (GameLogic/Properties/PlugInResources.*). Please rebase once more: keep the entries of both sides in the .resx files, then regenerate the designer. Once it's clean and green, I'll merge it.

(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

The Talisman of Resurrection (13/69) was missing, so its packages of the
in-game shop couldn't be sold. When a player dies while it carries one in
its inventory, a spawn gate plugin respawns it at the place of its death
instead of the safezone, and one talisman is used up. It doesn't apply in
mini games, duels and guild wars, which have their own spawn gates.

An optional update adds the item to existing Season 6 databases and puts
its two packages on sale, when the shop uses the client's script.

Part of MUnique#1339.

Rebased onto master: this is the change of the earlier commits in one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011xNc76CH3CGWUp5r4XmXWK
@icheat2win
icheat2win force-pushed the feat/talisman-of-resurrection branch from 7f99b43 to 61ee619 Compare November 14, 2026 18:30

@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: 61ee6193b7

ℹ️ 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 +59 to +60
await inventory.RemoveItemAsync(talisman).ConfigureAwait(false);
await player.PersistenceContext.DeleteAsync(talisman).ConfigureAwait(false);

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 Consume only one unit of a configured stackable item

When an operator enables stacking for the talisman by increasing its definition's durability, or configures another stackable resurrection item, these calls delete the entire stack for one resurrection. DataModel.ItemExtensions.IsStackable identifies such items, and InventoryProductDelivery.CreateItems stores their quantity in Item.Durability, so a single death permanently discards all remaining units instead of consuming the documented one talisman. Decrement the stack quantity and send a durability update, removing and deleting the item only when its last unit is consumed.

Useful? React with 👍 / 👎.

@sven-n
sven-n merged commit 64c534a into MUnique:master Nov 14, 2026
1 of 2 checks 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.

3 participants