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

public class SpotCardExchangeTask : BaseTask
{
	public class SpotCardExchangeTaskParam : BaseParam
	{
		public int card_id;

		public int exchange_point;
	}

	public SpotCardExchangeTask()
	{
		base.type = ApiType.Type.SpotCardExchange;
	}

	public void SetParameter(int cardId, int exchangePoint)
	{
		SpotCardExchangeTaskParam spotCardExchangeTaskParam = new SpotCardExchangeTaskParam();
		spotCardExchangeTaskParam.card_id = cardId;
		spotCardExchangeTaskParam.exchange_point = exchangePoint;
		base.Params = spotCardExchangeTaskParam;
	}

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