using System.Collections.Generic;
using LitJson;

namespace Wizard;

public class CardCreateTask : BaseTask
{
	public class CardCreateTaskParam : BaseParam
	{
		public string card_id_number_array;
	}

	public CardCreateTask()
	{
		base.type = ApiType.Type.CardCreate;
	}

	public void SetParameter(IDictionary<string, string> card_id_number_dict)
	{
		CardCreateTaskParam cardCreateTaskParam = new CardCreateTaskParam();
		cardCreateTaskParam.card_id_number_array = JsonMapper.ToJson(card_id_number_dict);
		base.Params = cardCreateTaskParam;
	}

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