From 017f2fdb914f0df38a24fb2a512db0cf0f3d033d Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Mon, 30 Mar 2026 23:12:12 +0900 Subject: [PATCH] =?UTF-8?q?fix(buff):=20UI=20=EB=82=A8=EC=9D=80=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=20=ED=91=9C=EC=8B=9C=EA=B0=80=20elapsedMs=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=EC=9D=B4=EB=8D=98=20=EB=88=84=EB=9D=BD=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - enhanced_animation_panel: 버프 남은 시간 계산을 DateTime.now() 기준으로 변경 - game_session_controller: autoRevive 만료 체크도 실제 시간 기준으로 변경 - 좌상단/우상단에 타임스탬프 원시값이 표시되던 문제 해결 --- lib/src/features/game/game_session_controller.dart | 5 +++-- .../features/game/widgets/enhanced_animation_panel.dart | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/src/features/game/game_session_controller.dart b/lib/src/features/game/game_session_controller.dart index 7586c18..5874e14 100644 --- a/lib/src/features/game/game_session_controller.dart +++ b/lib/src/features/game/game_session_controller.dart @@ -247,9 +247,10 @@ class GameSessionController extends ChangeNotifier { _monetization = _monetization.copyWith(speedBoostEndMs: null); } - // 자동부활 버프 만료 체크 + // 자동부활 버프 만료 체크 (실제 시간 기준) final endMs = _monetization.autoReviveEndMs; - if (endMs != null && elapsedMs >= endMs) { + final now = DateTime.now().millisecondsSinceEpoch; + if (endMs != null && now >= endMs) { _monetization = _monetization.copyWith(autoReviveEndMs: null); debugPrint('[GameSession] Auto-revive buff expired'); notifyListeners(); diff --git a/lib/src/features/game/widgets/enhanced_animation_panel.dart b/lib/src/features/game/widgets/enhanced_animation_panel.dart index a221370..02e0d60 100644 --- a/lib/src/features/game/widgets/enhanced_animation_panel.dart +++ b/lib/src/features/game/widgets/enhanced_animation_panel.dart @@ -214,19 +214,19 @@ class _EnhancedAnimationPanelState extends State int? get _currentMonsterHpMax => widget.progress.currentCombat?.monsterStats.hpMax; - /// 자동부활 버프 남은 시간 (ms) + /// 자동부활 버프 남은 시간 (ms) — 실제 시간(wall clock) 기준 int get _autoReviveRemainingMs { final endMs = widget.autoReviveEndMs; if (endMs == null) return 0; - final remaining = endMs - widget.skillSystem.elapsedMs; + final remaining = endMs - DateTime.now().millisecondsSinceEpoch; return remaining > 0 ? remaining : 0; } - /// 5배속 버프 남은 시간 (ms) + /// 5배속 버프 남은 시간 (ms) — 실제 시간(wall clock) 기준 int get _speedBoostRemainingMs { final endMs = widget.speedBoostEndMs; if (endMs == null) return 0; - final remaining = endMs - widget.skillSystem.elapsedMs; + final remaining = endMs - DateTime.now().millisecondsSinceEpoch; return remaining > 0 ? remaining : 0; }