docs(D.2b): IsCarriedBy — note WielderId is wire-only; optimistic wields detected via ContainerId

Code-review minor: prevents a future WielderId-only 'is this wielded?' check
from silently missing an optimistically-wielded item (WielderId==0 until the
server confirm; ContainerId==wielder is the live signal).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-22 22:18:10 +02:00
parent c1a84cbe0c
commit c5c636674d

View file

@ -482,6 +482,10 @@ public sealed class ClientObjectTable
return total;
}
// NOTE: WielderId is populated from wire data only (CreateObject → Ingest). An
// optimistically-wielded item (WieldItemOptimistic, before the server confirm) has
// WielderId == 0 and is detected via the ContainerId walk below (ContainerId == wielder).
// A future "is this wielded by me?" check must therefore use ContainerId, NOT WielderId alone.
private bool IsCarriedBy(ClientObject o, uint ownerGuid)
{
if (o.WielderId == ownerGuid) return true;