using LitJson;

namespace Wizard.Scripts.Network.Task.Arena.TwoPick;

public class FinishTask : BaseTask
{
	public class FinishTaskParam : BaseParam
	{
	}

	public FinishTask()
	{
		base.type = ApiType.Type.ArenaTwoPickFinish;
	}

	public void SetParameter()
	{
		FinishTaskParam finishTaskParam = new FinishTaskParam();
		base.Params = finishTaskParam;
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		JsonData jsonData = base.ResponseData["data"];
		Wizard.Data.TwoPickInfo.SetEntryRewardList(jsonData["rewards"]);
		PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]);
		return num;
	}
}
