Repository navigation
feat(gateway): let players sit, bind and see their intro the way the client expects - #702
Merged
Merged
Conversation
Mathih13
force-pushed
the
feat/opcode-parity-character-world
branch
from
October 15, 2026 08:07
f5d55da to
2b96b6b
Compare
gw_set_stand_state writes stand, sit, sleep or kneel into byte 0 of the Character's unit bytes; any other state is a Refusal. Damage stands a seated player who is not mounted, as vmangos DealDamage does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stand-state changes reach the Module, and the self relay sends SMSG_STANDSTATE_UPDATE on every stored change; a Refusal sends the stored state back. CMSG_EMOTE plays its animation, a completed bind sends SMSG_PLAYERBOUND, and a first world entry plays the race's opening cinematic. World entry and each zone crossing send an empty SMSG_INIT_WORLD_STATES. Renames, account-data requests and a second login get their protocol Refusals. Debug, GM and Warden requests are explicitly ignored, and requests the protocol library cannot read safely are dropped before decoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mathih13
force-pushed
the
feat/opcode-parity-character-world
branch
from
October 15, 2026 10:44
2b96b6b to
1162576
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.1 client sends and expects many character, session and world-state messages that LyraCore did not handle. A sit request got "Stand-state changes are not available". A bind gave no " is now your home" line. A new Character never saw its race's intro. Some requests did worse: the protocol library panics on a bad account-data upload and rejects an unknown zone id, and opcodes it cannot read ended the World Session.
This change closes those gaps where the state already exists:
gw_set_stand_state. It stores the state in the Character's unit bytes, so observers see it. A ghost can sit, as in vmangos. Damage stands a seated player who is not mounted, as vmangosDealDamagedoes. The self relay sendsSMSG_STANDSTATE_UPDATEon every stored change, and a refused request sends the stored state back so the client snaps back.CMSG_EMOTE(the wave after an auction bid) plays its animation through the existing emote event, with no text line.SMSG_PLAYERBOUND. It names the Character's zone; vmangos names the sub-area, which the Gateway cannot read without terrain data.SMSG_TRIGGER_CINEMATICwith the race's id from ChrRaces.dbc. Later logins play none.SMSG_INIT_WORLD_STATES.SMSG_CHAR_RENAMEwith CHAR_CREATE_ERROR, because no Character has a rename flag. An account-data request gets an empty section. A second login in one World Session getsSMSG_CHARACTER_LOGIN_FAILEDand keeps the session./whoisand Warden replies are explicitly ignored. Account-data uploads, zone reports and opcodes the library cannot read are dropped before decoding.Each packet has a byte-for-byte codec test. Each dispatcher path has a Fake test, and Headless Client tests cover the dropped requests and the cinematic. The durable tests in
module/tests/stand_state.rscover sitting, refusals, a sitting ghost and standing on damage. They were compiled but not run locally; CI's module-durable workflow runs them.Some vmangos stand-state rules are still missing: auras that sitting or standing cancels, the automatic critical hit on a seated victim, the NOT_STANDING cast failure, 1.5x regeneration while seated, and the UNIT_FLAG_PREVENT_ANIM gate. Account data is not stored, and the bind confirmation names the zone rather than the sub-area.
docs/benilla-compatibility.mdlists these gaps.Verification
cargo fmt --all -- --check, Gateway and Module clippy with-D warnings,cargo test -p lyracore-gateway(2073 passed), Module lib tests (1581 passed), the wasm check, and every durable target with--no-run.module/tests/stand_state.rswere not run locally; CI's module-durable workflow runs them.origin/main, in source, tests and Fakes, plus comments near changed code. Result: passed. The kept comments are one-line contracts (CharacterStore::set_stand_stateandstand_state) and technical facts: packet layouts, the ChrRaces.dbc column, the rename result quirk, the first-login read ordering, the reader hazards behind each raw ignore, and the client's stand-state behaviour. The diff removes no comments. I deleted the vmangos citation essays; the behaviour they described is indocs/benilla-compatibility.md.Made by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code