Browse Source

公告时间

zhaoyang 2 years ago
parent
commit
a7465c1db1

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -108,11 +108,11 @@ namespace GFGGame
             if (result == ErrorCode.ERR_Success)
             {
                 NoticeInfo noticeInfo = NoticeDataManager.Instance.LastNoticeInfo;
-                Debug.Log("noticeTime:" + noticeInfo.time + "  currentTime:" + (TimeInfo.Instance.ServerNow() / 1000));
+                // Debug.Log("noticeTime:" + noticeInfo.time + "  currentTime:" + (TimeInfo.Instance.ServerNow() / 1000));
 
-                long noticeTime = TimeUtil.GetDayTimeBySec(noticeInfo.time * 1000, GlobalCfgArray.globalCfg.refreshTime);
+                long noticeTime = TimeUtil.GetDayTimeBySec(noticeInfo.time, GlobalCfgArray.globalCfg.refreshTime);
                 long currentTime = TimeUtil.GetDayTimeBySec(TimeInfo.Instance.ServerNow(), GlobalCfgArray.globalCfg.refreshTime);
-                Debug.Log("noticeTime:" + noticeTime + "  currentTime:" + currentTime);
+                // Debug.Log("noticeTime:" + noticeTime + "  currentTime:" + currentTime);
                 if ((currentTime - noticeTime) / 1000 / TimeUtil.SECOND_PER_DAY < 3)
                 {
                     ViewManager.Show<SystemNoticeView>(new object[] { NoticeDataManager.Instance.LastNoticeInfo.title, NoticeDataManager.Instance.LastNoticeInfo.content });
@@ -261,7 +261,7 @@ namespace GFGGame
             int errorCode = await LoginHelper.EnterGame(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
-                if(errorCode != ErrorCode.ERR_SessionStateError && errorCode != ErrorCode.ERR_NetWorkError)
+                if (errorCode != ErrorCode.ERR_SessionStateError && errorCode != ErrorCode.ERR_NetWorkError)
                 {
                     Log.Error($"Reconnect fail, errorCode {errorCode}!");
                 }

+ 12 - 10
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Login/LoginHelper.cs

@@ -13,9 +13,10 @@ namespace ET
             {
                 accountSession = zoneScene.GetComponent<NetKcpComponent>().Create(NetworkHelper.ToIPEndPoint(address));
 
-                a2CLoginAccount = (A2C_LoginAccount)await accountSession.Call(new C2A_LoginTest() { 
-                    Account = account, 
-                    Version = GameConst.SERVER_VERSION 
+                a2CLoginAccount = (A2C_LoginAccount)await accountSession.Call(new C2A_LoginTest()
+                {
+                    Account = account,
+                    Version = GameConst.SERVER_VERSION
                 });
             }
             catch (Exception e)
@@ -48,10 +49,11 @@ namespace ET
                 {
                     passwordMD5 = MD5Helper.stringMD5(password);
                 }
-                a2CLoginAccount = (A2C_LoginAccount)await accountSession.Call(new C2A_LoginAccount() { 
-                    Account = account, 
-                    Password = passwordMD5, 
-                    Version = GameConst.SERVER_VERSION 
+                a2CLoginAccount = (A2C_LoginAccount)await accountSession.Call(new C2A_LoginAccount()
+                {
+                    Account = account,
+                    Password = passwordMD5,
+                    Version = GameConst.SERVER_VERSION
                 });
             }
             catch (Exception e)
@@ -391,7 +393,7 @@ namespace ET
             NoticeInfo noticeInfo = new NoticeInfo();
             noticeInfo.noticeId = response.NoticeId;
             noticeInfo.title = response.Title;
-            noticeInfo.time = response.TimeSec;
+            noticeInfo.time = response.TimeSec * 1000;
             noticeInfo.content = response.Content;
 
             NoticeDataManager.Instance.LastNoticeInfo = noticeInfo;
@@ -403,8 +405,8 @@ namespace ET
             A2C_GetRandomRoleName response = null;
             try
             {
-                response = (A2C_GetRandomRoleName)await GameGlobal.zoneScene.GetComponent<SessionComponent>().AccountSession?.Call(new C2A_GetRandomRoleName() 
-                { 
+                response = (A2C_GetRandomRoleName)await GameGlobal.zoneScene.GetComponent<SessionComponent>().AccountSession?.Call(new C2A_GetRandomRoleName()
+                {
                     ServerId = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>().CurrentServerId
                 });
             }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/NoticeSProxy.cs

@@ -12,7 +12,7 @@ namespace ET
             NoticeInfo noticeInfo = new NoticeInfo();
             noticeInfo.noticeId = response.Notice.NoticeId;
             noticeInfo.title = response.Notice.Title;
-            noticeInfo.time = response.Notice.TimeSec;
+            noticeInfo.time = response.Notice.TimeSec * 1000;
             noticeInfo.readStatus = response.Notice.ReadStatus;
             noticeInfo.content = "";
             NoticeDataManager.Instance.UpdateNoticeIdList(noticeInfo);
@@ -53,7 +53,7 @@ namespace GFGGame
                         NoticeInfo noticeInfo = new NoticeInfo();
                         noticeInfo.noticeId = response.NoticeList[i].NoticeId;
                         noticeInfo.title = response.NoticeList[i].Title;
-                        noticeInfo.time = response.NoticeList[i].TimeSec;
+                        noticeInfo.time = response.NoticeList[i].TimeSec * 1000;
                         noticeInfo.readStatus = response.NoticeList[i].ReadStatus;
 
                         NoticeDataManager.Instance.UpdateNoticeIdList(noticeInfo);