fix(client): ground items cannot be picked up and holding Alt does not display ground item labels (#555) #560
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix/issue-555-ground-item-pickup-and-alt-labels"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes #555: Ground items on the ground cannot be picked up, and holding Alt does not display ground item names/labels.
Root Causes
src/client/main.ts, a capture-phase key listener callede.stopImmediatePropagation()whenCommandMapper.handleKeyDownreturned true for Alt, preventingHudManager's bubble listener from receiving Alt.this.hudManager.showGroundLabels = true/falsedirectly fromCommandMapper.handleKeyDown/handleKeyUp, and addingresetModifiers()on window blur.layoutGroundItemLabelswas never called in the render loop.layoutGroundItemLabels, and drawing the dark translucent label plaques with 1.13c quality colors (gold, unique, set, rare, magic, normal) and bilingual English/Chinese text.CommandMapper.resolvePointerTarget, prioritize hit-testinghudManager.groundItemLabelBoxesso clicking anywhere on the overhead label box immediately targets and picks up that item.mode: 0ormode: 12).dist > 4,CommandMapper.tick()watchespendingItemPickupIdand automatically dispatchesItemPickup(0x16) as soon as the player walks within 4 subtiles.src/netproto/d2gs/s2c/units.ts, mapped 0x11 ReportKill monster kills tomode: 12(MONMODE_DEAD) instead of raw 0x09.Verification
tests/client/ground-item-pickup-and-alt-labels-555.test.ts(6/6 passing).