ThreeKingdomsSlingshot/Assets/Scripts/OutGame/Trade/TradeState.cs

99 lines
3.6 KiB
C#
Raw Normal View History

거래 상품 · 거래 UI 재설계 — 탭 4개(명장 등용 · 패키지 · 상점 · 패스) · 성장 패스 3권 · 월정액 2장 · 패키지 · 오늘의 상점 9칸 · 보옥 · 골드 · 누적 결제 · 시험 결제(PD 2026-11-26 「커밋 · 푸시」) - 표 = Resources/ContentModes/trade_*.csv 11장(기획 tables/_trade_v1 사본 · 값 그대로) · 새 낱말 supply_ticket(goods_awaken_evolve) · hero_r3_pick · 누적 결제 꾸미기 4종(costume_items) - 규칙 = OutGame/Trade(TradeRules · TradeData · TradeState · TradeStore = 기기 세이브 모드 시험 결제 · 구글 플레이 = 인터페이스만) · 세이브 SaveData.trade · 서버 모드 = 막음(후속) - 화면(PD 확정안) = 패키지 1차 A + V1 양피지 · 상점 A-2 + V2 인트로 게시판 · 패스 A-2 + V4 주문서 묶음 · 월정액 = 훈련장 배너 짜임 · 위 탭 = 명패 · 글자 = UI/Trade/trade_text.csv 키 - 그림 = 그림 세션 납품 37장(art · icons · 꾸미기 · 뽑기 · 훈련장 화풍으로 다시 그림) · 판 그림 8장(UI/Trade/ui) = 시안 임시 - 정리 = 보물 상자 탭 · 승급 장비 상점 · 떠돌이 상인 창 · 스텁 버튼 삭제 · 상자 포인트 구매 → 보물 > 상자 · 광고 제거 · 월정액 혜택 연결 · 보급전 입장권 1장 = 1회 더 - 시험 = TradeTests 14 통과 · UILayerTests 캔버스 통과 - 다른 세션 미커밋 변경은 넣지 않음(OutGameRoot · UICaptureDriver = 이 작업 줄만) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:59:28 +00:00
using System;
using System.Collections.Generic;
namespace TKS.OutGame
{
/// <summary>결제 1건(기기 세이브 모드 = 시험 결제 · 서버 모드 = 영수증 검증 뒤 서버가 기록 — 후속).</summary>
[Serializable]
public class TradePay
{
public string product = "";
public int krw;
public string at = "";
public bool test;
}
/// <summary>한도가 있는 구매 기록(상품 id × 기간 키 — once · D날 · W주 · M달).</summary>
[Serializable]
public class TradeBuy
{
public string id = "";
public string period = "";
public int n;
}
/// <summary>월정액 1장(끝나는 날 = 날 번호 · 그날은 포함 안 함 · 받은 마지막 날).</summary>
[Serializable]
public class TradeMonthly
{
public string id = "";
public int endDay = -1;
public int lastClaimDay = -1;
}
/// <summary>성장 패스 1권(구매 · 받은 칸 번호 1~25).</summary>
[Serializable]
public class TradePass
{
public string id = "";
public bool bought;
public List<int> free = new List<int>();
public List<int> paid = new List<int>();
}
/// <summary>챕터 정복 패키지 1종 — openAt 빈칸 = 열리지 않고 지나감(다시 안 나옴) · closed = 다음 장 상품이 열려 닫힘 · seen = 패키지 탭에서 봄(빨간 점).</summary>
[Serializable]
public class TradeChapter
{
public string id = "";
public string openAt = "";
public bool bought;
public bool closed;
public bool seen;
}
/// <summary>오늘의 상점 칸 1개(trade_shop_daily 의 그 칸 후보 가운데 고른 줄 · ★1 · ★2 조각 = 굴릴 때 정한 영웅).</summary>
[Serializable]
public class TradeSlot
{
public int slot;
public int row = -1;
public string heroId = "";
public bool bought;
}
[Serializable]
public class TradeShop
{
public string day = "";
public int refreshes;
public List<TradeSlot> slots = new List<TradeSlot>();
}
/// <summary>거래 상품(PD 2026-11-26 · 기획서 2판) 세이브 — 결제 이력 · 누적 금액 · 한도 · 월정액 · 패스 · 챕터 정복 · 오늘의 상점 · 광고 제거.</summary>
[Serializable]
public class TradeState
{
public int spentKrw;
public List<TradePay> pays = new List<TradePay>();
public List<TradeBuy> buys = new List<TradeBuy>();
/// <summary>첫 구매 2배를 이미 쓴 보옥 상품.</summary>
public List<string> gemFirst = new List<string>();
public bool adFree;
/// <summary>첫 결제 「출사표」 산 날(날 번호 · −1 = 안 삼) · 받은 날 수(1~3).</summary>
public int firstPayDay = -1;
public int firstPayClaimed;
/// <summary>1-5 첫 클리어 뒤 로비 첫 결제 팝업을 띄웠는가(1회).</summary>
public bool firstPopupShown;
public List<TradeMonthly> monthly = new List<TradeMonthly>();
public List<TradePass> passes = new List<TradePass>();
public List<TradeChapter> chapters = new List<TradeChapter>();
public List<int> spendClaimed = new List<int>();
public TradeShop shop = new TradeShop();
/// <summary>월정액 혜택 「순찰 즉시 수확 하루 1회 무료」를 쓴 날(날 번호).</summary>
public int instantFreeDay = -1;
/// <summary>로비 「오늘 받기」 팝업을 띄운 날(날 번호 · 하루 1회).</summary>
public int welcomeDay = -1;
}
}