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; }