소스 검색

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

johnclot69 2 년 전
부모
커밋
93c3bb5a3a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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>