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