From 7e0e4ecd6db57a02742373298ece3e4a17868c5a Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 15 May 2024 01:29:07 -0400 Subject: [PATCH] Call saveSystem on gacha pull outside of current battle --- src/ui/egg-gacha-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 5626405da..a7fd61b30 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -372,7 +372,7 @@ export default class EggGachaUiHandler extends MessageUiHandler { this.scene.gameData.gameStats.eggsPulled++; } - this.scene.gameData.saveAll(this.scene, true, true, true).then(success => { + (this.scene.currentBattle ? this.scene.gameData.saveAll(this.scene, true, true, true) : this.scene.gameData.saveSystem()).then(success => { if (!success) return this.scene.reset(true); doPull();