미션 작업 중... 4
This commit is contained in:
parent
1b3fe04437
commit
2ccb7c462f
|
|
@ -73,5 +73,4 @@ messageinfo 엄청 느린 버그
|
|||
- 업적
|
||||
- 주간
|
||||
- 일간
|
||||
- 미션 UI 만들기
|
||||
//- 테이블 만들기
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
[{"n_MapID": "-1", "n_Chapter": "-1", "e_MapType": "Lobby", "e_Dungeon": "None", "s_Scene": "Lobby", "s_BGM": "Chapter1", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map1", "n_Portals": "0", "n_TicketID": "0"}, {"n_MapID": "0", "n_Chapter": "0", "e_MapType": "MyFarm", "e_Dungeon": "None", "s_Scene": "MyFarm", "s_BGM": "Chapter1", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map2", "n_Portals": "0", "n_TicketID": "0"}, {"n_MapID": "1", "n_Chapter": "1", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C01", "s_BGM": "Chapter1", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map3", "n_Portals": "5", "n_TicketID": "0"}, {"n_MapID": "2", "n_Chapter": "2", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C02", "s_BGM": "Chapter2", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "3", "n_Chapter": "3", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C03", "s_BGM": "Chapter2", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "4", "n_Chapter": "4", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C04", "s_BGM": "Chapter2", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "1001", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d1_Mimic", "s_Scene": "Map_Mimic", "s_BGM": "Chapter2", "n_MapName": "1001", "n_MapDesc": "1002", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "501"}, {"n_MapID": "1002", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d2_Maze", "s_Scene": "Map_Maze", "s_BGM": "Chapter2", "n_MapName": "1011", "n_MapDesc": "1012", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "502"}, {"n_MapID": "1003", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d3_Nightmare", "s_Scene": "Map_Nightmare", "s_BGM": "Chapter2", "n_MapName": "1021", "n_MapDesc": "1022", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "503"}, {"n_MapID": "1004", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d4_Wave", "s_Scene": "Map_Wave", "s_BGM": "Chapter2", "n_MapName": "1031", "n_MapDesc": "1032", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "0"}]
|
||||
[{"n_MapID": "-1", "n_Chapter": "-1", "e_MapType": "Lobby", "e_Dungeon": "None", "s_Scene": "Lobby", "s_BGM": "Chapter1", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map1", "n_Portals": "0", "n_TicketID": "0"}, {"n_MapID": "0", "n_Chapter": "0", "e_MapType": "MyFarm", "e_Dungeon": "None", "s_Scene": "MyFarm", "s_BGM": "Chapter1", "n_MapName": "1", "n_MapDesc": "0", "s_MapIcon": "Map2", "n_Portals": "0", "n_TicketID": "0"}, {"n_MapID": "1", "n_Chapter": "1", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C01", "s_BGM": "Chapter1", "n_MapName": "951", "n_MapDesc": "952", "s_MapIcon": "Map3", "n_Portals": "5", "n_TicketID": "0"}, {"n_MapID": "2", "n_Chapter": "2", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C02", "s_BGM": "Chapter2", "n_MapName": "953", "n_MapDesc": "954", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "3", "n_Chapter": "3", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C03", "s_BGM": "Chapter2", "n_MapName": "955", "n_MapDesc": "956", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "4", "n_Chapter": "4", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C04", "s_BGM": "Chapter2", "n_MapName": "957", "n_MapDesc": "958", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "5", "n_Chapter": "5", "e_MapType": "Stage", "e_Dungeon": "None", "s_Scene": "Map_C05", "s_BGM": "Chapter2", "n_MapName": "959", "n_MapDesc": "960", "s_MapIcon": "Map4", "n_Portals": "1", "n_TicketID": "0"}, {"n_MapID": "1001", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d1_Mimic", "s_Scene": "Map_Mimic", "s_BGM": "Chapter2", "n_MapName": "1001", "n_MapDesc": "1002", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "501"}, {"n_MapID": "1002", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d2_Maze", "s_Scene": "Map_Maze", "s_BGM": "Chapter2", "n_MapName": "1011", "n_MapDesc": "1012", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "502"}, {"n_MapID": "1003", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d3_Nightmare", "s_Scene": "Map_Nightmare", "s_BGM": "Chapter2", "n_MapName": "1021", "n_MapDesc": "1022", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "503"}, {"n_MapID": "1004", "n_Chapter": "0", "e_MapType": "Dungeon", "e_Dungeon": "d4_Wave", "s_Scene": "Map_Wave", "s_BGM": "Chapter2", "n_MapName": "1031", "n_MapDesc": "1032", "s_MapIcon": "Map", "n_Portals": "1", "n_TicketID": "0"}]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
[{"n_MissionIndex": "1", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100034", "e_MissionConditionType": "DAILY_MISSION_CLEAR_ALL", "n_MissionConditionValue": "0", "l_MissionConditionCount": "5", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "100", "b_RepeatMission": "False"}, {"n_MissionIndex": "2", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100001", "e_MissionConditionType": "KILL_MONSTER", "n_MissionConditionValue": "101", "l_MissionConditionCount": "20", "e_RewardType": "", "n_RewardValue": "2", "n_RewardCount": "100", "b_RepeatMission": "False"}, {"n_MissionIndex": "3", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100002", "e_MissionConditionType": "KILL_MONSTER_ALL", "n_MissionConditionValue": "0", "l_MissionConditionCount": "30", "e_RewardType": "", "n_RewardValue": "2", "n_RewardCount": "200", "b_RepeatMission": "False"}, {"n_MissionIndex": "4", "n_MissionGroupId": "1", "e_LinkedQuestType": "First", "n_MissionDesc": "100003", "e_MissionConditionType": "KILL_MONSTER_ACC", "n_MissionConditionValue": "0", "l_MissionConditionCount": "40", "e_RewardType": "", "n_RewardValue": "2", "n_RewardCount": "300", "b_RepeatMission": "False"}]
|
||||
[{"n_MissionIndex": "1001", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100034", "e_MissionConditionType": "DAILY_MISSION_CLEAR_ALL", "n_MissionConditionValue": "0", "l_MissionConditionCount": "5", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "100", "b_RepeatMission": "False"}, {"n_MissionIndex": "1002", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100001", "e_MissionConditionType": "KILL_MONSTER", "n_MissionConditionValue": "101", "l_MissionConditionCount": "20", "e_RewardType": "", "n_RewardValue": "2", "n_RewardCount": "100", "b_RepeatMission": "False"}, {"n_MissionIndex": "1003", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100002", "e_MissionConditionType": "KILL_MONSTER_ALL", "n_MissionConditionValue": "0", "l_MissionConditionCount": "30", "e_RewardType": "", "n_RewardValue": "2", "n_RewardCount": "200", "b_RepeatMission": "False"}, {"n_MissionIndex": "1004", "n_MissionGroupId": "1", "e_LinkedQuestType": "First", "n_MissionDesc": "100003", "e_MissionConditionType": "KILL_MONSTER_ACC", "n_MissionConditionValue": "0", "l_MissionConditionCount": "40", "e_RewardType": "", "n_RewardValue": "2", "n_RewardCount": "300", "b_RepeatMission": "False"}, {"n_MissionIndex": "1005", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100004", "e_MissionConditionType": "TAKE_GOODS", "n_MissionConditionValue": "2", "l_MissionConditionCount": "100", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "10", "b_RepeatMission": "False"}, {"n_MissionIndex": "1006", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100005", "e_MissionConditionType": "CONSUME_GOODS", "n_MissionConditionValue": "2", "l_MissionConditionCount": "100", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "11", "b_RepeatMission": "False"}, {"n_MissionIndex": "1007", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100006", "e_MissionConditionType": "MOVE_MAP ", "n_MissionConditionValue": "1", "l_MissionConditionCount": "1", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "12", "b_RepeatMission": "False"}, {"n_MissionIndex": "1009", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100008", "e_MissionConditionType": "ACCOUNT_LEVEL_UP", "n_MissionConditionValue": "0", "l_MissionConditionCount": "5", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "14", "b_RepeatMission": "False"}, {"n_MissionIndex": "1010", "n_MissionGroupId": "1", "e_LinkedQuestType": "None", "n_MissionDesc": "100009", "e_MissionConditionType": "ACCOUNT_LEVEL_UP_LIMIT", "n_MissionConditionValue": "0", "l_MissionConditionCount": "10", "e_RewardType": "", "n_RewardValue": "1", "n_RewardCount": "15", "b_RepeatMission": "False"}]
|
||||
Binary file not shown.
|
|
@ -175,6 +175,7 @@ public partial class InGameInfo : MyCoroutine
|
|||
MyValue.MyChoiceMapData.n_MapID = id;
|
||||
var Tdata = table_battlemapconfig.Ins.Get_Data(MyValue.MyChoiceMapData.n_MapID);
|
||||
m_GameMode = Tdata.e_MapType;
|
||||
ServerInfo.Ins.m_ServerData.Add_MissionCount(ePurpose.MOVE_MAP, id);
|
||||
m_SceneInfo.Load_AddScene(Tdata, () =>
|
||||
{
|
||||
StartCam();
|
||||
|
|
|
|||
|
|
@ -1005,6 +1005,81 @@ public partial class ServerData
|
|||
return false;
|
||||
}
|
||||
#endregion
|
||||
#region 미션
|
||||
public void Init_Mission(int group)
|
||||
{
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var lst = table_missionlist.Ins.Get_DataList(group);
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
var key2 = Get_Key(lst[i].n_MissionIndex);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
{
|
||||
Mission[key1][key2][0] = Mission[key1][key2][1] = 0;
|
||||
Mission[key1][key2][0].RandomizeCryptoKey();
|
||||
Mission[key1][key2][1].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Set_MissionCount(int group, int _id, int _v)
|
||||
{
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var key2 = Get_Key(_id);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
{
|
||||
Mission[key1][key2][1] = _v;
|
||||
Mission[key1][key2][1].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Add_MissionCount(ePurpose purpose, int conditionvalue = 0, int _v = 1)
|
||||
{
|
||||
var lst = table_missionlist.Ins.Get_DataList(purpose);
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
if (conditionvalue == lst[i].n_MissionConditionValue)
|
||||
{
|
||||
var key1 = Get_Key(lst[i].n_MissionGroupId);
|
||||
var key2 = Get_Key(lst[i].n_MissionIndex);
|
||||
if (!Mission.ContainsKey(key1)) Mission.Add(key1, new Dictionary<string, List<ObscuredInt>>());
|
||||
if (!Mission[key1].ContainsKey(key2)) Mission[key1].Add(key2, new List<ObscuredInt> { 0, 0 });
|
||||
Mission[key1][key2][1] += _v;
|
||||
Mission[key1][key2][1].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
public int Get_MissionCount(int group, int _id)
|
||||
{
|
||||
var data = table_missionlist.Ins.Get_Data_orNull(group, _id);
|
||||
switch (data.e_MissionConditionType)
|
||||
{
|
||||
case ePurpose.ACCOUNT_LEVEL_UP:
|
||||
case ePurpose.ACCOUNT_LEVEL_UP_LIMIT:
|
||||
return PC.Lv;
|
||||
|
||||
default:
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var key2 = Get_Key(_id);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
return Mission[key1][key2][1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public bool CanGet_Mission(int group, int _id)
|
||||
{
|
||||
var condition = table_missionlist.Ins.Get_Data_orNull(group, _id);
|
||||
return Get_MissionCount(group, _id) >= condition.l_MissionConditionCount;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Common
|
||||
public void Init_Daily()
|
||||
|
|
@ -1091,81 +1166,6 @@ public partial class ServerData
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 미션
|
||||
public void Init_Mission(int group)
|
||||
{
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var lst = table_missionlist.Ins.Get_DataList(group);
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
var key2 = Get_Key(lst[i].n_MissionIndex);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
{
|
||||
Mission[key1][key2][0] = Mission[key1][key2][1] = 0;
|
||||
Mission[key1][key2][0].RandomizeCryptoKey();
|
||||
Mission[key1][key2][1].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Set_MissionCount(int group, int _id, int _v)
|
||||
{
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var key2 = Get_Key(_id);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
{
|
||||
Mission[key1][key2][1] = _v;
|
||||
Mission[key1][key2][1].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Add_MissionCount(ePurpose purpose, int conditionvalue = 0, int _v = 1)
|
||||
{
|
||||
var lst = table_missionlist.Ins.Get_DataList(purpose);
|
||||
for (int i = 0; i < lst.Count; i++)
|
||||
{
|
||||
if (conditionvalue == lst[i].n_MissionConditionValue)
|
||||
{
|
||||
var key1 = Get_Key(lst[i].n_MissionGroupId);
|
||||
var key2 = Get_Key(lst[i].n_MissionIndex);
|
||||
if (!Mission.ContainsKey(key1)) Mission.Add(key1, new Dictionary<string, List<ObscuredInt>>());
|
||||
if (!Mission[key1].ContainsKey(key2)) Mission[key1].Add(key2, new List<ObscuredInt> { 0, 0 });
|
||||
Mission[key1][key2][1] += _v;
|
||||
Mission[key1][key2][1].RandomizeCryptoKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
public int Get_MissionCount(int group, int _id)
|
||||
{
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var key2 = Get_Key(_id);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
return Mission[key1][key2][1];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public bool CanGet_Mission(int group, int _id)
|
||||
{
|
||||
var key1 = Get_Key(group);
|
||||
if (Mission.ContainsKey(key1))
|
||||
{
|
||||
var key2 = Get_Key(_id);
|
||||
if (Mission[key1].ContainsKey(key2))
|
||||
{
|
||||
var condition = table_missionlist.Ins.Get_Data(group, _id);
|
||||
return Mission[key1][key2][1] >= condition.l_MissionConditionCount;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 칭호
|
||||
public void Add_TitleCondition(params int[] ids)
|
||||
{
|
||||
|
|
@ -1826,6 +1826,8 @@ public partial class ServerData
|
|||
Relic[key][0].RandomizeCryptoKey();
|
||||
break;
|
||||
}
|
||||
|
||||
Add_MissionCount(ePurpose.TAKE_GOODS, id, (int)amount);
|
||||
}
|
||||
public void Use_Item(int id, double amount)
|
||||
{
|
||||
|
|
@ -1887,6 +1889,8 @@ public partial class ServerData
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Add_MissionCount(ePurpose.CONSUME_GOODS, id, (int)amount);
|
||||
}
|
||||
public bool Check_ItemAmount(int id, double amount, bool _showtoast = true)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,5 +118,14 @@ public class table_missionlist : table_missionbase
|
|||
public List<MissionListTableData> Get_DataList(int group) { return dic_datas[group]; }
|
||||
public List<MissionListTableData> Get_DataList(ePurpose purpose) { return dic_purposdatas[purpose]; }
|
||||
public MissionListTableData Get_CompleteData(int group) { return dic_Completedata[group]; }
|
||||
public MissionListTableData Get_Data(int group, int id) { return dic_alldatas[group][id]; }
|
||||
public MissionListTableData Get_Data_orNull(int group, int id)
|
||||
{
|
||||
for (int i = 0; i < dic_alldatas[group].Count; i++)
|
||||
{
|
||||
var temp = dic_alldatas[group][i];
|
||||
if (temp.n_MissionIndex == id)
|
||||
return temp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,25 @@ public class MissionCard : CardBase
|
|||
var amount = sdata.Get_MissionCount(m_Data.n_MissionGroupId, m_Data.n_MissionIndex);
|
||||
|
||||
images[0].sprite = UIAtlasMgr.Ins.Get_Sprite(m_Data.n_RewardValue);
|
||||
texts[0].text = table_localtext.Ins.Get_Text(m_Data.n_MissionDesc);
|
||||
switch (m_Data.e_MissionConditionType)
|
||||
{
|
||||
case ePurpose.KILL_MONSTER:
|
||||
var mob = table_monsterlist.Ins.Get_Data_orNull(m_Data.n_MissionConditionValue);
|
||||
texts[0].text = DSUtil.Format(m_Data.n_MissionDesc, mob.Get_Name());
|
||||
break;
|
||||
case ePurpose.TAKE_GOODS:
|
||||
case ePurpose.CONSUME_GOODS:
|
||||
var item = table_itemlist.Ins.Get_Data(m_Data.n_MissionConditionValue);
|
||||
texts[0].text = DSUtil.Format(m_Data.n_MissionDesc, item.Get_Name());
|
||||
break;
|
||||
case ePurpose.MOVE_MAP:
|
||||
var map = table_battlemapconfig.Ins.Get_Data(m_Data.n_MissionConditionValue);
|
||||
texts[0].text = DSUtil.Format(m_Data.n_MissionDesc, map.Get_Name());
|
||||
break;
|
||||
default:
|
||||
texts[0].text = DSUtil.Format(m_Data.n_MissionDesc);
|
||||
break;
|
||||
}
|
||||
texts[1].text = m_Data.n_RewardCount.ToString();
|
||||
texts[2].text = $"{amount}/{m_Data.l_MissionConditionCount}";
|
||||
slider_proc.value = DSUtil.Get_SliderValue(amount / (float)m_Data.l_MissionConditionCount);
|
||||
|
|
|
|||
|
|
@ -26,4 +26,9 @@ public class MissionUI : uScrollViewMgr
|
|||
m_Complete.Set(table_missionlist.Ins.Get_CompleteData(m_Tab.Get_Index() + 1));
|
||||
Set_ScrollView(table_missionlist.Ins.Get_DataList(m_Tab.Get_Index() + 1));
|
||||
}
|
||||
|
||||
public void OnClick_GetAll()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue