namespace Wizard.Scripts.Network.Data.TaskData.SpotCardExchange;

public class GachaPointExchangeTask : BaseTask
{
	public class GachaPointExchangeTaskParam : BaseParam
	{
		public int card_id;

		public int parent_gacha_id;

		public int odds_gacha_id;
	}

	public GachaPointExchangeTask()
	{
		base.type = ApiType.Type.GachaPointExchange;
	}

	public void SetParameter(int cardId, int parentGachaId, int oddsId)
	{
		GachaPointExchangeTaskParam gachaPointExchangeTaskParam = new GachaPointExchangeTaskParam();
		gachaPointExchangeTaskParam.card_id = cardId;
		gachaPointExchangeTaskParam.parent_gacha_id = parentGachaId;
		gachaPointExchangeTaskParam.odds_gacha_id = oddsId;
		base.Params = gachaPointExchangeTaskParam;
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]);
		return num;
	}
}
