Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
93 lines
1.9 KiB
C#
93 lines
1.9 KiB
C#
using System.Collections.Generic;
|
|
using LitJson;
|
|
using Wizard;
|
|
|
|
public class UserCrystalCount : HeaderData
|
|
{
|
|
private const string ORB_KEY = "orb";
|
|
|
|
public int total_crystal;
|
|
|
|
public int free_crystal;
|
|
|
|
public int charge_crystal;
|
|
|
|
public int red_ether;
|
|
|
|
public int rupy;
|
|
|
|
public int _spotcardPoint;
|
|
|
|
public string create_time;
|
|
|
|
public string update_time;
|
|
|
|
public string delete_time;
|
|
|
|
public string affected_rows;
|
|
|
|
public int last_payment_date;
|
|
|
|
public string _lastPaymentId;
|
|
|
|
public int _lastPaymentItemBuyNumber;
|
|
|
|
public List<SpecialCrystalInfo> SpecialCrystalInfo { get; private set; }
|
|
|
|
public bool EnableSpecialCrystal => SpecialCrystalInfo.Count > 0;
|
|
|
|
public bool NeedNewIcon
|
|
{
|
|
get
|
|
{
|
|
foreach (SpecialCrystalInfo item in SpecialCrystalInfo)
|
|
{
|
|
if (item.AvailablePurchaseCount > 0)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public RemainTime GetCloseTimeLimit()
|
|
{
|
|
int num = int.MaxValue;
|
|
RemainTime result = null;
|
|
foreach (SpecialCrystalInfo item in SpecialCrystalInfo)
|
|
{
|
|
if (item.RemainTime.Second < num)
|
|
{
|
|
num = item.RemainTime.Second;
|
|
result = item.RemainTime;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public void SetUserCrystalCount(JsonData data)
|
|
{
|
|
total_crystal = data["total_crystal"].ToInt();
|
|
free_crystal = data["free_crystal"].ToInt();
|
|
charge_crystal = data["crystal"].ToInt();
|
|
red_ether = data["red_ether"].ToInt();
|
|
rupy = data["rupy"].ToInt();
|
|
}
|
|
|
|
public void ParseSpecialCrystal(JsonData responseData)
|
|
{
|
|
SpecialCrystalInfo = new List<SpecialCrystalInfo>();
|
|
JsonData jsonData = responseData["data"];
|
|
if (jsonData.Keys.Contains("special_crystal_info"))
|
|
{
|
|
JsonData jsonData2 = jsonData["special_crystal_info"];
|
|
for (int i = 0; i < jsonData2.Count; i++)
|
|
{
|
|
SpecialCrystalInfo item = new SpecialCrystalInfo(jsonData2[i], responseData);
|
|
SpecialCrystalInfo.Add(item);
|
|
}
|
|
}
|
|
}
|
|
}
|