nightward/Assets/ResWork/Table/table_album.cs

40 lines
1.3 KiB
C#
Raw Normal View History

2025-11-25 19:58:58 +00:00
using GUPS.AntiCheat.Protected;
using Newtonsoft.Json;
using System.Collections.Generic;
public class albumtabledata : ShowAlbumBase
{
public int n_Index;
ProtectedInt32 _GirlID; public int n_GirlID { get { return _GirlID; } set { _GirlID = value; _GirlID.Obfuscate(); } }
ProtectedInt32 _Price; public int n_Price { get { return _Price; } set { _Price = value; _Price.Obfuscate(); } }
}
public class table_album : table_base
{
public static table_album Ins;
List<albumtabledata> tableDatas;
Dictionary<int, List<albumtabledata>> dic_datas = new Dictionary<int, List<albumtabledata>>();
protected override void Awake()
{
Ins = this;
base.Awake();
}
protected override void Start()
{
tableDatas = JsonConvert.DeserializeObject<List<albumtabledata>>(json_last);
for (int i = 0; i < tableDatas.Count; i++)
{
var temp = tableDatas[i];
if (!dic_datas.ContainsKey(temp.n_GirlID))
dic_datas.Add(temp.n_GirlID, new List<albumtabledata>());
dic_datas[temp.n_GirlID].Add(temp);
}
base.Start();
}
public List<albumtabledata> Get_DataList() { return tableDatas; }
public List<albumtabledata> Get_DataList(int girl) { return dic_datas[girl]; }
}