Bläddra i källkod

角色升级消息

zhenglijun 2 dagar sedan
förälder
incheckning
62788db509

+ 3 - 0
Assets/Scripts/Business/Runtime/Network/Controllers/UserInfoLevelPushCtrl.cs

@@ -1,3 +1,4 @@
+using FL.Data;
 using XGame.Framework.Network;
 
 namespace FL.Network
@@ -6,6 +7,8 @@ namespace FL.Network
     {
         protected override void OnProcess(UserInfoLevelPush message, object context)
         {
+            PlayerData.Instance.Level = message.level;
+            PlayerData.Instance.Exp = message.exp;
         }
     }
 }

+ 1 - 3
Assets/Scripts/Business/Runtime/Network/Controllers/UserInfoPushCtrl.cs

@@ -7,8 +7,6 @@ namespace FL.Network
     {
         protected override void OnProcess(UserInfoPush message, object context)
         {
-            if (message == null) return;
-
             PlayerData.Instance.UID = message.uuid;
             PlayerData.Instance.ServerId = message.sid;
             PlayerData.Instance.Name = message.name;
@@ -16,7 +14,7 @@ namespace FL.Network
             PlayerData.Instance.WXHeadIcon = message.wxhead;
             PlayerData.Instance.Level = message.level;
             PlayerData.Instance.Exp = message.exp;
-            PlayerData.Instance.LastLoginTime = (long)message.lastlogin*1000;
+            PlayerData.Instance.LastLoginTime = message.lastlogin;
             PlayerData.Instance.Recharge = message.money;
         }
     }