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,85 @@
|
||||
using System.Collections.Generic;
|
||||
using LitJson;
|
||||
using Wizard.Lottery;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase;
|
||||
|
||||
public class BuildDeckBuyTask : BaseTask
|
||||
{
|
||||
public class BuildDeckBuySingleTaskParam : BaseParam
|
||||
{
|
||||
public int product_id;
|
||||
|
||||
public int sales_type;
|
||||
}
|
||||
|
||||
public List<ShopCommonRewardInfo> _seriesRewardList = new List<ShopCommonRewardInfo>();
|
||||
|
||||
public List<ReceivedReward> LotteryRewardList = new List<ReceivedReward>();
|
||||
|
||||
public List<ReceivedReward> MissionRewardList = new List<ReceivedReward>();
|
||||
|
||||
public LotteryApplyData LotteryData { get; private set; }
|
||||
|
||||
public List<NotificatonAnimation.Param> NotificatonAnimationParams { get; set; }
|
||||
|
||||
public BuildDeckBuyTask()
|
||||
{
|
||||
base.type = ApiType.Type.BuildDeckBuy;
|
||||
LotteryData = LotteryApplyData.EmptyData();
|
||||
}
|
||||
|
||||
public void SetParameter(int productId, ShopCommonUtility.SalesType sales_type)
|
||||
{
|
||||
BuildDeckBuySingleTaskParam buildDeckBuySingleTaskParam = new BuildDeckBuySingleTaskParam();
|
||||
buildDeckBuySingleTaskParam.product_id = productId;
|
||||
buildDeckBuySingleTaskParam.sales_type = (int)sales_type;
|
||||
base.Params = buildDeckBuySingleTaskParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]);
|
||||
JsonData jsonData = base.ResponseData["data"]["series_rewards"];
|
||||
for (int i = 0; i < jsonData.Count; i++)
|
||||
{
|
||||
ShopCommonRewardInfo shopCommonRewardInfo = new ShopCommonRewardInfo();
|
||||
shopCommonRewardInfo.Type = jsonData[i]["reward_type"].ToInt();
|
||||
shopCommonRewardInfo.UserGoodsId = jsonData[i]["reward_detail_id"].ToLong();
|
||||
shopCommonRewardInfo.Num = jsonData[i]["reward_number"].ToInt();
|
||||
_seriesRewardList.Add(shopCommonRewardInfo);
|
||||
}
|
||||
LotteryData = LotteryApplyData.Parse(base.ResponseData["data"]);
|
||||
if (base.ResponseData["data"].TryGetValue("achieved_info", out var value))
|
||||
{
|
||||
if (value.TryGetValue("achieved_mission_reward_list", out var value2))
|
||||
{
|
||||
for (int j = 0; j < value2.Count; j++)
|
||||
{
|
||||
if (LotteryData.IsEnable)
|
||||
{
|
||||
LotteryRewardList.Add(ReceivedReward.CreateFromBattleResult(value2[j]));
|
||||
}
|
||||
else
|
||||
{
|
||||
MissionRewardList.Add(ReceivedReward.CreateFromBattleResult(value2[j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value.TryGetValue("achieved_mission_list", out var value3))
|
||||
{
|
||||
NotificatonAnimationParams = new List<NotificatonAnimation.Param>();
|
||||
for (int k = 0; k < value3.Count; k++)
|
||||
{
|
||||
NotificatonAnimationParams.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.TemporaryDeckResult, value3[k]["achieved_message"].ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase;
|
||||
|
||||
public class BuildDeckProductInfo
|
||||
{
|
||||
private List<BuildDeckCard> _cardList = new List<BuildDeckCard>();
|
||||
|
||||
private List<ShopCommonRewardInfo> _rewardInfoList = new List<ShopCommonRewardInfo>();
|
||||
|
||||
public int product_id { get; set; }
|
||||
|
||||
public string deck_code { get; set; }
|
||||
|
||||
public int leader_id { get; set; }
|
||||
|
||||
public int featured_card_id { get; set; }
|
||||
|
||||
public int purchase_num_max { get; set; }
|
||||
|
||||
public int purchase_num_current { get; set; }
|
||||
|
||||
public bool is_first_price { get; set; }
|
||||
|
||||
public bool is_purchased
|
||||
{
|
||||
get
|
||||
{
|
||||
if (purchase_num_max <= purchase_num_current)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public ShopCommonSaleInfo saleInfo { get; set; }
|
||||
|
||||
public List<BuildDeckCard> cardList => _cardList;
|
||||
|
||||
public List<ShopCommonRewardInfo> rewardInfoList => _rewardInfoList;
|
||||
|
||||
public List<int> CardIdList
|
||||
{
|
||||
get
|
||||
{
|
||||
List<int> list = new List<int>();
|
||||
for (int i = 0; i < cardList.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < cardList[i]._number; j++)
|
||||
{
|
||||
list.Add(cardList[i]._cardId);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasResurgentCard
|
||||
{
|
||||
get
|
||||
{
|
||||
CardMaster cardMaster = CardMaster.GetInstance(CardMaster.CardMasterId.Default);
|
||||
return _cardList.Any((BuildDeckCard card) => cardMaster.GetCardParameterFromId(card._cardId).IsResurgentCard);
|
||||
}
|
||||
}
|
||||
|
||||
public bool ContainsOnlyRotationCards()
|
||||
{
|
||||
CardMaster master = CardMaster.GetInstance(CardMaster.CardMasterId.Default);
|
||||
List<int> source = _cardList.ConvertAll((BuildDeckCard card) => master.GetCardParameterFromId(card._cardId).BaseCardId);
|
||||
source = source.Distinct().ToList();
|
||||
for (int num = 0; num < source.Count; num++)
|
||||
{
|
||||
if (!master.GetCardParameterFromId(source[num]).IsAvailableFormat(Format.Rotation, ClassType.None))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase;
|
||||
|
||||
public class BuildDeckPurchaseInfo
|
||||
{
|
||||
private List<BuildDeckSeriesPurchaseInfo> _seriesList = new List<BuildDeckSeriesPurchaseInfo>();
|
||||
|
||||
public List<BuildDeckSeriesPurchaseInfo> seriesList => _seriesList;
|
||||
|
||||
public BuildDeckProductInfo GetProductInfo(int productID)
|
||||
{
|
||||
foreach (BuildDeckSeriesPurchaseInfo series in _seriesList)
|
||||
{
|
||||
foreach (BuildDeckProductInfo product in series.productList)
|
||||
{
|
||||
if (product.product_id == productID)
|
||||
{
|
||||
return product;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int GetSeriesId(int productID)
|
||||
{
|
||||
foreach (BuildDeckSeriesPurchaseInfo series in _seriesList)
|
||||
{
|
||||
foreach (BuildDeckProductInfo product in series.productList)
|
||||
{
|
||||
if (product.product_id == productID)
|
||||
{
|
||||
return series._seriesId;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase;
|
||||
|
||||
public class BuildDeckSeriesPurchaseInfo
|
||||
{
|
||||
private List<BuildDeckProductInfo> _productList = new List<BuildDeckProductInfo>();
|
||||
|
||||
private List<PurchaseRewardInfo> _seriesRewardList = new List<PurchaseRewardInfo>();
|
||||
|
||||
public int _seriesId { get; set; }
|
||||
|
||||
public string _introduction { get; set; }
|
||||
|
||||
public bool _isNew { get; set; }
|
||||
|
||||
public List<BuildDeckProductInfo> productList => _productList;
|
||||
|
||||
public List<PurchaseRewardInfo> SeriesRewardList => _seriesRewardList;
|
||||
}
|
||||
Reference in New Issue
Block a user