namespace Wizard;

public class ReplayDetailTask : BaseTask
{
	public class ReplayDetailTaskParam : BaseParam
	{
		public new int viewer_id;

		public long battle_id;
	}

	public ReplayDetailTask()
	{
		base.type = ApiType.Type.ReplayDetail;
	}

	public void SetParameter(int viewerId, long battleId)
	{
		ReplayDetailTaskParam replayDetailTaskParam = new ReplayDetailTaskParam();
		replayDetailTaskParam.viewer_id = viewerId;
		replayDetailTaskParam.battle_id = battleId;
		base.Params = replayDetailTaskParam;
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		Data.ReplayBattleInfo = new ReplayDetailInfo(base.ResponseData["data"]);
		return num;
	}
}
