Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/GachaPointExchangeInfo.cs
gamer147 0d9d8acae0 feat(battle-engine): M1 auto-copy closure (782 battle-logic files)
Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next.
2026-06-05 16:57:20 -04:00

43 lines
1.3 KiB
C#

using System.Collections.Generic;
using LitJson;
using Wizard.Scripts.Network.Data.TaskData.Arena;
namespace Wizard;
public class GachaPointExchangeInfo
{
public int CardId { get; private set; }
public CardBasePrm.ClanType Class { get; private set; }
public List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> RewardList { get; private set; }
public bool IsReceived { get; private set; }
public bool IsDisplayPrize { get; private set; }
public int ExchangeNum { get; private set; }
public GachaPointExchangeInfo(JsonData data)
{
CardId = data["card_id"].ToInt();
Class = (CardBasePrm.ClanType)data["class_id"].ToInt();
JsonData jsonData = data["reward_list"];
int count = jsonData.Count;
RewardList = new List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward>();
for (int i = 0; i < count; i++)
{
RewardList.Add(new Wizard.Scripts.Network.Data.TaskData.Arena.Reward(jsonData[i]));
}
IsReceived = data["is_received"].ToBoolean();
IsDisplayPrize = data.GetValueOrDefault("is_display_prize", defaultValue: false);
ExchangeNum = 1;
}
public string GetExchangeCardText()
{
string userGoodsName = UserGoods.getUserGoodsName(UserGoods.Type.Card, CardId);
return Data.SystemText.Get("Shop_0150", userGoodsName, ExchangeNum.ToString());
}
}