lasttime 및 Get_ServerTime 제거

This commit is contained in:
Ino 2025-06-30 09:02:26 +09:00
parent 4628cc1786
commit 1c55295857
3 changed files with 25 additions and 22 deletions

View File

@ -267,6 +267,8 @@ function Get_JsonUserData()
} }
function Set_JsonUserData(urod) function Set_JsonUserData(urod)
{ {
urod.LastTime = Get_CurKoreaTime();
log.info(urod.LastTime);
server.UpdateUserReadOnlyData({ PlayFabId: currentPlayerId, Permission: "Public", Data: {"UserInfo": JSON.stringify(urod)} }); server.UpdateUserReadOnlyData({ PlayFabId: currentPlayerId, Permission: "Public", Data: {"UserInfo": JSON.stringify(urod)} });
} }
function Get_Return(errorval, add) { function Get_Return(errorval, add) {
@ -283,7 +285,7 @@ function Get_Return(errorval, add) {
} }
} }
log.info(rtn.error + ", " + rtn.time); //log.info(rtn.error + ", " + rtn.time);
return rtn; return rtn;
/* /*

View File

@ -188,7 +188,7 @@ public partial class ServerData
{ // 서버로 보내는 저장 데이터 { // 서버로 보내는 저장 데이터
ServerData_Read temp = new ServerData_Read(); ServerData_Read temp = new ServerData_Read();
temp.LastTime = LastTime.ToString("yyyyMMddHHmmss"); //temp.LastTime = LastTime.ToString("yyyyMMddHHmmss"); // 서버에서 함
temp.MapData = new Dictionary<string, Dictionary<string, SD_MapData_Read>>(); temp.MapData = new Dictionary<string, Dictionary<string, SD_MapData_Read>>();
foreach (var item in MapData) foreach (var item in MapData)
{ {
@ -255,7 +255,7 @@ public partial class ServerData
[Serializable] [Serializable]
public class ServerData_Read public class ServerData_Read
{ {
public string LastTime; public DateTime LastTime;
public Dictionary<string, Dictionary<string, SD_MapData_Read>> MapData = new Dictionary<string, Dictionary<string, SD_MapData_Read>>(); public Dictionary<string, Dictionary<string, SD_MapData_Read>> MapData = new Dictionary<string, Dictionary<string, SD_MapData_Read>>();
public SD_Buff_Read Buff; public SD_Buff_Read Buff;
public SD_Equip_Read Equip; public SD_Equip_Read Equip;
@ -288,7 +288,7 @@ public class ServerData_Read
{ // 서버 데이터 로드 { // 서버 데이터 로드
ServerData temp = new ServerData(); ServerData temp = new ServerData();
temp.IsEnemy = _isEnemy; temp.IsEnemy = _isEnemy;
temp.LastTime = DateTime.ParseExact(LastTime, "yyyyMMddHHmmss", new System.Globalization.CultureInfo("en-US")); temp.LastTime = LastTime;
temp.MapData = new Dictionary<string, Dictionary<string, SD_MapData>>(); temp.MapData = new Dictionary<string, Dictionary<string, SD_MapData>>();
foreach (var item in MapData) foreach (var item in MapData)
{ {

View File

@ -66,7 +66,7 @@ public class ServerInfo : MyCoroutine
if (m_serverTimeRefresh > 300f) // 5분 if (m_serverTimeRefresh > 300f) // 5분
{ {
m_serverTimeRefresh = 0f; m_serverTimeRefresh = 0f;
Get_ServerTime(null); //Get_ServerTime(null); // TODO 정인호 : 시간 동기화
} }
} }
@ -221,7 +221,7 @@ public class ServerInfo : MyCoroutine
m_LoginInfo = loginresult; m_LoginInfo = loginresult;
if (m_LoginInfo.InfoResultPayload != null && m_LoginInfo.InfoResultPayload.PlayerProfile != null) if (m_LoginInfo.InfoResultPayload != null && m_LoginInfo.InfoResultPayload.PlayerProfile != null)
UserName = m_LoginInfo.InfoResultPayload.PlayerProfile.DisplayName; UserName = m_LoginInfo.InfoResultPayload.PlayerProfile.DisplayName;
ServerSave_LoginToken(() => { Get_ServerTime(_servercomplete); }, _fail); ServerSave_LoginToken(() => { Get_TitleData(_servercomplete); }, _fail);
}, },
error => error =>
{ {
@ -230,22 +230,23 @@ public class ServerInfo : MyCoroutine
}); });
} }
public void Get_ServerTime(Action<bool> _servercomplete) // 서버에서 전달
{ //public void Get_ServerTime(Action<bool> _servercomplete)
PlayFabClientAPI.GetTime(new GetTimeRequest(), //{
success => // PlayFabClientAPI.GetTime(new GetTimeRequest(),
{ // success =>
ServerTime = success.Time.AddHours(MyValue.UTC); // {
ServerTimeUpdate = true; // ServerTime = success.Time.AddHours(MyValue.UTC);
if (_servercomplete != null) // ServerTimeUpdate = true;
Get_TitleData(_servercomplete); // if (_servercomplete != null)
}, // Get_TitleData(_servercomplete);
fail => // },
{ // fail =>
Get_ServerTime(_servercomplete); // {
Debug.Log("서버 시간 받아오기 실패 : " + fail.ErrorMessage); // Get_ServerTime(_servercomplete);
}); // Debug.Log("서버 시간 받아오기 실패 : " + fail.ErrorMessage);
} // });
//}
void Get_TitleData(Action<bool> _servercomplete) void Get_TitleData(Action<bool> _servercomplete)
{ {