namespace Wizard;

public class PremiumCardConversionTask : BaseTask
{
	private class PostParam : BaseParam
	{
		public int base_card_id;

		public int base_card_number;

		public int create_number;
	}

	public PremiumCardConversionTask()
	{
		base.type = ApiType.Type.PremiumCardConversion;
	}

	public void SetParameter(int normalCardId, int normalCardNumber)
	{
		PostParam postParam = new PostParam();
		postParam.base_card_id = normalCardId;
		postParam.base_card_number = normalCardNumber;
		postParam.create_number = 1;
		base.Params = postParam;
	}

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