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,32 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Arena.TwoPick;
|
||||
|
||||
public class CandidateCard
|
||||
{
|
||||
public int id;
|
||||
|
||||
public int turn;
|
||||
|
||||
public int setNum;
|
||||
|
||||
public int cardId1;
|
||||
|
||||
public int cardId2;
|
||||
|
||||
public bool isSelected;
|
||||
|
||||
public CandidateCard()
|
||||
{
|
||||
}
|
||||
|
||||
public CandidateCard(JsonData data)
|
||||
{
|
||||
id = data["id"].ToInt();
|
||||
turn = data["turn"].ToInt();
|
||||
setNum = data["set_num"].ToInt();
|
||||
cardId1 = data["card_id_1"].ToInt();
|
||||
cardId2 = data["card_id_2"].ToInt();
|
||||
isSelected = data["is_selected"].ToInt() == 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Arena.TwoPick;
|
||||
|
||||
public class CandidateClass
|
||||
{
|
||||
public int classId1;
|
||||
|
||||
public int classId2;
|
||||
|
||||
public int classId3;
|
||||
|
||||
public int classId4;
|
||||
|
||||
public int selectedClassId;
|
||||
|
||||
public int charaId1;
|
||||
|
||||
public int charaId2;
|
||||
|
||||
public int charaId3;
|
||||
|
||||
public int selectedCharacterId;
|
||||
|
||||
public int SelectedChaosId { get; private set; }
|
||||
|
||||
public CandidateClass()
|
||||
{
|
||||
}
|
||||
|
||||
public CandidateClass(JsonData data)
|
||||
{
|
||||
if (data.Keys.Contains("class_id_1"))
|
||||
{
|
||||
classId1 = data["class_id_1"].ToInt();
|
||||
classId2 = data["class_id_2"].ToInt();
|
||||
classId3 = data["class_id_3"].ToInt();
|
||||
if (data.Keys.Contains("class_id_4"))
|
||||
{
|
||||
classId4 = data["class_id_4"].ToInt();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
classId1 = data["chaos_id_1"].ToInt();
|
||||
classId2 = data["chaos_id_2"].ToInt();
|
||||
classId3 = data["chaos_id_3"].ToInt();
|
||||
if (data.Keys.Contains("chaos_id_4"))
|
||||
{
|
||||
classId4 = data["chaos_id_4"].ToInt();
|
||||
}
|
||||
}
|
||||
selectedClassId = data["selected_class_id"].ToInt();
|
||||
SelectedChaosId = data.GetValueOrDefault("selected_chaos_id", 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Arena.TwoPick;
|
||||
|
||||
public class Deck
|
||||
{
|
||||
public int entryId;
|
||||
|
||||
public int classId;
|
||||
|
||||
public int skinId;
|
||||
|
||||
public int[] cardIds;
|
||||
|
||||
public bool isSelectCompleted;
|
||||
|
||||
public int selectTurn;
|
||||
|
||||
public Deck()
|
||||
{
|
||||
}
|
||||
|
||||
public Deck(JsonData data)
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
ICollection<string> keys = data.Keys;
|
||||
if (keys.Contains("two_pick_entry_id"))
|
||||
{
|
||||
entryId = data["two_pick_entry_id"].ToInt();
|
||||
}
|
||||
if (keys.Contains("class_id"))
|
||||
{
|
||||
classId = data["class_id"].ToInt();
|
||||
}
|
||||
isSelectCompleted = data["is_select_completed"].ToInt() == 1;
|
||||
JsonData jsonData = data["selected_card_ids"];
|
||||
cardIds = new int[jsonData.Count];
|
||||
for (int i = 0; i < cardIds.Length; i++)
|
||||
{
|
||||
cardIds[i] = jsonData[i].ToInt();
|
||||
}
|
||||
selectTurn = data["select_turn"].ToInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TableData.Arena.TwoPick;
|
||||
|
||||
public class EntryInfo
|
||||
{
|
||||
public int rewardScheduleId;
|
||||
|
||||
public int maxBattleCount;
|
||||
|
||||
public bool isRetire;
|
||||
|
||||
public EntryInfo()
|
||||
{
|
||||
}
|
||||
|
||||
public EntryInfo(JsonData data)
|
||||
{
|
||||
if (data != null)
|
||||
{
|
||||
rewardScheduleId = data["reward_schedule_id"].ToInt();
|
||||
maxBattleCount = data["max_battle_count"].ToInt();
|
||||
isRetire = data["is_retire"].ToInt() == 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user