refactor(runtime): own magic and player state
Move the coupled Spellbook and LocalPlayerState into one Runtime-owned character graph, route content, live-session, retained UI, reset, and shutdown through that exact owner, and delete the duplicate desired-component snapshot from inventory state. Preserve synchronous retail update and reset ordering while adding independent-instance and retryable-failure coverage. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
d362172620
commit
d02a12ceac
16 changed files with 418 additions and 96 deletions
|
|
@ -8,6 +8,7 @@ using AcDream.Core.Player;
|
|||
using AcDream.Core.Social;
|
||||
using AcDream.Core.Spells;
|
||||
using AcDream.Runtime.Session;
|
||||
using AcDream.Runtime.Gameplay;
|
||||
|
||||
namespace AcDream.Runtime.Tests.Session;
|
||||
|
||||
|
|
@ -227,18 +228,16 @@ public sealed class LiveSessionEventRouterTests
|
|||
|
||||
private static LiveInventorySessionBindings NewInventoryBindings() => new(
|
||||
new ClientObjectTable(),
|
||||
new LocalPlayerState(),
|
||||
PlayerGuid: () => 0x50000001u,
|
||||
OnShortcuts: null,
|
||||
OnUseDone: null,
|
||||
ItemMana: new ItemManaState(),
|
||||
OnDesiredComponents: null,
|
||||
ExternalContainers: new ExternalContainerState());
|
||||
|
||||
private static LiveCharacterSessionBindings NewCharacterBindings(
|
||||
CombatState? combat = null) => new(
|
||||
combat ?? new CombatState(),
|
||||
new Spellbook(),
|
||||
new RuntimeCharacterState(),
|
||||
ResolveSkillFormulaBonus: null,
|
||||
OnSkillsUpdated: null,
|
||||
OnConfirmationRequest: null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue