acdream/src/AcDream.Core.Net/Messages
Erik 7a0f836af5 fix(physics): AP-129 review fix - port CanMoveInto/IsAllowedIn, stop failing closed
Campaign P Slice P4 Opus review verdict: FIX-FIRST. RestrictionObjPrevalenceInspectionTests
(commit 3b5e0992) found 103,766 of 729,888 installed EnvCells (1,293 landblocks -
the whole housing estate) carry a baked RestrictionObj. The AP-71 gate's
unconditional fail-closed default (CanMoveInto unmodeled) would have locked
every apartment/cottage/villa interior for every player, including its own
owner - a live regression, not the "inert in dev content" the original
register row assumed.

Ports ACCWeenieObject::CanMoveInto (0x0058da40, pc:407982-408056) and
RestrictionDB::IsAllowedIn (0x005ae8f0, pc:444493-444516) verbatim into
ObjectInfo.CheckEntryRestrictions:
- owner_iid == 0 or == mover's own guid -> admit (open/owner)
- no RestrictionDB (retail _db == 0, i.e. never authored or not yet
  received) -> admit
- present RestrictionDB -> IsAllowedIn: open-to-public flag, OR mover
  shares the house's allegiance monarch, OR mover's own guid is a
  guest-table member
- unresolved restriction object -> fails CLOSED, exactly retail's own
  fallback when GetObjectA can't resolve it (pc:704-716)

Wire feed (Core.Net):
- CreateObject.cs: HouseOwner (WeenieHeaderFlag 0x02000000), HouseRestrictions
  (0x04000000), and Monarch (0x40) PWD-tail fields were parsed-and-skipped;
  now captured. Also fixes the HouseRestrictions PHashTable header
  misconception: the wire is ONE packed u32 (low 24 bits = entry count),
  not a separate count(u16)+numBuckets(u16) pair - verified against
  Chorizite's RestrictionDB.generated.cs. The old skip's byte-count
  happened to match for realistic guest-list sizes, but a future
  numBuckets value >255 would have corrupted the parse; now correct
  regardless.
- GameEvents.cs/GameEventWiring.cs: new House_UpdateRestrictions (0x0248)
  parser + wiring - retail's live guest-list refresh, whole-unit replace.
  No-ops if the house object hasn't arrived via CreateObject yet.
- ClientObject/WeenieData/ClientObjectTable: HouseOwnerId, MonarchId,
  Restrictions (new HouseRestrictionRecord) fields + merge-preserving
  Ingest + targeted UpdateHouseRestrictions.

Physics wiring:
- PhysicsEngine gains an Objects (ClientObjectTable?) property, mirroring
  the existing DataCache pattern - acdream's GetObjectA equivalent, used
  ONLY by the entry-restriction gate.
- RuntimeEntityObjectLifetime wires Physics.Engine.Objects = Objects in
  all three constructors, right alongside the table's own construction -
  the same canonical table every other subsystem borrows from, never a
  second one. This is the production fix: without it the gate still fails
  closed on every restricted cell (unresolvable object), so the wiring is
  load-bearing, not cosmetic.

Register: AP-129 narrowed (not retired) to the genuine remaining residual -
House_UpdateRestrictions' Sequence byte isn't used for staleness/reordering
rejection (low-probability, self-correcting), and outdoor CLandCell
restriction (a separate DAT structure) remains unported and unaffected by
this fix.

Tests: 15 new/updated in Ap71EntryRestrictionGateTests.cs (resolved-unowned
admits, owner admits, present-list-excluded blocks, present-list-included
admits, open-to-public admits, shared-allegiance-monarch admits, unresolved
blocks via null and via an empty table, plus two new end-to-end
PhysicsEngine.Objects-wired scenarios); 2 new CreateObject parser tests +
2 new GameEventWiring tests for the wire feed.

AcDream.Core.Tests: 4049 passed, 2 skipped, 0 failed.
AcDream.Core.Net.Tests: 761 passed, 0 skipped, 0 failed.
Complete solution suite: 9,961 total, 9,956 passed, 5 skipped, 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 11:36:11 +02:00
..
AllegianceRequests.cs feat(allegiance): Phase H.2 AllegianceRequests + AllegianceTree model 2026-04-18 17:17:45 +02:00
AppraiseInfoParser.cs fix #234: port retail appraisal floaty and inscriptions 2026-07-23 12:12:57 +02:00
AppraiseRequest.cs feat(items): Phase F.2 ItemRepository + AppraiseRequest round-trip 2026-04-18 16:55:36 +02:00
AttackTargetRequest.cs fix(net): Phase L.1c conform combat wire events 2026-04-28 10:54:50 +02:00
AutonomousPosition.cs feat(net): Phase B.2 — MoveToState + AutonomousPosition message builders 2026-04-12 14:28:35 +02:00
CastSpellRequest.cs feat(spells): Phase E.5 CastSpellRequest + Spellbook/enchantment state 2026-04-18 17:00:32 +02:00
CharacterActions.cs fix(net): xpSpent is a dword on the wire, and we were sending eight bytes 2026-07-29 01:59:47 +02:00
CharacterEnterWorld.cs feat(net): acdream enters the world — CharacterList parsed + CharacterEnterWorld sent + 68 CreateObject received (Phase 4.7) 2026-04-11 15:14:31 +02:00
CharacterList.cs fix(net): conform character entry and session shutdown 2026-07-21 10:33:03 +02:00
CharacterLogOff.cs fix(net): conform character entry and session shutdown 2026-07-21 10:33:03 +02:00
ChatRequests.cs fix(chat): BuildTell wire field order + retail-style FormatEntry + suppress duplicate Channel echo 2026-04-25 20:49:02 +02:00
ClientCommandRequests.cs feat(ui): port retail spellbook interactions 2026-07-15 16:26:30 +02:00
CreateObject.cs fix(physics): AP-129 review fix - port CanMoveInto/IsAllowedIn, stop failing closed 2026-07-30 11:36:11 +02:00
DddInterrogationResponse.cs feat(net): Phase 4.10 — DddInterrogationResponse + correct LoginComplete trigger 2026-04-11 23:48:37 +02:00
DeleteObject.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
EmoteText.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
EnchantmentWireReader.cs feat: port retail magic lifecycle and retained spell UI 2026-07-15 10:55:22 +02:00
Encodings.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
GameActionLoginComplete.cs feat(world): port retail portal-space viewport 2026-07-15 21:59:23 +02:00
GameEventDispatcher.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
GameEventEnvelope.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
GameEvents.cs fix(physics): AP-129 review fix - port CanMoveInto/IsAllowedIn, stop failing closed 2026-07-30 11:36:11 +02:00
GameEventType.cs feat(net): Phase F.1 GameEvent (0xF7B0) envelope dispatcher 2026-04-18 16:52:46 +02:00
GameMessageFragment.cs perf(net): frame recurring sends in place 2026-07-25 06:02:52 +02:00
HearSpeech.cs fix(net): ranged speech carries a range float our parser was eating 2026-07-29 01:51:34 +02:00
InteractRequests.cs feat(B.5): InteractRequests.BuildPickUp — PutItemInContainer 0x0019 2026-05-14 15:01:24 +02:00
InventoryActions.cs fix #234: port retail appraisal floaty and inscriptions 2026-07-23 12:12:57 +02:00
InventoryRemoveObject.cs feat(net): D.2b-B B-Wire — InventoryRemoveObject (0x0024) parser 2026-06-21 18:52:21 +02:00
JumpAction.cs feat(L.2b): outbound movement wire parity — RawMotionState default-difference, JumpPack, contact byte 2026-06-30 22:30:01 +02:00
MoveToState.cs feat(L.2b): outbound movement wire parity — RawMotionState default-difference, JumpPack, contact byte 2026-06-30 22:30:01 +02:00
ObjDescEvent.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
ParentEvent.cs feat(combat): port retail held weapon parenting 2026-07-11 13:02:26 +02:00
PhysicsSpawnData.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
PickupEvent.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
PlayerDescriptionParser.cs feat: port retail magic lifecycle and retained spell UI 2026-07-15 10:55:22 +02:00
PlayerKilled.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
PlayPhysicsScript.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
PlayPhysicsScriptType.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
PrivateUpdatePropertyInt.cs feat(net): D.2b-B B-Wire — PrivateUpdatePropertyInt (0x02CD) parser 2026-06-21 18:50:56 +02:00
PrivateUpdatePropertyInt64.cs fix(ui): port live experience quality updates (#217) 2026-07-13 20:43:48 +02:00
PrivateUpdateVital.cs feat(player): #5 PlayerDescription parser — Stam/Mana via attribute block 2026-04-25 16:42:24 +02:00
PublicUpdatePropertyInt.cs feat(D.5.2): PublicUpdatePropertyInt (0x02CE) parser 2026-06-17 18:29:23 +02:00
RawMotionStatePacker.cs feat(L.2b): outbound movement wire parity — RawMotionState default-difference, JumpPack, contact byte 2026-06-30 22:30:01 +02:00
ServerMessage.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
SetStackSize.cs feat(net): D.2b-B B-Wire — SetStackSize (0x0197) parser 2026-06-21 18:51:42 +02:00
SetState.cs feat(phys L.2g slice 1): WorldSession dispatches SetState (0xF74B) + hex probe 2026-05-12 22:28:04 +02:00
SetTurbineChatChannels.cs feat(net+chat): #19 TurbineChat (0xF7DE) codec + ChatChannelInfo + SetTurbineChatChannels parser 2026-04-25 19:44:56 +02:00
SocialActions.cs feat(ui): share indicator detail panels 2026-07-17 10:27:41 +02:00
SocialStateMessages.cs feat(chat): port retail client command families 2026-07-13 14:50:15 +02:00
SoulEmote.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
StringReader.cs feat(net): #18 holtburger inbound chat parity - EmoteText, SoulEmote, ServerMessage, PlayerKilled, WeenieError + Windows-1252 codec 2026-04-25 19:06:01 +02:00
TurbineChat.cs perf(net): borrow inbound packet storage 2026-07-25 05:58:55 +02:00
UpdateMotion.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
UpdatePosition.cs feat(net): port retail physics spawn and event timestamps 2026-07-14 00:22:17 +02:00
VectorUpdate.cs fix(net): VectorUpdate parser was reading guid from opcode bytes — remote jumps invisible 2026-04-26 21:51:36 +02:00
WeenieErrorText.cs docs(ui): repair retail fidelity ledger 2026-07-10 17:05:12 +02:00