//命令处理 //====================================================================== public void PlayerJoin(NetCmdPack pack) { NetCmdPlayerJoin ncp = (NetCmdPlayerJoin)pack.cmd; PlayerExtraData pd = new PlayerExtraData(); pd.playerData.ID = ncp.PlayerInfo.ID; pd.playerData.GoldNum = ncp.PlayerInfo.GoldNum; pd.playerData.ImgCrc = ncp.PlayerInfo.ImgCrc; pd.playerData.Level = ncp.PlayerInfo.Lvl; pd.playerData.Name = ncp.PlayerInfo.Name; byte clientSeat = SceneRuntime.ServerToClientSeat(ncp.Seat); bool launcherValid; byte clientLauncherType; SceneRuntime.CheckLauncherValid(ncp.LauncherType, out clientLauncherType, out launcherValid); m_PlayerMgr.PlayerJoin(pd, clientSeat, ncp.rateIndex, clientLauncherType, launcherValid);//m_RoomRateIndex }
public void OnPlayerJoin(IEvent iEvent) { Debug.Log("CMD_PLAYER_JOIN"); NetCmdPack pack = iEvent.parameter as NetCmdPack; NetCmdPlayerJoin ncp = (NetCmdPlayerJoin)pack.cmd; PlayerExtraData pd = new PlayerExtraData(); pd.playerData.ID = ncp.PlayerInfo.ID; pd.playerData.GoldNum = ncp.PlayerInfo.GoldNum; pd.playerData.ImgCrc = ncp.PlayerInfo.ImgCrc; pd.playerData.Level = ncp.PlayerInfo.Lvl; pd.playerData.Name = ncp.PlayerInfo.Name; byte clientSeat = SceneRuntime.ServerToClientSeat(ncp.Seat); bool launcherValid; byte clientLauncherType; SceneRuntime.CheckLauncherValid(ncp.LauncherType, out clientLauncherType, out launcherValid); //PlayerManager.Instance.PlayerJoin(pd, clientSeat, ncp.rateIndex, clientLauncherType, launcherValid); m_PlayerMgr.PlayerJoin(pd, clientSeat, ncp.rateIndex, clientLauncherType, launcherValid); }