Skip to content

Evolving Item Fixes#98

Merged
Valorith merged 11 commits intomasterfrom
codex/evolving-item-review-fixes-master
Mar 27, 2026
Merged

Evolving Item Fixes#98
Valorith merged 11 commits intomasterfrom
codex/evolving-item-review-fixes-master

Conversation

@Valorith
Copy link
Copy Markdown
Owner

@Valorith Valorith commented Mar 20, 2026

Original Feature PR: EQEmu#4496

Summary

  • preserve item instance state during evolve XP transfer instead of rebuilding pristine items
  • reject self-transfer and harden evolving-item toggle handling
  • add an EvolvingItems:ShowExperienceMessages rule to announce evolving item XP gains in the experience channel

Included fixes

  • clone and retarget item instances during evolve XP transfer so augments, attunement, ornamentation, custom data, timers, and other per-instance state survive the transfer
  • reject same-item transfer requests in both the preview and commit paths
  • verify ownership and live inventory mapping in DoEvolveItemToggle
  • add EvolvingItems:ShowExperienceMessages (default false) so servers can opt into evolving item XP gain messages; formatting follows Character:ShowExpValues

New Rule Details

  • EvolvingItems:ShowExperienceMessages = false
    No evolving item XP gain message is shown.
  • EvolvingItems:ShowExperienceMessages = true and Character:ShowExpValues = 0
    Example: Your Jagged Sword of Trials has gained experience!
  • EvolvingItems:ShowExperienceMessages = true and Character:ShowExpValues = 1
    Example: Your Jagged Sword of Trials has gained experience! (125)
  • EvolvingItems:ShowExperienceMessages = true and Character:ShowExpValues = 2
    Example: Your Jagged Sword of Trials has gained experience! (125) (0.500%)

Notes

  • this PR intentionally excludes the item_unique_id-based evolving-record mapping changes because those depend on the broader bazaar item identity rework and do not belong in a standalone master fix PR

Testing

  • git diff --check
  • cmake --build build-codex --config RelWithDebInfo --target common zone -- /m

@Valorith Valorith marked this pull request as ready for review March 20, 2026 23:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens evolving-item XP transfer and toggling by preserving full per-instance item state during transfers (instead of rebuilding pristine items), rejecting self-transfer requests, and validating ownership/inventory mapping when toggling evolving items.

Changes:

  • Clone + retarget EQ::ItemInstance during evolve XP transfer so augments, attunement, ornamentation, custom data, timers, etc. survive the transfer.
  • Reject same-item transfers in both preview (SendEvolveXPWindowDetails) and commit (DoEvolveTransferXP) paths.
  • Validate character ownership and confirm the evolving-item record maps to a live inventory instance in DoEvolveItemToggle.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
zone/client_evolving_items.cpp Adds clone/retarget transfer flow, self-transfer rejection, and stronger toggle validation/lookup.
common/repositories/character_evolving_items_repository.h Adds UpdateTransferState helper to persist transfer-updated evolving-item DB state.
common/item_instance.h Adds ItemInstance::ReplaceItemData API.
common/item_instance.cpp Implements ReplaceItemData to swap underlying ItemData and re-handle scaled-item state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Valorith Valorith changed the title Fix evolving item review findings Evolving Item Fixes Mar 22, 2026
claude and others added 3 commits March 22, 2026 16:17
- Fix ALL_EXP branch logic: raid/solo exp rates were unreachable when
  ALL_EXP was set because it short-circuited to group rate. Restructured
  to check raid first, then group, then solo fallback.
- Move progression >= 100 checks inside mob null guards for
  SPECIFIC_MOB_RACE, SPECIFIC_ZONE_ID, and NUMBER_OF_KILLS cases to
  prevent unnecessary queue additions when mob is null.
- Fix copy-paste log message in NUMBER_OF_KILLS case: was incorrectly
  logged as "Type 4 Specific Zone ID" instead of "Type 5 Number of Kills".
- Guard .at("evolve") calls in SetEvolveEquipped with .contains() check
  to prevent std::out_of_range if called before timer is created.

https://claude.ai/code/session_01VgYPW4cYy3mzh17LKFQs58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[Code Review Fixes] Claude Code Review & Fixes for Evolving items PR
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI commented Mar 22, 2026

@Valorith I've opened a new pull request, #101, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 22, 2026 16:40
… transfer functions

Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Valorith/Server/sessions/889294cb-cd6a-4b98-afce-7d63d7a6cd9f
Guard against SLOT_AUGMENT_GENERIC_RETURN in evolving item toggle and transfer
Valorith pushed a commit that referenced this pull request Mar 22, 2026
47 test cases across 15 sections covering all evolution types (XP, kill
count, mob race, zone), activation/timer mechanics, evolution completion,
augment handling, XP transfer window, merchant/parcel interactions,
persistence, GM commands, edge cases, and regression tests for PRs EQEmu#4607,
EQEmu#4992, #8, and #98. Includes ready-to-run SQL setup for 5 test item
families with low thresholds for fast manual testing.

https://claude.ai/code/session_017wrKmjuMTicYybGCRiBBFG
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

zone/client_evolving_items.cpp:266

  • The log message says it "Assigned [...] of exp" but the value logged is hardcoded as exp * 0.001, which won’t match the actual evolve_amount when PercentOf{Solo,Group,Raid}Experience rules differ from the default (or when raid/group paths are used). Logging evolve_amount (or deriving the value from the same rule used to compute it) would keep diagnostics accurate.
				LogEvolveItem(
					"Processing Complete for item id <green>[{1}] Type 1 Amount of EXP - SubType <yellow>[{0}] - "
					"Assigned <yellow>[{2}] of exp to <green>[{1}]",
					sub_type,
					inst->GetID(),
					exp * 0.001
				);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Valorith Valorith merged commit a58e067 into master Mar 27, 2026
7 checks passed
@Valorith Valorith deleted the codex/evolving-item-review-fixes-master branch March 27, 2026 00:56
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