73 lines
1.6 KiB
C#
73 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using Cute;
|
|
using LitJson;
|
|
|
|
namespace Wizard;
|
|
|
|
public class PackConfig
|
|
{
|
|
public List<PackChildGachaInfo> ChildGachaInfoList { get; } = new List<PackChildGachaInfo>();
|
|
|
|
public int PackId { get; set; }
|
|
|
|
public int SleeveId { get; set; }
|
|
|
|
public int SpecialSleeveId { get; set; }
|
|
|
|
public PackCategory Category { get; set; }
|
|
|
|
public int OverrideUIEffectPackId { get; set; }
|
|
|
|
public int TsExchangePosterId { get; set; }
|
|
|
|
public bool IsSpecialLayout
|
|
{
|
|
get
|
|
{
|
|
if (!IsSpecialCardPack && !IsLegendCardPack && Category != PackCategory.FreePackLeaderSkin && Category != PackCategory.RotationStarterCardPack)
|
|
{
|
|
return Category == PackCategory.LegendAndLeaderSkinSinglePack;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
|
|
public bool IsSpecialCardPack
|
|
{
|
|
get
|
|
{
|
|
if (Category != PackCategory.SpecialCardPack)
|
|
{
|
|
return Category == PackCategory.LimitedSpecialCardPack;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
|
|
public bool IsLegendCardPack => Category == PackCategory.LegendCardPack;
|
|
|
|
public bool IsPrerelease { get; set; }
|
|
|
|
public List<PurchaseRewardInfo> SpecialPackRewardsList { get; private set; }
|
|
|
|
public int GetGachaIdForUIResource()
|
|
{
|
|
if (!IsSpecialCardPack)
|
|
{
|
|
return PackId;
|
|
}
|
|
return OverrideUIEffectPackId;
|
|
}
|
|
|
|
public int GetTicketId()
|
|
{
|
|
int result = PackId;
|
|
PackChildGachaInfo packChildGachaInfo = ChildGachaInfoList.Find((PackChildGachaInfo x) => x.PackType == GachaUI.CardPackType.TICKET_MULTI);
|
|
if (packChildGachaInfo != null)
|
|
{
|
|
result = (int)packChildGachaInfo.UserGoodsId;
|
|
}
|
|
return result;
|
|
}
|
|
}
|