|
@@ -57,11 +57,13 @@ namespace ET.Server
|
|
|
/// 绑定玩家id
|
|
|
/// </summary>
|
|
|
/// <param name="self"></param>
|
|
|
- /// <param name="playerId"></param>
|
|
|
- public static void BindPlayerId(this SessionPlayerComponent self, long playerId)
|
|
|
+ /// <param name="player"></param>
|
|
|
+ public static void BindPlayerId(this SessionPlayerComponent self, WNPlayer player)
|
|
|
{
|
|
|
- Log.Debug($"session玩家绑定组件 绑定玩家id={playerId}");
|
|
|
- self.PlayerId = playerId;
|
|
|
+ Log.Debug($"session玩家绑定组件 绑定玩家id={player.GetId()}");
|
|
|
+ self.PlayerId = player.GetId();
|
|
|
+ // 添加本地玩家数据
|
|
|
+ self.DomainScene().GetComponent<GamePlayerComponent>().Add(player.GetId(), player);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|