Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Data.TableData.Ranking/RankingPeriod.cs
gamer147 957af3d1ec feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
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.
2026-06-05 17:22:20 -04:00

71 lines
1.2 KiB
C#

using System;
using LitJson;
namespace Wizard.Scripts.Network.Data.TableData.Ranking;
public class RankingPeriod
{
public int id;
public int periodNum;
public bool hasHistory;
public DateTime beginTime;
public string endTime;
public int _detailType;
public int IsAfter460;
private const string TYPE_KEY = "type";
private const string KEY_460 = "over_460";
public RankingPeriod()
{
Initialize();
}
public bool IsSamePeriod(RankingPeriod time)
{
if (time.beginTime == beginTime)
{
return time.endTime == endTime;
}
return false;
}
public RankingPeriod(JsonData data)
{
if (data == null)
{
Initialize();
return;
}
id = data["id"].ToInt();
periodNum = data["period_num"].ToInt();
hasHistory = true;
beginTime = DateTime.Parse(data["begin_time"].ToString());
endTime = data["end_time"].ToString();
if (data.Keys.Contains("type"))
{
_detailType = data["type"].ToInt();
}
if (data.TryGetValue("over_460", out var value))
{
IsAfter460 = value.ToInt();
}
}
private void Initialize()
{
id = 0;
periodNum = 0;
hasHistory = false;
beginTime = new DateTime(0L);
endTime = "";
}
}