2025-01-23 00:57:39 +00:00
|
|
|
using CodeStage.AntiCheat.ObscuredTypes;
|
2025-01-22 04:47:21 +00:00
|
|
|
using System.Collections.Generic;
|
2025-01-22 06:03:38 +00:00
|
|
|
using TMPro;
|
2025-01-22 04:47:21 +00:00
|
|
|
|
|
|
|
|
public class MapChoiceUI_Dungeon : uScrollViewMgr
|
|
|
|
|
{
|
2025-01-22 06:03:38 +00:00
|
|
|
public static MapChoiceUI_Dungeon Ins;
|
2025-01-22 04:47:21 +00:00
|
|
|
|
2025-01-23 04:22:47 +00:00
|
|
|
public MoneyForm MoneyForm_Ticket;
|
2025-01-22 06:03:38 +00:00
|
|
|
public TextMeshProUGUI[] texts; // 0 던전이름
|
|
|
|
|
public ArrowUI m_ArrowUI;
|
|
|
|
|
|
|
|
|
|
List<eDungeon> dungeons = new List<eDungeon> { eDungeon.d1_Mimic, eDungeon.d2_Maze, eDungeon.d3_Nightmare, eDungeon.d4_Wave };
|
2025-01-23 00:57:39 +00:00
|
|
|
ObscuredInt SelectMapID = 1001, SelectLv;
|
2025-01-22 06:03:38 +00:00
|
|
|
|
|
|
|
|
private void OnEnable()
|
|
|
|
|
{
|
2025-01-23 00:57:39 +00:00
|
|
|
Ins = this;
|
2025-01-22 06:03:38 +00:00
|
|
|
Set_ScrollView(dungeons);
|
2025-01-22 07:20:20 +00:00
|
|
|
for (int i = 0; i < list_CardBase.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
if (list_CardBase[i].Get_IntData() == SelectMapID)
|
|
|
|
|
(list_CardBase[i] as WorldMapDungeonCard).OnClick_Card();
|
|
|
|
|
}
|
2025-01-22 06:03:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Set_UI()
|
|
|
|
|
{
|
2025-01-23 00:57:39 +00:00
|
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
2025-01-23 04:22:47 +00:00
|
|
|
MoneyForm_Ticket.Set(500 + MyEnumToInt.Ins.Get_Int(mapData.e_Dungeon));
|
2025-01-23 00:57:39 +00:00
|
|
|
texts[0].text = mapData.Get_Name();
|
|
|
|
|
var dungeonData = table_dungeonmapconfig.Ins.Get_Data_orNull(mapData.e_Dungeon, SelectLv);
|
2025-01-22 06:03:38 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-23 00:57:39 +00:00
|
|
|
public void Select_Dungeon(int mapid)
|
2025-01-22 06:03:38 +00:00
|
|
|
{
|
2025-01-23 20:50:53 +00:00
|
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
2025-01-23 00:57:39 +00:00
|
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
|
|
|
|
var datas = table_dungeonmapconfig.Ins.Get_DataList(mapData.e_Dungeon);
|
2025-01-23 20:50:53 +00:00
|
|
|
SelectMapID = mapid; SelectMapID.RandomizeCryptoKey();
|
|
|
|
|
SelectLv = sdata.Get_DungeonLv(mapData.e_Dungeon) + 1;
|
|
|
|
|
|
|
|
|
|
m_ArrowUI.Set(totalcount => { Select_Lv(totalcount); }, SelectLv, true, 1);
|
2025-01-23 00:57:39 +00:00
|
|
|
|
2025-01-22 06:03:38 +00:00
|
|
|
Set_UI();
|
|
|
|
|
}
|
2025-01-23 00:57:39 +00:00
|
|
|
public void Select_Lv(int lv)
|
|
|
|
|
{
|
|
|
|
|
SelectLv = lv; SelectLv.RandomizeCryptoKey();
|
|
|
|
|
}
|
2025-01-22 07:20:20 +00:00
|
|
|
|
|
|
|
|
public void OnClick_GoDungeon()
|
|
|
|
|
{
|
2025-01-23 04:22:47 +00:00
|
|
|
var mapData = table_battlemapconfig.Ins.Get_Data(SelectMapID);
|
|
|
|
|
var ticketid = MyEnumToInt.Ins.Get_Int(mapData.e_Dungeon) + 500;
|
|
|
|
|
// 웨이브는 무한 입장 가능
|
|
|
|
|
if (ticketid == 504 || ServerInfo.Ins.m_ServerData.Check_ItemAmount(ticketid, 1))
|
|
|
|
|
{
|
|
|
|
|
NewGameUI.Ins.m_MapChoiceUI.OnClick_Back();
|
2025-01-22 07:20:20 +00:00
|
|
|
|
2025-01-23 04:22:47 +00:00
|
|
|
MyValue.MyChoiceMapData.n_Difficult = 1; // TODO 정인호 : 나중에 선택한 난이도 넣어줄 것
|
|
|
|
|
MyValue.MyChoiceMapData.n_MapID = SelectMapID;
|
|
|
|
|
MyValue.MyChoiceMapData.n_PortalIndex = 0;
|
|
|
|
|
MyValue.MyChoiceMapData.n_DungeonLv = SelectLv;
|
2025-01-22 07:20:20 +00:00
|
|
|
|
2025-01-23 04:22:47 +00:00
|
|
|
InGameInfo.Ins.Load_Map(SelectMapID);
|
|
|
|
|
}
|
2025-01-22 07:20:20 +00:00
|
|
|
}
|
2025-01-22 04:47:21 +00:00
|
|
|
}
|