refactor(D.5.4): rename ItemRepository->ClientObjectTable, ItemInstance->ClientObject

Broaden naming to the data side of every server object (retail weenie_object_table
shape). Pure rename; no behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-18 15:33:03 +02:00
parent 2fc253d9ff
commit b506f53633
8 changed files with 142 additions and 145 deletions

View file

@ -11,7 +11,7 @@ namespace AcDream.Core.Net;
/// <summary>
/// Central registration point that wires every parsed GameEvent from
/// <see cref="GameEventDispatcher"/> into the appropriate Core state
/// class (<see cref="ItemRepository"/>, <see cref="CombatState"/>,
/// class (<see cref="ClientObjectTable"/>, <see cref="CombatState"/>,
/// <see cref="Spellbook"/>, <see cref="ChatLog"/>).
///
/// <para>
@ -32,7 +32,7 @@ public static class GameEventWiring
{
public static void WireAll(
GameEventDispatcher dispatcher,
ItemRepository items,
ClientObjectTable items,
CombatState combat,
Spellbook spellbook,
ChatLog chat,
@ -251,7 +251,7 @@ public static class GameEventWiring
var p = AppraiseInfoParser.TryParse(e.Payload.Span);
if (p is null || !p.Value.Success) return;
// Merge parsed properties into the item if we know about it.
if (items.GetItem(p.Value.Guid) is not null)
if (items.Get(p.Value.Guid) is not null)
items.UpdateProperties(p.Value.Guid, p.Value.Properties);
// Spellbook from appraise: for caster items / scrolls this is
// the cast-on-use list. The local player's full learned
@ -400,7 +400,7 @@ public static class GameEventWiring
Console.WriteLine($"vitals: PD-ench spell={ench.SpellId} layer={ench.Layer} bucket={ench.Bucket} key={ench.StatModKey} val={ench.StatModValue}");
}
// Issue #13 — register inventory entries with ItemRepository so
// Issue #13 — register inventory entries with ClientObjectTable so
// panels (inventory, paperdoll, hotbars) light up after login.
// Equipped entries share the same ObjectId as inventory entries
// (an equipped item is also in inventory) — register both, but
@ -408,9 +408,9 @@ public static class GameEventWiring
// MoveItem so paperdoll can render.
foreach (var inv in p.Value.Inventory)
{
if (items.GetItem(inv.Guid) is null)
if (items.Get(inv.Guid) is null)
{
items.AddOrUpdate(new ItemInstance
items.AddOrUpdate(new ClientObject
{
ObjectId = inv.Guid,
WeenieClassId = inv.ContainerType,
@ -419,9 +419,9 @@ public static class GameEventWiring
}
foreach (var eq in p.Value.Equipped)
{
if (items.GetItem(eq.Guid) is null)
if (items.Get(eq.Guid) is null)
{
items.AddOrUpdate(new ItemInstance
items.AddOrUpdate(new ClientObject
{
ObjectId = eq.Guid,
WeenieClassId = 0,