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.
84 lines
2.0 KiB
C#
84 lines
2.0 KiB
C#
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;
|
|
}
|
|
}
|