4.1 KiB
Binder confirmation requires current presentation — 2026-11-27
The source0x2eb binder offer and native0x3f004a activation checked actor presence/kind/sent (plus generation matching for activation), but their shared bindings() lookup included every sent actor without checking current presentation realm/map or eligibility. A source offer backed by a retained foreign-map actor was admitted in the first regression case. Before log. The bug is demonstrated at the host boundary; no live symptom attribution is claimed.
The fix is confined to these two binder blocks: require a ready self/world location, no logout or near/far transfer, a sent eligible creature with nonzero generation, and matching presentation realm/map. Activation additionally retains the existing matching source offer and generation requirement. No global bindings or shared NPC helper changes. Parent bank0x1b8/equipment_bank_open is separate.
Contract
Saved source /mnt/Games/@project/build/source-server-main-20261124/source/src/game/Objects/Player.cpp:10247, SetBindPoint, sends the genuine GUID-only binder confirmation. Handlers/NPCHandler.cpp:552 accepts the source binder activation only for an in-world alive player and GetNPCIfCanInteractWith(..., INNKEEPER). Player.cpp:3254 resolves that NPC from the player's current map. This supports current-world identity; it does not justify replacing source checks for NPC flags, distance, alive state, or instance restrictions in the gateway.
Maintained native /mnt/Games/@project/servers/trinity-forever/src/server/game/Server/Packets/NPCPackets.cpp:99, NPCInteractionOpenResult::Write, writes NPC GUID, interaction type and Success bit. Existing Binder type20 and0x47031b opcode are retained. Native NPCHandler::HandleBinderActivateOpcode also resolves an interactable innkeeper. The change adds no native reader/opcode mapping and does not claim new live UI acceptance.
Integrated cases
A dedicated function in existing native_gameplay_packet_test.cpp creates a current presented innkeeper and checks the complete native Binder packet against independently assembled GUID/type20/success bytes. The lifecycle matrix tests both offer and activation with wrong actor map/realm, ineligible/zero-generation/unsent/wrong-kind/removed actor, missing self/location, logout, and near/far transfer. A later generation rejects an old offer. Valid activation emits exact source0x1b5 GUID bytes; repeated preparation is pure, send completion consumes the offer, and replay is rejected.
Every source offer truncation and a trailing byte reject without changing an existing valid offer. These are framing controls separate from lifecycle admission. Explicit actor mutations model presentation transitions, not a claim to run full server create/destroy/worldport flows. The existing fixture's older binder positive setup is supplied with current eligibility/location/realm/map metadata rather than weakening the runtime guard to fit incomplete synthetic state.
Before correction the first foreign-map offer was admitted and the fixture fails. No exhaustive before-failure count is claimed. Only the changed world_translation unit and existing gameplay fixture are compiled against the pinned75d0ba65 shared native/protocol libraries with6dc6e75a headers. Library hashes. The fixture uses its registered GNU C++20/profile flags; the runtime unit additionally uses warnings-as-errors. An initial standalone fixture compile with extra warning-as-error flags encountered an existing unrelated formatting warning; the check was then compiled with the target's actual flags. No ops/CMake changes or gate rerun.
After correction: 105 new binder checks PASS, and the rest of the existing gameplay fixture completes successfully. After log, receipt. No parent bank fixture metadata was changed.
Boundaries
Source remains authoritative for innkeeper flag, distance, alive and instance eligibility. Stored offer owner/session expansion is not part of this two-field existing offer contract. No global binding/helper, parent bank, other NPC route, codec, client, database or full-gate work. Parent owns integration and live acceptance.