From fc7cd0bc48bb2a0f5a36aa3ffe8c514791c760b3 Mon Sep 17 00:00:00 2001 From: Ino Date: Sun, 23 Mar 2025 14:38:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B8=EA=B2=8C=EC=9E=84=20=ED=9E=98?= =?UTF-8?q?=EB=AF=BC=EC=A7=80=20=EB=A0=88=EB=B2=A8=EC=97=85=EA=B3=BC=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=20=EC=95=88=EB=90=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Ino_nerdnavis.txt | 2 -- Assets/Script/Server/ServerClass.cs | 49 +++++++++++------------------ 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/Assets/Ino_nerdnavis.txt b/Assets/Ino_nerdnavis.txt index 90fd0dc0e..96c94311a 100644 --- a/Assets/Ino_nerdnavis.txt +++ b/Assets/Ino_nerdnavis.txt @@ -74,5 +74,3 @@ messageinfo 엄청 느린 버그 - 모두 받기 일일, 주간 초기화 확인 -인게임 힘민지 레벨업과 저장 안됨 -수상한 미궁 몹 수 이상하고, 안 움직임 diff --git a/Assets/Script/Server/ServerClass.cs b/Assets/Script/Server/ServerClass.cs index 754c149f0..83706974b 100644 --- a/Assets/Script/Server/ServerClass.cs +++ b/Assets/Script/Server/ServerClass.cs @@ -40,7 +40,10 @@ public partial class ServerData { public DateTime LastTime; public List Common; - public Dictionary> MapData; // <맵ID, <난이도, 데이터>> + /// + /// { 맵 ID, { 난이도, 데이터 } } + /// + public Dictionary> MapData = new Dictionary>(); public SD_Buff Buff; public SD_Equip Equip; /// @@ -101,22 +104,6 @@ public partial class ServerData public ServerData() { // 신규 유저 데이터 LastTime = ServerInfo.ServerTime; - MapData = new Dictionary>(); - var mapdatas = table_battlemapdifficulty.Ins.Get_DataList(); - for (int i = 0; i < mapdatas.Count; i++) - { - if (mapdatas[i].n_MapID > 0 && mapdatas[i].n_MapID < 1001) - { - var key1 = Get_Key(mapdatas[i].n_MapID); - var key2 = Get_Key(MyEnumToInt.Ins.Get_Int(mapdatas[i].e_Difficult)); - - if (!MapData.ContainsKey(key1)) - MapData.Add(key1, new Dictionary()); - - if (!MapData[key1].ContainsKey(key2)) - MapData[key1].Add(key2, new SD_MapData { Stat = new List { 0, 0, 0 } }); - } - } Buff = new SD_Buff { Time = new List { 0, 0, 0 } }; var enchantlst = table_enchanlist.Ins.Get_DataList(); for (int i = 0; i < enchantlst.Count; i++) @@ -306,7 +293,7 @@ public partial class ServerData public class ServerData_Read { public string LastTime; - public Dictionary> MapData; // <맵ID, <난이도, 데이터>> + public Dictionary> MapData = new Dictionary>(); public SD_Buff_Read Buff; public SD_Equip_Read Equip; public Dictionary> Equipment, Item, Enchant; @@ -399,18 +386,6 @@ public class ServerData_Read //temp.TotalUse = TotalUse; #region 추가 데이터 체크 - var mapdatas = table_battlemapdifficulty.Ins.Get_DataList(); - for (int i = 0; i < mapdatas.Count; i++) - { - var key1 = mapdatas[i].n_MapID.ToString(); - var key2 = MyEnumToInt.Ins.Get_Int(mapdatas[i].e_Difficult).ToString(); - - if (!temp.MapData.ContainsKey(key1)) - temp.MapData.Add(key1, new Dictionary()); - if (!temp.MapData[key1].ContainsKey(key2)) - temp.MapData[key1].Add(key2, new SD_MapData { Stat = new List { 0, 0, 0 } }); - } - DataCheck(Common, temp.Common, (int)eCommon.Max); #endregion return temp; @@ -438,6 +413,13 @@ public partial class ServerData } #region MapData + void Check_MapData(int mapid, int diff) + { + var key1 = Get_Key(mapid); + var key2 = Get_Key(diff); + if (!MapData.ContainsKey(key1)) MapData.Add(key1, new Dictionary()); + if (!MapData[key1].ContainsKey(key2)) MapData[key1].Add(key2, new SD_MapData()); + } public bool MapData_isClearChaper(int mapid, int diff) { var key1 = Get_Key(mapid); @@ -448,6 +430,7 @@ public partial class ServerData } public void MapData_SetClearChapter(int mapid, int diff) { + Check_MapData(mapid, diff); var key1 = Get_Key(mapid); var key2 = Get_Key(diff); if (MapData.ContainsKey(key1) && MapData[key1].ContainsKey(key2)) @@ -474,6 +457,7 @@ public partial class ServerData } public void MapData_Add_StatLv(int mapid, int diff, eMainStatType stat, int addlv = 1) { + Check_MapData(mapid, diff); var key1 = Get_Key(mapid); var key2 = Get_Key(diff); if (MapData.ContainsKey(key1) && MapData[key1].ContainsKey(key2)) @@ -2563,6 +2547,11 @@ public class SD_MapData public Dictionary Way = new Dictionary(); public List Stat; // 0 힘, 1 민, 2 지 + public SD_MapData() + { + Stat = new List { 0, 0, 0 }; + } + public SD_MapData_Read Get() { var rtn = new SD_MapData_Read();