diff --git a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js index 80104ed3a..44ef783c7 100644 --- a/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js +++ b/Assets/PlayFabEditorExtensions/Editor/Resources/.CloudScript.js @@ -267,6 +267,8 @@ function Get_JsonUserData() } function Set_JsonUserData(urod) { + urod.LastTime = Get_CurKoreaTime(); + log.info(urod.LastTime); server.UpdateUserReadOnlyData({ PlayFabId: currentPlayerId, Permission: "Public", Data: {"UserInfo": JSON.stringify(urod)} }); } 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; /* diff --git a/Assets/Script/Server/ServerClass.cs b/Assets/Script/Server/ServerClass.cs index 3b5562bfa..b929e4fcb 100644 --- a/Assets/Script/Server/ServerClass.cs +++ b/Assets/Script/Server/ServerClass.cs @@ -188,7 +188,7 @@ public partial class ServerData { // 서버로 보내는 저장 데이터 ServerData_Read temp = new ServerData_Read(); - temp.LastTime = LastTime.ToString("yyyyMMddHHmmss"); + //temp.LastTime = LastTime.ToString("yyyyMMddHHmmss"); // 서버에서 함 temp.MapData = new Dictionary>(); foreach (var item in MapData) { @@ -255,7 +255,7 @@ public partial class ServerData [Serializable] public class ServerData_Read { - public string LastTime; + public DateTime LastTime; public Dictionary> MapData = new Dictionary>(); public SD_Buff_Read Buff; public SD_Equip_Read Equip; @@ -288,7 +288,7 @@ public class ServerData_Read { // 서버 데이터 로드 ServerData temp = new ServerData(); temp.IsEnemy = _isEnemy; - temp.LastTime = DateTime.ParseExact(LastTime, "yyyyMMddHHmmss", new System.Globalization.CultureInfo("en-US")); + temp.LastTime = LastTime; temp.MapData = new Dictionary>(); foreach (var item in MapData) { diff --git a/Assets/Script/Server/ServerInfo.cs b/Assets/Script/Server/ServerInfo.cs index e76d1b82e..60d5bf990 100644 --- a/Assets/Script/Server/ServerInfo.cs +++ b/Assets/Script/Server/ServerInfo.cs @@ -66,7 +66,7 @@ public class ServerInfo : MyCoroutine if (m_serverTimeRefresh > 300f) // 5분 { m_serverTimeRefresh = 0f; - Get_ServerTime(null); + //Get_ServerTime(null); // TODO 정인호 : 시간 동기화 } } @@ -221,7 +221,7 @@ public class ServerInfo : MyCoroutine m_LoginInfo = loginresult; if (m_LoginInfo.InfoResultPayload != null && m_LoginInfo.InfoResultPayload.PlayerProfile != null) UserName = m_LoginInfo.InfoResultPayload.PlayerProfile.DisplayName; - ServerSave_LoginToken(() => { Get_ServerTime(_servercomplete); }, _fail); + ServerSave_LoginToken(() => { Get_TitleData(_servercomplete); }, _fail); }, error => { @@ -230,22 +230,23 @@ public class ServerInfo : MyCoroutine }); } - public void Get_ServerTime(Action _servercomplete) - { - PlayFabClientAPI.GetTime(new GetTimeRequest(), - success => - { - ServerTime = success.Time.AddHours(MyValue.UTC); - ServerTimeUpdate = true; - if (_servercomplete != null) - Get_TitleData(_servercomplete); - }, - fail => - { - Get_ServerTime(_servercomplete); - Debug.Log("서버 시간 받아오기 실패 : " + fail.ErrorMessage); - }); - } + // 서버에서 전달 + //public void Get_ServerTime(Action _servercomplete) + //{ + // PlayFabClientAPI.GetTime(new GetTimeRequest(), + // success => + // { + // ServerTime = success.Time.AddHours(MyValue.UTC); + // ServerTimeUpdate = true; + // if (_servercomplete != null) + // Get_TitleData(_servercomplete); + // }, + // fail => + // { + // Get_ServerTime(_servercomplete); + // Debug.Log("서버 시간 받아오기 실패 : " + fail.ErrorMessage); + // }); + //} void Get_TitleData(Action _servercomplete) {