aorecomp

Anarchy Online classic in the browser

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


commit 8662590ea289ee764580eaa6b19d2c075630f0df
parent fe7f121dfd0c6dc60e340037189c3a461504156e
Author: anon <anon@example.com>
Date:   Sun, 25 Oct 2026 01:12:55 +0000

Preserve normal client features during surgery access

Diffstat:
Mdocs/implants.md | 10++++++++--
Mserver/implants.go | 3++-
Mserver/implants_test.go | 4++--
Mserver/world.go | 3++-
4 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/docs/implants.md b/docs/implants.md @@ -126,6 +126,13 @@ completion of a pending equipment move. A full ordinary inventory cannot discard an installed implant during removal. Combat equipment restrictions, ownership checks and atomic inventory saves also apply. +FullCharacter sends Features22 during surgery access, preserving the native +base value6; expiry restores6. Native initializer10072760 sets6, and casting +gate100646a0 requires bit2 through getter10059ba0. Sending16 or0 replaces +normal features and prevents the client from submitting casts. Complete +original-function evidence is retained in +`local/regeneration-nano-research/native/features-evidence.json`. + The server saves absolute permission and cooldown deadlines before acknowledging use. Repeated requests cannot extend either deadline. Reconnect/restart restores the remaining window and cooldown, without re-executing the 30-second Use effect. @@ -153,8 +160,7 @@ with body `{170,0,0,124,rawSeconds}` starts the native Treatment lock; client stub, so the explicit server lock response is necessary. The owner restores active Features 224 bit 0x10 through FullCharacter. StatIIR -`2b333d6e` clears it on authoritative expiry. The supported server currently -authors no other Features bits. +`2b333d6e` clears that bit on authoritative expiry, preserving base value6. Implant moves use ContainerAddItem `47537a24`: source page 104 for installation, page103/absolute implant slot for removal, and destination111 for the first free diff --git a/server/implants.go b/server/implants.go @@ -107,7 +107,8 @@ func (server *server) advanceItemEffects(now time.Time) { if !player.implantChangesUntil.IsZero() && !now.Before(player.implantChangesUntil) { player.implantChangesUntil = time.Time{} body := binary.BigEndian.AppendUint32(nil, 224) - body = binary.BigEndian.AppendUint32(body, 0) + // Restore normal features, including the permission to cast programs. + body = binary.BigEndian.AppendUint32(body, 6) updates[client] = append(updates[client], n3Packet(0x2b333d6e, 50000, id, body)) } } diff --git a/server/implants_test.go b/server/implants_test.go @@ -71,7 +71,7 @@ func TestImplantClinicEquipBonusesAndRestart(t *testing.T) { for offset := cursor + 4; offset < cursor+4+count*8; offset += 8 { values[binary.BigEndian.Uint32(packet[offset:])] = binary.BigEndian.Uint32(packet[offset+4:]) } - if values[124] != 9 || values[224] != 16 || values[91] != 0 { + if values[124] != 9 || values[224] != 22 || values[91] != 0 { t.Fatalf("FullCharacter duplicated trickle, equipment bonuses or lost access: %v", values) } } @@ -253,7 +253,7 @@ func TestPortableClinicCooldownAndExpiry(t *testing.T) { binary.BigEndian.Uint32(first[2][29:33]) != 170 || binary.BigEndian.Uint32(first[2][41:45]) != 124 || binary.BigEndian.Uint32(first[2][45:49]) != 600 { t.Fatalf("clinic Use or cooldown wire: %x", first) } - if len(conn.packets) != 6 || binary.BigEndian.Uint32(conn.packets[4][29:33]) != 224 || binary.BigEndian.Uint32(conn.packets[4][33:37]) != 0 || + if len(conn.packets) != 6 || binary.BigEndian.Uint32(conn.packets[4][29:33]) != 224 || binary.BigEndian.Uint32(conn.packets[4][33:37]) != 6 || binary.BigEndian.Uint32(conn.packets[5][29:33]) != 164 || !player.implantChangesUntil.IsZero() || !player.skillLocks[124].IsZero() { t.Fatalf("clinic expiry repeated or omitted: %x", conn.packets) } diff --git a/server/world.go b/server/world.go @@ -214,7 +214,8 @@ func fullCharacterPacket(character *character) []byte { [2]uint32{360, uint32(character.baseScale())}, [2]uint32{214, character.nano}, [2]uint32{221, character.maximumNano() - uint32(character.inventory.equipmentBonus(221))}) if time.Now().Before(character.implantChangesUntil) { - stats = append(stats, [2]uint32{224, 16}) + // Surgery access supplements the native base Features value of 6. + stats = append(stats, [2]uint32{224, 6 | 16}) } body = binary.BigEndian.AppendUint32(body, uint32(len(stats)+1)*1009) for _, stat := range stats {