using LitJson;
using Wizard.Scripts.Network.Task.Arena.TwoPick;

namespace Wizard.Scripts.Network.Task.Arena;

public abstract class ArenaEntryTaskBase : BaseTask
{
	public ArenaEntryTaskBase()
	{
	}

	public abstract void SetParameter(int consumeItemType);

	public static ArenaEntryTaskBase GetTaskInstance(int mode)
	{
		ArenaEntryTaskBase result = null;
		if (mode == 1)
		{
			result = new EntryTask();
		}
		return result;
	}

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

	protected abstract void SetResponseParams(JsonData data, JsonData headerData);
}
