When a potion is equipped, targetId is the instance uuid (equipped.id) compared against itemId ("healthPotion") — never matches.
equipItem already removed the stack from the bag, so even a correct id/itemId lookup would miss.
Result: pressing 1/2 in server mode with an equipped potion never calls gameServer.useItem. Characterized in dungeon-crawler.inventory-maze.spec.ts (wave 7 a1 tick 2).
Expected: send the equipped potion's inventory slot (or re-find by itemId / keep a server slot index) so the server can consume the stack.
`DungeonCrawlerComponent.dispatchPotionUseToServer` (used by `useHPPotion` / `useMPPotion` when `useServerAuthority` is true) looks up the bag slot with:
```ts
const targetId = equipped?.id ?? (kind === "hp" ? "healthPotion" : "manaPotion");
const slot = this.inventory.findIndex((it) => it?.itemId === targetId);
```
Two failures:
1. When a potion is equipped, `targetId` is the **instance uuid** (`equipped.id`) compared against `itemId` (`"healthPotion"`) — never matches.
2. `equipItem` already removed the stack from the bag, so even a correct `id`/`itemId` lookup would miss.
Result: pressing 1/2 in server mode with an equipped potion never calls `gameServer.useItem`. Characterized in `dungeon-crawler.inventory-maze.spec.ts` (wave 7 a1 tick 2).
Expected: send the equipped potion's inventory slot (or re-find by `itemId` / keep a server slot index) so the server can consume the stack.
Already present on spikersoft-angularmaster (48e93a23e). dispatchPotionUseToServer matches equipped.itemId (not the instance uuid) against bag slots. Closing.
Already present on `spikersoft-angular` `master` (`48e93a23e`). `dispatchPotionUseToServer` matches `equipped.itemId` (not the instance uuid) against bag slots. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
DungeonCrawlerComponent.dispatchPotionUseToServer(used byuseHPPotion/useMPPotionwhenuseServerAuthorityis true) looks up the bag slot with:Two failures:
targetIdis the instance uuid (equipped.id) compared againstitemId("healthPotion") — never matches.equipItemalready removed the stack from the bag, so even a correctid/itemIdlookup would miss.Result: pressing 1/2 in server mode with an equipped potion never calls
gameServer.useItem. Characterized indungeon-crawler.inventory-maze.spec.ts(wave 7 a1 tick 2).Expected: send the equipped potion's inventory slot (or re-find by
itemId/ keep a server slot index) so the server can consume the stack.Already present on
spikersoft-angularmaster(48e93a23e).dispatchPotionUseToServermatchesequipped.itemId(not the instance uuid) against bag slots. Closing.