From f84654263e4f2eaf943e33ff800468f77054cb1c Mon Sep 17 00:00:00 2001 From: Hikari Date: Fri, 6 Mar 2026 23:28:45 -0800 Subject: [PATCH] fix: apply boss bounty runestones to local client state immediately Without this, the client would auto-save stale state (runestones: 0) after a first-kill bounty, causing the server's validateAndSanitize to overwrite the correctly-persisted DB value back to zero. --- apps/web/src/context/GameContext.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/web/src/context/GameContext.tsx b/apps/web/src/context/GameContext.tsx index d34e284..37441e5 100644 --- a/apps/web/src/context/GameContext.tsx +++ b/apps/web/src/context/GameContext.tsx @@ -463,6 +463,12 @@ export const GameProvider = ({ children }: { children: React.ReactNode }): React crystals: prev.resources.crystals + result.rewards.crystals, } : prev.resources, + prestige: result.rewards?.bountyRunestones + ? { + ...prev.prestige, + runestones: prev.prestige.runestones + result.rewards.bountyRunestones, + } + : prev.prestige, player: result.rewards ? { ...prev.player,