[P2][D12] 掉落音效:dropsound / dropsfxframe 接入 AudioManager #421

Closed
opened 2026-09-24 03:25:58 +00:00 by troytt · 1 comment
Owner

现状

审计确认 AudioManager 存在但掉落路径完全未调用,物品落地无声。

1.13c 真实行为

Weapons.txt / Armor.txt / Misc.txt 每个基底带 dropsound 与 dropsfxframe 两列,
音效在 flippy 动画的第 dropsfxframe 帧触发(金属、皮甲、药水、符文、金币各不相同)。

验收标准

  • ItemBase 解析保留 dropsound / dropsfxframe。
  • flippy 弹跳推进到 dropsfxframe 时调用 AudioManager.play()。
  • 金币使用 gold 系音效,拾取音效(usesound)一并接入。
  • vitest:断言指定基底在指定帧触发了对应音效 id(mock AudioManager)。
## 现状 审计确认 `AudioManager` 存在但掉落路径完全未调用,物品落地无声。 ## 1.13c 真实行为 `Weapons.txt` / `Armor.txt` / `Misc.txt` 每个基底带 `dropsound` 与 `dropsfxframe` 两列, 音效在 flippy 动画的第 `dropsfxframe` 帧触发(金属、皮甲、药水、符文、金币各不相同)。 ## 验收标准 - [ ] `ItemBase` 解析保留 `dropsound` / `dropsfxframe`。 - [ ] flippy 弹跳推进到 `dropsfxframe` 时调用 `AudioManager.play()`。 - [ ] 金币使用 `gold` 系音效,拾取音效(`usesound`)一并接入。 - [ ] vitest:断言指定基底在指定帧触发了对应音效 id(mock AudioManager)。
troytt added this to the [M18] 打怪掉落物品:怪物死亡掉落全链路 1.13c 还原 milestone 2026-09-24 03:25:58 +00:00
Author
Owner

Resolution Summary (Issue #421 — Commit 9022579)

  • Parsed dropsound and dropsfxframe across src/game/weapons.ts, src/game/armor.ts, and src/game/misc-items.ts.\n- Triggered AudioManager.playSfx at dropsfxframe during ground item flippy bounce in src/game/ground-items.ts and src/scene/act-scene.ts.

  • Verification: npx tsc --noEmit (0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), and scripts/verify-m5.ts / scripts/verify-net.ts (0 problems).

### Resolution Summary (Issue #421 — Commit `9022579`) - Parsed `dropsound` and `dropsfxframe` across `src/game/weapons.ts`, `src/game/armor.ts`, and `src/game/misc-items.ts`.\n- Triggered `AudioManager.playSfx` at `dropsfxframe` during ground item flippy bounce in `src/game/ground-items.ts` and `src/scene/act-scene.ts`. - **Verification**: `npx tsc --noEmit` (0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), and `scripts/verify-m5.ts` / `scripts/verify-net.ts` (0 problems).
Sign in to join this conversation.
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#421
No description provided.