feat(net): GameEventWiring — one-call glue from dispatcher to Core state
Central registration helper that wires every parsed GameEvent from the Phase F.1 dispatcher into the appropriate Core state class: - ChannelBroadcast / Tell / CommunicationTransientString / PopupString → ChatLog (H.1) - UpdateHealth / Victim / Defender / Attacker / EvasionAttacker / EvasionDefender / AttackDone → CombatState (E.4) - MagicUpdateSpell / MagicRemoveSpell / MagicUpdateEnchantment / MagicRemoveEnchantment / MagicDispelEnchantment / MagicPurgeEnchantments → Spellbook (E.5) - WieldObject / InventoryPutObjInContainer → ItemRepository (F.2) This is the piece that makes the dispatcher go from "thing that routes opcodes" to "thing that populates state the UI can redraw from". Before this, every handler had to be wired at each call site; now one call at startup (or per-reconnect) does the whole map. Project graph: added AcDream.Core.Net → AcDream.Core ProjectReference so the wiring can see both the dispatcher (Net) and the state classes (Core). Net's own tests already pull in Core indirectly, so test scope is unchanged. Tests (6 new, in Core.Net.Tests): verify round-trip via the actual dispatcher. Build envelope → dispatch → assert the correct Core state change. Covers ChannelBroadcast, UpdateHealth, MagicUpdateSpell, WieldObject, PopupString, MagicPurgeEnchantments. Build green, 602 tests pass (up from 596). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a28a69af71
commit
83e0e4f9ca
3 changed files with 304 additions and 0 deletions
|
|
@ -7,4 +7,7 @@
|
|||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<RootNamespace>AcDream.Core.Net</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AcDream.Core\AcDream.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue