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.
86 lines
2.0 KiB
C#
86 lines
2.0 KiB
C#
using System.Collections.Generic;
|
|
using LitJson;
|
|
|
|
namespace Wizard.Scripts.Network.Data.TableData.Arena.TwoPick;
|
|
|
|
public class CandidateChaos
|
|
{
|
|
public class ChaosCharaData
|
|
{
|
|
public int ChaosId;
|
|
|
|
public int ClassId;
|
|
|
|
public int CharaId;
|
|
|
|
public int[] SourceClassIds;
|
|
}
|
|
|
|
private const int CHAOS_CHARA_DATA_NUM = 3;
|
|
|
|
public ChaosCharaData[] CharaData;
|
|
|
|
public int SelectedChaosId;
|
|
|
|
public int SelectedCharaId;
|
|
|
|
public int SelectedClassId;
|
|
|
|
public CandidateChaos()
|
|
{
|
|
}
|
|
|
|
public CandidateChaos(JsonData chaosInfoData, JsonData classInfoData)
|
|
{
|
|
CharaData = new ChaosCharaData[3];
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
CharaData[i] = GetChaosCharaData(chaosInfoData, classInfoData[$"chaos_id_{i + 1}"].ToString());
|
|
}
|
|
}
|
|
|
|
public CandidateChaos(JsonData chaosInfoData, List<string> idList)
|
|
{
|
|
CharaData = new ChaosCharaData[3];
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
CharaData[i] = GetChaosCharaData(chaosInfoData, idList[i]);
|
|
}
|
|
}
|
|
|
|
public CandidateChaos(JsonData data)
|
|
{
|
|
SelectedChaosId = data["selected_chaos_id"].ToInt();
|
|
SelectedCharaId = data["selected_leader_skin_id"].ToInt();
|
|
SelectedClassId = data["selected_class_id"].ToInt();
|
|
CharaData = new ChaosCharaData[3];
|
|
JsonData chaosInfoData = data["chaos_info"];
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
CharaData[i] = GetChaosCharaData(chaosInfoData, data[$"chaos_id_{i + 1}"].ToString());
|
|
}
|
|
}
|
|
|
|
public static ChaosCharaData GetChaosCharaData(JsonData chaosInfoData, string chaosIdString)
|
|
{
|
|
if (!chaosInfoData.TryGetValue(chaosIdString, out var value))
|
|
{
|
|
return null;
|
|
}
|
|
ChaosCharaData chaosCharaData = new ChaosCharaData
|
|
{
|
|
ChaosId = value["chaos_id"].ToInt(),
|
|
ClassId = value["main_class_id"].ToInt(),
|
|
CharaId = value["leader_skin_id"].ToInt()
|
|
};
|
|
JsonData jsonData = value["usable_class_ids"];
|
|
int[] array = new int[jsonData.Count];
|
|
for (int i = 0; i < jsonData.Count; i++)
|
|
{
|
|
array[i] = jsonData[i].ToInt();
|
|
}
|
|
chaosCharaData.SourceClassIds = array;
|
|
return chaosCharaData;
|
|
}
|
|
}
|