Bläddra i källkod

【优化】解决多次登录会创建多个角色数据问题(漏提)

johnclot69 1 år sedan
förälder
incheckning
93c3bb5a3a
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      DotNet/Hotfix/Scenes/Game/Player/SessionPlayerComponentSystem.cs

+ 2 - 2
DotNet/Hotfix/Scenes/Game/Player/SessionPlayerComponentSystem.cs

@@ -55,7 +55,7 @@ namespace ET.Server
         /// <returns></returns>
         public static bool IsExist(this SessionPlayerComponent self, long playerId)
         {
-            return self.PlayerList.Any(info => info != null && info.Id == playerId);
+            return self.PlayerList.Any(info => info != null && info.PlayerId == playerId);
         }
 
         /// <summary>
@@ -66,7 +66,7 @@ namespace ET.Server
         /// <returns></returns>
         public static PlayerInfo Get(this SessionPlayerComponent self, long playerId)
         {
-            return self.PlayerList.FirstOrDefault(info => info != null && info.Id == playerId);
+            return self.PlayerList.FirstOrDefault(info => info != null && info.PlayerId == playerId);
         }
 
         /// <summary>