You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if pickup, ok := registry.GroundItemPickupFor(collectorID, collector, groundVID); ok || pickup.GoldAmount != 0 {
15816
+
t.Fatalf("expected stale far collector snapshot ground-gold pickup to fail closed even after registered collector moved near, got ok=%v pickup=%+v", ok, pickup)
15817
+
}
15818
+
if removed := registry.RemoveGroundItem(collectorID, collector, groundVID); removed {
15819
+
t.Fatal("expected stale far collector snapshot ground-gold removal to fail closed even after registered collector moved near")
15820
+
}
15821
+
if !registry.GroundItemExists(groundVID) {
15822
+
t.Fatal("expected rejected stale far snapshot ground-gold pickup/removal to leave ground gold registered")
Copy file name to clipboardExpand all lines: spec/protocol/non-player-reward-bootstrap.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,7 @@ Ground reward registration re-checks the registered owner snapshot before trusti
133
133
Lookup, pickup-resolution, and removal also re-check the registered collector snapshot before trusting the caller-supplied character copy, so a stale collector snapshot cannot see, resolve, or remove item-shaped or gold-shaped reward ground entries after that collector has already reached the bootstrap `0`-HP floor, changed selected-character identity (`id`, `vid`, or name), or moved out of the exact runtime location represented by the supplied pickup attempt.
134
134
Dedicated coverage now freezes the gold-shaped reward half of stale collector-identity, stale collector-location, stale owner-identity owner-delivery, and stale owner-location owner-delivery cases, not just ordinary item-shaped drops, because both reward families share the same ground-entry visibility/pickup seam.
135
135
This guard applies in both directions for item-shaped and gold-shaped rewards: a stale near snapshot cannot pick up after the registered collector has moved away or rebound to a different selected-character identity, and a stale far snapshot cannot become valid merely because the registered collector later moved near the ground reward.
136
+
Dedicated shared-world coverage freezes the stale-far-then-near case for both item-shaped drops and gold-shaped ground rewards: the stale snapshot cannot resolve pickup or remove the ground entry, and the reward remains registered for a fresh current pickup attempt.
136
137
When that living, identity-current, and currently reachable collector succeeds, the collector receives the ordinary self pickup shape (`ITEM_GROUND_DEL`, inventory `ITEM_SET`, and normal `ITEM_GET` feedback) and the dead, rebound, or relocated owner receives no queued party-style pickup feedback.
137
138
138
139
This keeps death/restart cleanup and concurrent movement from leaking new pickup surfaces, stale delete noise, debug/runtime-visible pickup affordances, stale collector pickup affordances, stale owner-location ground registration, transfer-entry ground visibility, or late owner-delivery mutations for players that are already dead or no longer at the supplied reward location.
0 commit comments