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.
59 lines
1.5 KiB
C#
59 lines
1.5 KiB
C#
using System;
|
|
using LitJson;
|
|
|
|
namespace Wizard;
|
|
|
|
public class GatheringMyPageInfo
|
|
{
|
|
public bool IsEntry { get; private set; }
|
|
|
|
public bool IsDeckEntry { get; private set; }
|
|
|
|
public bool IsBattleFinish { get; private set; }
|
|
|
|
public bool IsMatchingNotification { get; set; }
|
|
|
|
public bool IsOpening { get; private set; }
|
|
|
|
public string FinishTime { get; private set; }
|
|
|
|
public string DeckEntryFinishTime { get; private set; }
|
|
|
|
public GatheringMyPageInfo()
|
|
{
|
|
}
|
|
|
|
public GatheringMyPageInfo(JsonData data, double serverTime)
|
|
{
|
|
IsEntry = data["is_entry"].ToInt() == 1;
|
|
if (data.Keys.Contains("battle_end_time"))
|
|
{
|
|
if (data.TryGetValue("battle_end_time", out var value))
|
|
{
|
|
FinishTime = ConvertTime.ToLocal(DateTime.Parse(value.ToString())).ToString();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
FinishTime = string.Empty;
|
|
}
|
|
if (data.Keys.Contains("battle_begin_time"))
|
|
{
|
|
double num = ConvertTime.DateTimeToUnixTime(DateTime.Parse(data["battle_begin_time"].ToString()));
|
|
if (data.TryGetValue("battle_end_time", out var value2))
|
|
{
|
|
double num2 = ConvertTime.DateTimeToUnixTime(DateTime.Parse(value2.ToString()));
|
|
IsBattleFinish = serverTime > num2;
|
|
}
|
|
else
|
|
{
|
|
IsBattleFinish = false;
|
|
IsOpening = true;
|
|
}
|
|
IsDeckEntry = serverTime < num;
|
|
DeckEntryFinishTime = ConvertTime.ToLocal(DateTime.Parse(data["battle_begin_time"].ToString())).ToString();
|
|
}
|
|
IsMatchingNotification = !string.IsNullOrEmpty(data.GetValueOrDefault("matching_established_message", string.Empty));
|
|
}
|
|
}
|