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.
89 lines
2.4 KiB
C#
89 lines
2.4 KiB
C#
using System.Collections.Generic;
|
|
using LitJson;
|
|
|
|
namespace Wizard;
|
|
|
|
public class RoomTwoPickMultiDeckInfo
|
|
{
|
|
public class DeckResultInfo
|
|
{
|
|
public List<int> _cardIds;
|
|
|
|
public int _classId;
|
|
|
|
public int _skinId;
|
|
|
|
public int _opponentClassId;
|
|
|
|
public bool _isWin;
|
|
|
|
public DeckResultInfo(JsonData data)
|
|
{
|
|
JsonData jsonData = data["card_id_list"];
|
|
int count = jsonData.Count;
|
|
List<int> list = new List<int>(count);
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
list.Add(ConvertValue.ToInt(jsonData[i]));
|
|
}
|
|
_cardIds = UIManager.GetInstance().getUIBase_CardManager().SortIDList(list, CardMaster.CardMasterId.Default);
|
|
_classId = ConvertValue.ToInt(data["class_id"]);
|
|
_skinId = ConvertValue.ToInt(data["chara_id"]);
|
|
_opponentClassId = ConvertValue.ToInt(data["opponent_class_id"]);
|
|
_isWin = ConvertValue.ToInt(data["battle_result"]) == 1;
|
|
}
|
|
|
|
public DeckResultInfo(Dictionary<string, object> data)
|
|
{
|
|
List<object> list = data["cardIds"] as List<object>;
|
|
int count = list.Count;
|
|
List<int> list2 = new List<int>(count);
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
list2.Add(ConvertValue.ToInt(list[i]));
|
|
}
|
|
_cardIds = UIManager.GetInstance().getUIBase_CardManager().SortIDList(list2, CardMaster.CardMasterId.Default);
|
|
_classId = ConvertValue.ToInt(data["classId"]);
|
|
_skinId = ConvertValue.ToInt(data["skinId"]);
|
|
_opponentClassId = ConvertValue.ToInt(data["oppoClass"]);
|
|
_isWin = ConvertValue.ToInt(data["isWin"]) == 1;
|
|
}
|
|
}
|
|
|
|
public DeckResultInfo[] DeckList { get; private set; }
|
|
|
|
public void Reset()
|
|
{
|
|
DeckList = null;
|
|
}
|
|
|
|
public void SetDeckList(JsonData data)
|
|
{
|
|
if (data == null || !data.IsObject)
|
|
{
|
|
return;
|
|
}
|
|
ICollection<string> keys = data.Keys;
|
|
DeckResultInfo[] array = new DeckResultInfo[keys.Count];
|
|
foreach (string item in keys)
|
|
{
|
|
JsonData jsonData = data[item];
|
|
int num = ConvertValue.ToInt(jsonData["entry_no"]);
|
|
array[num - 1] = new DeckResultInfo(jsonData);
|
|
}
|
|
DeckList = array;
|
|
}
|
|
|
|
public void SetDeckList(Dictionary<string, object> data)
|
|
{
|
|
List<object> list = data["ownerList"] as List<object>;
|
|
DeckResultInfo[] array = new DeckResultInfo[list.Count];
|
|
for (int i = 0; i < list.Count; i++)
|
|
{
|
|
Dictionary<string, object> data2 = list[i] as Dictionary<string, object>;
|
|
array[i] = new DeckResultInfo(data2);
|
|
}
|
|
DeckList = array;
|
|
}
|
|
}
|