using System; using System.Collections.Generic; using UnityEngine; namespace TKS.OutGame { /// /// 이벤트 세이브(PD 2026-11-19 「게임에 구현해」 · 기기 세이브 모드만 · PD 결정 ①) — 날짜 = EconomyRules.DayKey(게임 공통 0시 · PD 결정 ④). /// 출석 = 접속한 날 수 · 받은 칸 수 · 미션 · 룰렛 진행 = 카운터(누적 · 룰렛 회차 · 오늘) + 받은 목록. /// [Serializable] public class EventState { [Tooltip("첫 접속일(yyyyMMdd) — 오픈 기념 출석 · 7일 미션 기준")] public string firstDay = ""; [Tooltip("마지막 접속일 — 바뀌면 출석 칸 +1 · 오늘 카운터 · 일일 미션 · 광고 초기화")] public string lastDay = ""; public int att7Days; public int att7Got; public int att14Days; public int att14Got; [Tooltip("일일 14일 출석 회차(다 받으면 다음 접속일에 +1)")] public int att14Cycle; [Tooltip("첫 접속일부터 누적 카운터(7일 미션)")] public List counts = new List(); [Tooltip("받은 7일 미션(일차-순서)")] public List m7Got = new List(); [Tooltip("받은 점수 단계(n_point)")] public List m7Steps = new List(); [Tooltip("룰렛 회차(시작 날짜) — 표 roulette_start 가 바뀌면 룰렛 진행 초기화")] public string rouId = ""; public int pouch; public int draws; public int sinceFinal; public int sinceLimited; [Tooltip("지금 칸(마지막에 멈춘 칸)")] public int cursor; public List countGot = new List(); [Tooltip("룰렛 회차 시작부터 카운터(이벤트 미션 event)")] public List rouCounts = new List(); public List questGot = new List(); [Tooltip("오늘 받은 일일 이벤트 미션(n_order)")] public List questDayGot = new List(); [Tooltip("오늘 카운터(일일 이벤트 미션)")] public List dayCounts = new List(); public int adToday; [Tooltip("선물 팩 구매 수(n_order → 수 · 회차)")] public List packBought = new List(); /// 읽은 세이브의 빈 목록을 채운다(필드가 늘어난 구버전). public void Sanitize() { if (firstDay == null) firstDay = ""; if (lastDay == null) lastDay = ""; if (rouId == null) rouId = ""; if (counts == null) counts = new List(); if (m7Got == null) m7Got = new List(); if (m7Steps == null) m7Steps = new List(); if (countGot == null) countGot = new List(); if (rouCounts == null) rouCounts = new List(); if (questGot == null) questGot = new List(); if (questDayGot == null) questDayGot = new List(); if (dayCounts == null) dayCounts = new List(); if (packBought == null) packBought = new List(); } /// 룰렛 회차를 새로(복주머니 · 횟수 · 받은 보상 · 회차 카운터 · 팩). public void ResetRoulette(string id) { rouId = id ?? ""; pouch = draws = sinceFinal = sinceLimited = cursor = 0; countGot.Clear(); rouCounts.Clear(); questGot.Clear(); packBought.Clear(); } } }