refactor(D.5.4): delete EnrichItem (superseded by Ingest merge-upsert)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cbbfe4cd49
commit
50cee50df1
2 changed files with 0 additions and 78 deletions
|
|
@ -143,37 +143,6 @@ public sealed class ClientObjectTable
|
|||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enrich an already-known object (a stub created from PlayerDescription) with the
|
||||
/// fuller data carried by its CreateObject (icon, name, type). Returns false if the
|
||||
/// object isn't tracked yet — phase 1 enriches existing objects only; full
|
||||
/// CreateObject ingestion of newly-acquired items is the inventory phase.
|
||||
/// Raises ObjectUpdated whenever the object is found (matching the
|
||||
/// UpdateProperties convention — it fires on found regardless of whether a field
|
||||
/// actually changed) so bound widgets (the toolbar) re-render.
|
||||
/// <para>
|
||||
/// D.5.1 (2026-06-17): also accepts <paramref name="iconOverlayId"/> and
|
||||
/// <paramref name="iconUnderlayId"/> from the extended WeenieHeader tail. Both
|
||||
/// default to 0 (not sent by server). IconComposer.GetIcon already composites
|
||||
/// underlay/base/overlay in the correct retail layer order and early-returns on 0.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public bool EnrichItem(uint objectId, uint iconId, string name, ItemType type,
|
||||
uint iconOverlayId = 0, uint iconUnderlayId = 0, uint effects = 0)
|
||||
{
|
||||
if (!_objects.TryGetValue(objectId, out var item)) return false;
|
||||
if (iconId != 0) item.IconId = iconId;
|
||||
if (!string.IsNullOrEmpty(name)) item.Name = name;
|
||||
if (type != default) item.Type = type;
|
||||
if (iconOverlayId != 0) item.IconOverlayId = iconOverlayId;
|
||||
if (iconUnderlayId != 0) item.IconUnderlayId = iconUnderlayId;
|
||||
// D.5.2: 0 is a meaningful "no effect" state (e.g. a caster out of mana),
|
||||
// so assign unconditionally — re-composition reflects the CURRENT state.
|
||||
item.Effects = effects;
|
||||
ObjectUpdated?.Invoke(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply a <see cref="PropertyBundle"/> patch (e.g. from an
|
||||
/// <c>IdentifyObjectResponse</c>) to an existing object. Individual
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue