namespace Wizard;

public class SleeveBuyTask : BaseTask
{
	public class SleeveBuyTaskParam : BaseParam
	{
		public int series_id;

		public int product_id;

		public int sales_type;
	}

	public SleeveBuyTask()
	{
		base.type = ApiType.Type.SleeveBuy;
	}

	public void SetParameter(int series_id, int productId, ShopCommonUtility.SalesType sales_type)
	{
		SleeveBuyTaskParam sleeveBuyTaskParam = new SleeveBuyTaskParam();
		sleeveBuyTaskParam.series_id = series_id;
		sleeveBuyTaskParam.product_id = productId;
		sleeveBuyTaskParam.sales_type = (int)sales_type;
		base.Params = sleeveBuyTaskParam;
	}

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