namespace Wizard;

public class ColosseumDoMatchingTask : DoMatchingBase
{
	public ColosseumDoMatchingTask()
	{
		if (!Data.ArenaData.ColosseumData.IsRankMatching)
		{
			base.type = ApiType.Type.ColosseumDoMatching;
		}
		else
		{
			base.type = ApiType.Type.ColosseumDoMatchingRankMatch;
		}
	}

	public override void SetParameter(int deck_no, int need_init, int log, bool includeCardMasterHash = false)
	{
		includeCardMasterHash = includeCardMasterHash || need_init == 1;
		if (Data.ArenaData.ColosseumData.IsRankMatching)
		{
			need_init = 0;
		}
		base.SetParameter(deck_no, need_init, log, includeCardMasterHash);
	}

	protected override int Parse()
	{
		int num = base.Parse();
		if (num != 1)
		{
			return num;
		}
		SettingDoMatchingData();
		if (Data.DoMatchingDetail.data.matchingState == 3008)
		{
			Data.ArenaData.ColosseumData.IsRankMatching = true;
		}
		return num;
	}
}
