style(format): dart format 자동 포맷 적용
Some checks are pending
CI / analyze-and-test (push) Waiting to run

- combat_tick_service, error_logger, save_integrity: 줄바꿈/정렬
- monetization_state_test, save_integrity_test: 포맷 정리
- macos/Podfile.lock: flutter pub get 반영
This commit is contained in:
JiWoong Sul
2026-03-31 14:22:20 +09:00
parent 68a5848510
commit 96fd5e43d9
6 changed files with 73 additions and 26 deletions

View File

@@ -179,12 +179,14 @@ class CombatTickService {
if (monsterStats.isAlive &&
monsterAccumulator >= monsterStats.attackDelayMs) {
// 방어력/회피율 버프 적용
final buffedPlayerForDefense = (buffMods.defMod != 0 ||
buffMods.evasionMod != 0)
final buffedPlayerForDefense =
(buffMods.defMod != 0 || buffMods.evasionMod != 0)
? playerStats.copyWith(
def: (playerStats.def * (1.0 + buffMods.defMod)).round(),
evasion: (playerStats.evasion + buffMods.evasionMod)
.clamp(0.0, 1.0),
evasion: (playerStats.evasion + buffMods.evasionMod).clamp(
0.0,
1.0,
),
)
: playerStats;

View File

@@ -122,8 +122,7 @@ class ErrorLogger {
if (size <= maxLogBytes) return;
final dir = file.parent.path;
final baseName =
_logFileName.replaceAll('.jsonl', '');
final baseName = _logFileName.replaceAll('.jsonl', '');
// 가장 오래된 백업 삭제
final oldest = File('$dir/$baseName.$maxBackupCount.jsonl');

View File

@@ -21,18 +21,60 @@ class SaveIntegrity {
static List<int> get _hmacKey {
// 파트 A: 원본 키의 전반부
const partA = <int>[
0x41, 0x73, 0x63, 0x69, 0x69, 0x4e, 0x65, 0x76,
0x65, 0x72, 0x44, 0x69, 0x65, 0x53, 0x61, 0x76,
0x41,
0x73,
0x63,
0x69,
0x69,
0x4e,
0x65,
0x76,
0x65,
0x72,
0x44,
0x69,
0x65,
0x53,
0x61,
0x76,
];
// 파트 B: XOR 마스크(mask)
const mask = <int>[
0x7a, 0x1c, 0x0f, 0x05, 0x0d, 0x22, 0x09, 0x1a,
0x09, 0x1e, 0x28, 0x05, 0x09, 0x3f, 0x0d, 0x1a,
0x7a,
0x1c,
0x0f,
0x05,
0x0d,
0x22,
0x09,
0x1a,
0x09,
0x1e,
0x28,
0x05,
0x09,
0x3f,
0x0d,
0x1a,
];
// 파트 C: partA XOR mask 결과 (키 후반부)
const partC = <int>[
0x3b, 0x6f, 0x6c, 0x6c, 0x64, 0x6c, 0x6c, 0x6c,
0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c,
0x3b,
0x6f,
0x6c,
0x6c,
0x64,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
0x6c,
];
// 전반부(partA) + 후반부(partC XOR mask)로 32바이트 키 생성
@@ -107,10 +149,7 @@ class SaveIntegrity {
/// HMAC 검증 결과(result)
class SaveIntegrityResult {
const SaveIntegrityResult({
required this.gzipBytes,
required this.isLegacy,
});
const SaveIntegrityResult({required this.gzipBytes, required this.isLegacy});
/// HMAC을 제외한 순수 GZip 데이터
final Uint8List gzipBytes;