using System.Collections.Generic;
using LitJson;

namespace Wizard;

public class CardDestructTask : BaseTask
{
	public class CardDestructTaskParam : BaseParam
	{
		public string card_id_number_array;
	}

	public CardDestructTask()
	{
		base.type = ApiType.Type.CardDestruct;
	}

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

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