Repository navigation
feat(gateway): answer item name, sale, read and loot-pass messages - #701
Merged
Merged
Conversation
…es durability Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add CMSG_ITEM_NAME_QUERY, SMSG_SELL_ITEM refusals, CMSG_READ_ITEM failure, SMSG_LOOT_ALL_PASSED and SMSG_DURABILITY_DAMAGE_DEATH. Ignore the unhandled vanilla requests as vmangos does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Disarm the event reaper in both fixtures and count new events by id. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A guid that resolves to no item now stays silent on sale, as in vmangos. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Mathih13
force-pushed
the
feat/opcode-parity-item-loot
branch
from
October 15, 2026 10:42
a6bdf3f to
af1ddf4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 1.12 client waits for answers to several item, vendor and loot messages that the Gateway never sent. A refused sale gave no error. An item name query got no reply. When every roller passed, nobody was told. A death that damaged worn gear showed no durability message.
This change sends those answers where the Module already holds the state.
CMSG_ITEM_NAME_QUERYis answered from the item template catalog. An unknown entry gets no reply, as in vmangos.CMSG_SELL_ITEMgetsSMSG_SELL_ITEMwith the matching error code.CMSG_READ_ITEMon an item with page text getsSMSG_READ_ITEM_FAILEDin the 5875 layout (guid plus reason byte) and a System Message. Page text has no catalog. Other items get Inventory Refusal 23.ALL_PASSEDevent (kind 12) and the Gateway sendsSMSG_LOOT_ALL_PASSED.DEATH_DURABILITYevent (kind 13) and the Gateway sends the emptySMSG_DURABILITY_DAMAGE_DEATH.CMSG_AUTOSTORE_GROUND_ITEM,CMSG_STORE_LOOT_IN_SLOT,CMSG_SKILL_BUY_STEP,CMSG_SKILL_BUY_RANKandCMSG_BUY_LOTTERY_TICKET_OBSOLETEare ignored without a reply.Not sent, with the reason:
SMSG_BUY_ITEM(no stock depletion),SMSG_ITEM_COOLDOWN(no item-use cooldown state),SMSG_ITEM_TIME_UPDATEandSMSG_ITEM_ENCHANT_TIME_UPDATE(no item duration),SMSG_GAMEOBJECT_PAGETEXT(no page text), andSMSG_LOOT_ITEM_NOTIFY,SMSG_OPEN_CONTAINER,SMSG_ENCHANTMENTLOG,SMSG_ITEM_QUERY_MULTIPLE_RESPONSE(the client ignores them or no 1.12 server sends them).Durable tests added, left to CI (not run locally):
module/tests/death_durability_notice.rs(two tests)module/tests/loot_roll_promotion.rs:an_all_pass_resolution_tells_every_roller_and_a_win_does_notUnit tests:
cargo test -p lyracore-gateway,-p lyracore-sharedand-p lyracore-module --libpass. Clippy is clean.Claude Sonnet 5.5 in Claude Code.
Review fixes: a sale of a guid that resolves to no item stays silent (vmangos). Item guid lookups for sell, repair, enchant and item-target casts now require the item to belong to the acting Character. The durable fixtures disarm the event reaper. The sharded all-pass unlock gap is not part of this change.
Verification after rebasing onto main (#698, #699, #704): fmt check, Gateway and Module clippy, Gateway, Module lib and shared tests, the wasm check, the inventory example and durable
--no-runall pass. Durable tests were not run locally.Comment review (CODING_STANDARDS.md): scope is every added or changed comment in the full diff against main, including new test files and retained comments next to changed code. Result: passed. Kept: two interface contracts on the owner-checked guid lookups, the raw
SMSG_READ_ITEM_FAILEDbody layout, the unhandled-request note beside the ignore arm, the reaper note in two fixtures, one unknown-entry and one page-text-catalog note in the item handler, and byte annotations in packet tests. Removed: citation essays, doc comments that repeat names, and section dividers. No pointers were removed or needed.