인게임 힘민지 레벨업과 저장 안됨 수정

This commit is contained in:
Ino 2025-03-23 14:38:17 +09:00
parent 3feaa3d411
commit fc7cd0bc48
2 changed files with 19 additions and 32 deletions

View File

@ -74,5 +74,3 @@ messageinfo 엄청 느린 버그
- 모두 받기
일일, 주간 초기화 확인
인게임 힘민지 레벨업과 저장 안됨
수상한 미궁 몹 수 이상하고, 안 움직임

View File

@ -40,7 +40,10 @@ public partial class ServerData
{
public DateTime LastTime;
public List<ObscuredInt> Common;
public Dictionary<string, Dictionary<string, SD_MapData>> MapData; // <맵ID, <난이도, 데이터>>
/// <summary>
/// { 맵 ID, { 난이도, 데이터 } }
/// </summary>
public Dictionary<string, Dictionary<string, SD_MapData>> MapData = new Dictionary<string, Dictionary<string, SD_MapData>>();
public SD_Buff Buff;
public SD_Equip Equip;
/// <summary>
@ -101,22 +104,6 @@ public partial class ServerData
public ServerData()
{ // 신규 유저 데이터
LastTime = ServerInfo.ServerTime;
MapData = new Dictionary<string, Dictionary<string, SD_MapData>>();
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<string, SD_MapData>());
if (!MapData[key1].ContainsKey(key2))
MapData[key1].Add(key2, new SD_MapData { Stat = new List<ObscuredInt> { 0, 0, 0 } });
}
}
Buff = new SD_Buff { Time = new List<ObscuredInt> { 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<string, Dictionary<string, SD_MapData_Read>> MapData; // <맵ID, <난이도, 데이터>>
public Dictionary<string, Dictionary<string, SD_MapData_Read>> MapData = new Dictionary<string, Dictionary<string, SD_MapData_Read>>();
public SD_Buff_Read Buff;
public SD_Equip_Read Equip;
public Dictionary<string, List<double>> 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<string, SD_MapData>());
if (!temp.MapData[key1].ContainsKey(key2))
temp.MapData[key1].Add(key2, new SD_MapData { Stat = new List<ObscuredInt> { 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<string, SD_MapData>());
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<string, ObscuredInt> Way = new Dictionary<string, ObscuredInt>();
public List<ObscuredInt> Stat; // 0 힘, 1 민, 2 지
public SD_MapData()
{
Stat = new List<ObscuredInt> { 0, 0, 0 };
}
public SD_MapData_Read Get()
{
var rtn = new SD_MapData_Read();