using Cute;
using Wizard;

public class ColosseumEntryDialog : ArenaEntryDialogBase
{
	public ColosseumEntry ColosseumEntryClass { get; set; }

	protected override void Init()
	{
		_mainTextId = "Colosseum_0004";
		_ticketSpriteName = "icon_colosseum_s";
		_arenaNameTextId = "Colosseum_0006";
		_entryButtonSe = Se.TYPE.SYS_BTN_DECIDE;
	}

	protected override int GetTicketNum()
	{
		return PlayerStaticData.UserColosseumTicketNum;
	}

	protected override ArenaEntryDataBase GetEntryData()
	{
		return Data.ArenaData.ColosseumData;
	}

	protected override void Entry()
	{
		base.Entry();
		ColosseumEntryTask colosseumEntryTask = new ColosseumEntryTask();
		colosseumEntryTask.SetParameter(_payType);
		StartCoroutine(Toolbox.NetworkManager.Connect(colosseumEntryTask, EntryTaskSuccess));
	}

	private void EntryTaskSuccess(NetworkTask.ResultCode inResult)
	{
		base.ParentDialog.CloseWithoutSelect();
		ColosseumEntryClass.EntryTaskSuccess(inResult);
	}

	private void DeckSetAndMoveColosseum(DeckData inDeckData, bool isBattleEnd)
	{
		Data.ArenaData.ColosseumData.DeckList.Clear();
		Data.ArenaData.ColosseumData.DeckList.Add(inDeckData);
		ColosseumDeckEntryTask colosseumDeckEntryTask = new ColosseumDeckEntryTask();
		colosseumDeckEntryTask.SetParameter(Data.ArenaData.ColosseumData.DeckList, isPublished: false);
		UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(colosseumDeckEntryTask, delegate
		{
			UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Colosseum);
		}));
	}
}
