aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/research-notes/shop-edit-research/native/README.md (10204B)


Shop cancellation, live edits and range checks

The retained evidence establishes a native cancellation path and a separate five-metre Use validator. It does not establish the cause of the old live-edit failure. A surviving active TradeView can ignore a later trade-start event, but its cached partner does not supply the target or player position to the Use range check. No cleanup/protocol change is justified by this pass alone.

Scope and identity

REA skill Step 6, distinct read-only native question. Reused complete original 14.9.1 evidence and maintained source; no fresh binary open, session, binary export, target execution, browser/server/DB action, production edit or commit. The earlier automatic approval rejection of a fresh native open was respected. No retry or alternate binary-analysis route was used.

Original images use base 10000000; maintained bases are KKR 36000000, DDR 2b000000, LLR 38000000, QQR 42000000.

Original artifact SHA-256
kkr.dll a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0
ddr.dll 3c937161de8f690351c3c08e158431417cee9ced77a41b677e7123b61a8c9883
llr.dll ebb09047f6ead192388f7ddfb4795da5013a60f7c2d1c3933ec02eef58a10132
qqr.dll c011e411b9cecfbde03c4b37fc988540a1246fafc9921c7cab7cb9ef2bb8d913

target-identities.json preserves the matching earlier inventory identity records. retained-evidence.json contains complete selected REA records; provenance.json identifies the earlier bundles. Generated instruction/data observations are explicitly supporting source evidence, not fresh REA results.

TradeIIR action 2

Body is six DWORDs {1,2,A.type,A.id,B.type,B.id}. Player-subject activation 10084c50 resolves the subject, gets its trade helper and calls 100780b0. Case 2 passes A.id != 0 to 100774a0; that Boolean controls the cancellation chat text. Zero A/B is sufficient. Complete REA: ev_5fe35f4305fb3b2ec2b32dd82476cb8f06a0e6e886698554938a898003b9f24b and ev_e8d99b8728b013c566e5e8d7e4f52959628066199d83239630c958bb67715e60.

100774a0 first tests actor stat0 flag 8. If clear, it returns without restoring offers or issuing the UI completion callback. If set, it clears the flag, restores TradeInv rows into first-free ordinary slots, refreshes local inventory, and for the local actor calls 1001c9d0(false). It resolves the stored partner Identity; a vending partner gets 100a9cf0(2,player,zero), which removes the per-player transaction record. Complete original cancel and start routines: REA ev_3b068fe016d29c9c6d60176e86341dcd106df72df90b32492a9c956186bf61c7. Thus a separate machine-subject abort is not required by this inspected path.

The trade helper is actor +0x160, lazy getter 10071f90. Its owner is helper +0x18; partner A is helper +0/+4, tag B +8/+c. Constructor 10077320 clears actor flag 8. Cancellation does not zero these cached identities.

Supporting KKR source shows 1001c9d0 -> 10003fd0 (lifted-0011.c:20230, lifted-0001.c:2427): CMsg_TradeCompleted emits AFCM group 0x33, event 0x16f, with the Boolean. DDR module constructor 10049170 registers event 16f to TradeCompletedMessage 100493b0; this calls 10048ef0, which zeroes view +0x28/+0x2c, then 100487e0.

Reset 100487e0 clears all three icon grids, resets their visible lines, closes/hides/releases the active view through its window helpers, and finally writes active byte +0x4c = 0. It does not destroy the TradeView allocation, clear mode +0x48, or zero identities +0x5c/+0x64/+0x6c. Those identity values remaining after active becomes zero are normal inert cache state. Complete DDR reset REA: ev_1f9fdd961d7afda27c01e108a5821b696d81f3110667a7078b29988ec7ae0e19. Supporting event/wrapper instructions are retained in the source audit.

Start 100485b0 does its entire setup only when active +0x4c == 0. An already-active view ignores a new start, including its replacement partner identities. Complete REA ev_f5717956dbc1f446ae83949a01f62f1535d4e2f743295d46fb199db6490f039e. This is a concrete possible stale-window mechanism. It does not prove that the old reported edit actually left the view active. A late abort after a new actor has reset flag 8 can be ignored, so before/after ordering matters.

Scene and actor teardown

Original LLR n3TeleportIIR::Activate 10043400 resolves its subject. A zero zone flag moves that dynel using SetRelPos; a nonzero flag for the local actor calls n3EngineClient::StartTeleport. Complete REA ev_831ea1303751f531ab2258dc091b64930d1c85dd452c2c7af681094a746f9c2a. Supporting maintained LLR 1001da60 calls current playfield's StopPlayfield 1002a060, which invokes its virtual +0x28(0).

Actual actor destruction is different from an in-place position update. Supporting KKR SimpleChar destructor 1006d5b0 at 1006d73b..1006d763 loads trade helper +0x160, calls 10077360 -> 100774a0(true), frees it and zeros the actor field. At 1006d893..1006d8bb it frees/zeros the separate action validator +0x180. These cleanup calls do not themselves prove that every same-playfield reconnect executes that destructor before reinitializing.

DDR ShutdownMessage 100492e0 deletes the TradeView and zeros global 100eeaec (maintained 2b0eeaec); constructor 10049170 registers it for AFCM event 6. InitialiseMessage 10049270 allocates a fresh TradeView and stores it there. No proof in this bounded pass links every playfield teleport to that full UI-module shutdown event. Preserve that distinction: closing a trade, destroying an actor and shutting down the UI singleton are three different lifecycle operations.

Current reconstruction context only: server/control.go:325 applies a live edit then sends zone-flag-1 Teleport plus system redirect through teleportUser_locked. This source path cancels player trade but does not explicitly send a shop abort. This is not original-server evidence and does not establish an omission: native teardown may already close it. The parent task owns current runtime comparison and any production decision.

Default Use and exact distance origin

Default action 1002c350 uses the clicked dynel and Can30 bit8, then N3Msg_UseItem 1002acd0 constructs action-data 1004bee0 with the selected target Identity at data +0x14/+0x18, and GenericCmd action3. Complete Use REA ev_9c4ec4ab79f705d9108b1502e53ca5009e4e2058cd8a7996e7861501a6653ec0. Neither the machine stock nor TradeView's partner supplies that target.

Canonical item-action validator is 1004d350; retained request 1004d5c6 resolves to its complete body in REA ev_6483e6cd8d2790a26b1aca8299d6837e26f7efbde18efd5fa8babcb9a5c4abc1. It freshly resolves GetDynel(actionData+0x14). For actions1/3/4 it obtains both target and helper-owner GetGlobalPos, subtracts XYZ, computes Euclidean 3D distance, and checks GetParentDynel(target). An unparented target with distance strictly greater than 5.0 fails. Equality at 5.0 passes; no stat287, body radius, 2D shortcut or TradeView pointer occurs in this branch.

GenericCmd 10087b30/10087bb0 reaches it through actor getter 10071dd0. Supporting source establishes the exact cached-owner chain: actor +0x180 is a lazy 28-byte validator object; constructor 1004c9d0 stores the actor in its first DWORD. This is distinct from the action-state machine at +0x16c. GenericCmd refreshes its actor pointer at +0x30 through 100879a0 and passes that actor to 10071dd0. Xref REA ev_e0d7a8cd1008de94946a4a20cfb08ee526072a5685ff7747814e67fe01af809f confirms both validator callsites.

The local failure formats string 101c1b00, "Too far away, move closer!", calls local feedback helper 1001c8c0, and returns 0 at 1004d5c0..1004d605. GenericCmd initial verifier 100879d0 maps that failure to verification3; common n3Command::Activate 100168f0 returns null for verification2/3. Complete common command REA: ev_3c07ce549cf15ce70d6e3eb31b6af07a34f86f97a073acc6c615fbfdec1c402f. This is a native local rejection path that can prevent forwarding the Use. The feedback table also contains a separate similarly worded server-feedback entry (45,0) at 101c045c, recovered in canonical 10040b00 via request 100413cc, REA ev_f4c860ca8760fdc882fe57dc4522ce827a01bb7f9b19004177abdd8652c02899. Chat wording alone therefore cannot prove native versus server rejection. Correlate the click with outgoing GenericCmd and incoming feedback packets.

Global position and probe boundary

Exact supporting source chain: LLR GetGlobalPos 10017f50 (lifted-0008.c:4111) loads dynel +0x60 vehicle and delegates to QQR Vehicle::GetGlobalPos 10011200 (lifted-0005.c:9501). That getter returns vehicle +0x54 when vehicle +0x28 == 0, otherwise vehicle +0xe8. Read XYZ at that returned location. The existing probe's unconditional vehicle +0x54/+58/+5c is insufficient for a parented vehicle.

LLR GetParentDynel 10018e80 (lifted-0009.c:2613) resolves the identity at dynel +0x8c/+0x90; it does not simply return vehicle +0x28. The retained export inventories used for these names are local/rotation-research/llr-exports.txt and qqr-exports.txt. No new original LLR/QQR decompilation was acquired for these small getters. probe-fields.md gives the read-only field recipe.

The old check-vendor-pick-state.json records active view partner and hit Tools 51035:3221488799, template99491. Its separate shop, staticShop, position and stats come from a hardcoded probe resolving Medical 3221226655, template99383. Those differing identities do not show stale native state. A focused excerpt is saved as retained-probe-excerpt.json. The later live-editor smoke's eight successful edits and advancing ticks concern the separate freeze TODO; they do not recover this old range failure.

Checklist: action2 cleanup, UI guard/cache fields, actor/module destruction, range operands/threshold and global-position probes answered. Full scene-to-local-actor destruction timing on same-playfield redirect and cause of the old failure remain unresolved. The parent is running fresh owned clients; this worker makes no independent runtime reproduction or fix claim.