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.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Ranking;
|
||||
|
||||
public class MyMasterRanking
|
||||
{
|
||||
public int periodId;
|
||||
|
||||
public int periodNum;
|
||||
|
||||
public DateTime beginTime;
|
||||
|
||||
public string endTime;
|
||||
|
||||
public bool isCalculated;
|
||||
|
||||
public int rank;
|
||||
|
||||
public int score;
|
||||
|
||||
public int _masterRankId;
|
||||
|
||||
public MyMasterRanking(JsonData periods, JsonData histories)
|
||||
{
|
||||
if (periods == null || histories == null)
|
||||
{
|
||||
Initialize();
|
||||
return;
|
||||
}
|
||||
periodId = periods["id"].ToInt();
|
||||
periodNum = periods["period_num"].ToInt();
|
||||
beginTime = DateTime.Parse(periods["begin_time"].ToString());
|
||||
endTime = periods["end_time"].ToString();
|
||||
isCalculated = periods["is_calculated"].ToBoolean();
|
||||
JsonData jsonData = histories[periodId.ToString()];
|
||||
rank = jsonData["rank"].ToInt();
|
||||
score = jsonData["score"].ToInt();
|
||||
if (jsonData.Keys.Contains("rank_id"))
|
||||
{
|
||||
_masterRankId = jsonData["rank_id"].ToInt();
|
||||
}
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
periodId = 0;
|
||||
periodNum = 0;
|
||||
beginTime = default(DateTime);
|
||||
endTime = string.Empty;
|
||||
isCalculated = false;
|
||||
rank = 0;
|
||||
score = 0;
|
||||
_masterRankId = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
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 = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Ranking;
|
||||
|
||||
public class RankingPeriodList : HeaderData
|
||||
{
|
||||
public List<RankingPeriod> Master { get; private set; }
|
||||
|
||||
public List<RankingPeriod> RankMatchClass { get; private set; }
|
||||
|
||||
public List<RankingPeriod> TwoPick { get; private set; }
|
||||
|
||||
public List<RankingPeriod> Sealed { get; private set; }
|
||||
|
||||
public List<RankingPeriod> CrossoverMasterPoint { get; private set; }
|
||||
|
||||
public List<RankingPeriod> CrossoverClassWin { get; private set; }
|
||||
|
||||
public RankingPeriodList(JsonData data)
|
||||
{
|
||||
Master = ToPeriodList(data["master_point"]);
|
||||
RankMatchClass = ToPeriodList(data["rank_match"]);
|
||||
TwoPick = ToPeriodList(data["two_pick"]);
|
||||
Sealed = ToPeriodList(data["sealed"]);
|
||||
if (data.TryGetValue("crossover_master_point", out var value))
|
||||
{
|
||||
CrossoverMasterPoint = ToPeriodList(value);
|
||||
}
|
||||
if (data.TryGetValue("crossover_rank_match", out var value2))
|
||||
{
|
||||
CrossoverClassWin = ToPeriodList(value2);
|
||||
}
|
||||
}
|
||||
|
||||
private static List<RankingPeriod> ToPeriodList(JsonData data)
|
||||
{
|
||||
List<RankingPeriod> list = new List<RankingPeriod>();
|
||||
foreach (JsonData item in (IEnumerable)data)
|
||||
{
|
||||
list.Add(new RankingPeriod(item));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Ranking;
|
||||
|
||||
public class RankingUser
|
||||
{
|
||||
public int viewerId;
|
||||
|
||||
public int rankingRank;
|
||||
|
||||
public int score;
|
||||
|
||||
public string name;
|
||||
|
||||
public string countryCode;
|
||||
|
||||
public int rank;
|
||||
|
||||
public long emblemId;
|
||||
|
||||
public int degreeId;
|
||||
|
||||
public DateTime lastPlayTime;
|
||||
|
||||
public RankingUser(JsonData data)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
Initialize();
|
||||
return;
|
||||
}
|
||||
viewerId = data["viewer_id"].ToInt();
|
||||
rankingRank = data["ranking_rank"].ToInt();
|
||||
score = data["score"].ToInt();
|
||||
name = data["name"].ToString();
|
||||
countryCode = (string)data["country_code"];
|
||||
rank = data["rank"].ToInt();
|
||||
emblemId = data["emblem_id"].ToLong();
|
||||
degreeId = data["degree_id"].ToInt();
|
||||
string text = data["last_play_time"].ToString();
|
||||
lastPlayTime = (string.IsNullOrEmpty(text) ? default(DateTime) : DateTime.Parse(text));
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
viewerId = 0;
|
||||
rankingRank = 0;
|
||||
score = 0;
|
||||
rank = 0;
|
||||
name = "";
|
||||
countryCode = "";
|
||||
emblemId = 0L;
|
||||
degreeId = 0;
|
||||
lastPlayTime = new DateTime(0L);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user