using LitJson;
using Wizard.Scripts.Network.Data.TaskData.Arena;
using Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick;

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

public class EntryTask : ArenaEntryTaskBase
{
	public class ArenaTwoPickPrepareTaskParam : BaseParam
	{
		public int consume_item_type;
	}

	public EntryTask()
	{
		base.type = ApiType.Type.ArenaTwoPickEntry;
	}

	public override void SetParameter(int consumeItemType)
	{
		ArenaTwoPickPrepareTaskParam arenaTwoPickPrepareTaskParam = new ArenaTwoPickPrepareTaskParam();
		arenaTwoPickPrepareTaskParam.consume_item_type = consumeItemType;
		base.Params = arenaTwoPickPrepareTaskParam;
	}

	protected override void SetResponseParams(JsonData data, JsonData headerData)
	{
		Wizard.Data.TwoPickEntry = new Entry(data);
		Wizard.Data.TwoPickInfo = new TwoPickInfo(data, headerData);
	}
}
