public override void OnReceivedRoomListUpdate() { foreach (GameObject obj in GameObject.FindGameObjectsWithTag("GameRoomCell")) { Destroy(obj); } scrollContent.GetComponent <RectTransform>().sizeDelta = Vector2.zero; foreach (RoomInfo room in PhotonNetwork.GetRoomList()) { GameObject gameRoomCellObject = Instantiate(gameRoomCellPrefab); gameRoomCellObject.transform.SetParent(scrollContent.transform, false); GameRoomInfo gameRoomInfo = new GameRoomInfo(room.Name, room.PlayerCount, room.MaxPlayers); GameRoomCell gameRoomCell = gameRoomCellObject.GetComponent <GameRoomCell>(); gameRoomCell.SetRoomInfo(gameRoomInfo); //셀 선택 동작 gameRoomCellObject.GetComponent <Button>().onClick.AddListener( delegate { Interactable(false); //룸 셀 클랙 시 상호작용 불가능하게. PhotonNetwork.JoinRoom(gameRoomInfo.roomName); }); scrollContent.GetComponent <RectTransform>().sizeDelta += new Vector2(0, 70); } }
/// <summary> /// 获取游戏房间实体 /// </summary> /// <param name="gameID"></param> /// <returns></returns> public GameRoomInfo GetGameRoomInfoInfo(int serverID) { string sqlQuery = string.Format("(NOLOCK) WHERE ServerID= {0}", serverID); GameRoomInfo gameRoomInfo = aideGameRoomInfoProvider.GetObject <GameRoomInfo>(sqlQuery); return(gameRoomInfo); }
private void GameRoomInfoDataBind() { if (StrCmd == "add") { litInfo.Text = "新增"; } else { litInfo.Text = "更新"; } if (IntParam <= 0) { return; } //获取游戏信息 GameRoomInfo gameRoomInfo = FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(IntParam); if (gameRoomInfo == null) { ShowError("房间信息不存在"); Redirect("GameRoomInfoList.aspx"); return; } CtrlHelper.SetText(txtServerName, gameRoomInfo.ServerName.Trim()); ddlKindID.SelectedValue = gameRoomInfo.KindID.ToString().Trim(); ddlNode.SelectedValue = gameRoomInfo.NodeID.ToString( ).Trim( ); CtrlHelper.SetText(txtSortID, gameRoomInfo.SortID.ToString().Trim()); ddlGameID.SelectedValue = gameRoomInfo.GameID.ToString().Trim(); CtrlHelper.SetText(txtTableCount, gameRoomInfo.TableCount.ToString().Trim()); ddlServerType.SelectedValue = gameRoomInfo.ServerType.ToString().Trim(); CtrlHelper.SetText(txtServerPort, gameRoomInfo.ServerPort.ToString().Trim()); ddlDataBaseAddr.SelectedValue = gameRoomInfo.DataBaseAddr.Trim(); CtrlHelper.SetText(txtDataBaseName, gameRoomInfo.DataBaseName.Trim()); CtrlHelper.SetText(txtCellScore, gameRoomInfo.CellScore.ToString().Trim()); CtrlHelper.SetText(txtRevenueRatio, gameRoomInfo.RevenueRatio.ToString().Trim()); CtrlHelper.SetText(txtRestrictScore, gameRoomInfo.RestrictScore.ToString().Trim()); CtrlHelper.SetText(txtMinTableScore, gameRoomInfo.MinTableScore.ToString().Trim()); CtrlHelper.SetText(txtMinEnterScore, gameRoomInfo.MinEnterScore.ToString().Trim()); CtrlHelper.SetText(txtMaxEnterScore, gameRoomInfo.MaxEnterScore.ToString().Trim()); CtrlHelper.SetText(txtMinEnterMember, gameRoomInfo.MinEnterMember.ToString().Trim()); CtrlHelper.SetText(txtMaxEnterMember, gameRoomInfo.MaxEnterMember.ToString().Trim()); CtrlHelper.SetText(txtMaxPlayer, gameRoomInfo.MaxPlayer.ToString().Trim()); CtrlHelper.SetText(txtServerRule, gameRoomInfo.ServerRule.ToString().Trim()); CtrlHelper.SetText(txtDistributeRule, gameRoomInfo.DistributeRule.ToString().Trim()); CtrlHelper.SetText(txtMinDistributeUser, gameRoomInfo.MinDistributeUser.ToString().Trim()); //CtrlHelper.SetText(txtMaxDistributeUser, gameRoomInfo.MaxDistributeUser.ToString().Trim()); CtrlHelper.SetText(txtDistributeTimeSpace, gameRoomInfo.DistributeTimeSpace.ToString().Trim()); CtrlHelper.SetText(txtDistributeDrawCount, gameRoomInfo.DistributeDrawCount.ToString().Trim()); //CtrlHelper.SetText(txtDistributeStartDelay, gameRoomInfo.DistributeStartDelay.ToString().Trim()); CtrlHelper.SetText(txtAttachUserRight, gameRoomInfo.AttachUserRight.ToString().Trim()); CtrlHelper.SetText(txtServiceMachine, gameRoomInfo.ServiceMachine.Trim()); CtrlHelper.SetText(txtCustomRule, gameRoomInfo.CustomRule.Trim()); rbtnNullity.SelectedValue = gameRoomInfo.Nullity.ToString().Trim(); CtrlHelper.SetText(txtServerNote, gameRoomInfo.ServerNote.Trim()); CtrlHelper.SetText(lblCreateDateTime, gameRoomInfo.CreateDateTime.ToString()); CtrlHelper.SetText(lblModifyDateTime, gameRoomInfo.ModifyDateTime.ToString()); }
public void SetRoomInfo(GameRoomInfo roomInfo) { roomNameText.text = roomInfo.roomName; totalPlayerText.text = string.Format("{0}/{1}", roomInfo.playerCount, roomInfo.maxPlayer); }
//방 정보 변경 감지 + 방 목록 확인 가능 함수 public override void OnReceivedRoomListUpdate() { foreach (GameObject obj in GameObject.FindGameObjectsWithTag("GameRoomCell")) { Destroy(obj); } scrollContent.GetComponent <RectTransform>().sizeDelta = Vector2.zero; int rowCount = 0; foreach (RoomInfo room in PhotonNetwork.GetRoomList()) { GameObject gameRoomCellObject = Instantiate(gameRoomCellPrefab); gameRoomCellObject.transform.SetParent(scrollContent.transform, false); //게임정보를 담은 구조체로 객체 생성 GameRoomInfo gameRoomInfo = new GameRoomInfo(room.Name, room.PlayerCount, room.MaxPlayers); GameRoomCell gameRoomCell = gameRoomCellObject.GetComponent <GameRoomCell>(); gameRoomCell.SetRoomInfo(gameRoomInfo); //셀 선택 동작 //OnClick 이벤트가 실행되면(AddListener가 주시하다가) 델리게이트 무명함수를 실행 gameRoomCellObject.GetComponent <Button>().onClick.AddListener(delegate { PhotonNetwork.JoinRoom(gameRoomInfo.roomName); }); scrollContent.GetComponent <RectTransform>().sizeDelta += new Vector2(0, 80); } //base.OnReceivedRoomListUpdate(); }
private GameType ParseGameType(GameRoomInfo gameRoomInfo) { if (gameRoomInfo.GameRoomType == GameRoomType.GAME_ROOM_OMAHA || gameRoomInfo.GameRoomType == GameRoomType.GAME_ROOM_OMAHA_INSURANCE) { return(GameType.NoLimitOmaha); } return(GameType.NoLimitHoldem); }
/// <summary> /// 获取房间名称 /// </summary> /// <param name="serverID"></param> /// <returns></returns> protected string GetGameRoomName(int serverID) { GameRoomInfo gameRoom = aidePlatformFacade.GetGameRoomInfoInfo(serverID); if (gameRoom == null) { return(""); } return(gameRoom.ServerName); }
public static string GetGameRoomName(int serverID) { GameRoomInfo gameRoomInfoInfo = FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(serverID); if (gameRoomInfoInfo == null) { return(""); } return(gameRoomInfoInfo.ServerName); }
/// <summary> /// 通过游戏房间获取Table td /// </summary> /// <param name="serverId"></param> /// <returns></returns> public string GetGameRoomInfo(int serverId) { GameRoomInfo roomInfo = FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(serverId); if (roomInfo == null) { return("<td></td><td></td>"); } GameGameItem kindInfo = FacadeManage.aidePlatformFacade.GetGameGameItemInfo(roomInfo.KindID); return($"<td>{kindInfo.GameName}</td><td>{roomInfo.ServerName}</td>"); }
/// <summary> /// 获取游戏名称 /// </summary> /// <param name="serverID"></param> /// <returns></returns> protected string GameGameNameByServerID(int serverID) { GameRoomInfo gameRoomInfo = FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(serverID); if (gameRoomInfo != null) { GameKindItem gameKindItem = FacadeManage.aidePlatformFacade.GetGameKindItemInfo(gameRoomInfo.KindID); if (gameKindItem != null) { return(gameKindItem.KindName); } } return(""); }
private TableType ParseTableType(GameRoomInfo gameRoomInfo) { if (gameRoomInfo.GameRoomType == GameRoomType.GAME_ROOM_SNG && gameRoomInfo.SNGGameRoomBaseInfo != null) { switch (gameRoomInfo.SNGGameRoomBaseInfo.SNGRoomtype) { case SNGRoomType.DEEP_SNG: return(TableType.FromTableTypeDescriptions(TableTypeDescription.Deep)); case SNGRoomType.LONG_SNG: return(TableType.FromTableTypeDescriptions(TableTypeDescription.Slow)); case SNGRoomType.QUICK_SNG: return(TableType.FromTableTypeDescriptions(TableTypeDescription.Speed)); } } return(TableType.FromTableTypeDescriptions(TableTypeDescription.Regular)); }
/// <summary> /// 新增游戏房间 /// </summary> /// <param name="gameGameItem"></param> public void InsertGameRoomInfo(GameRoomInfo gameRoomInfo) { DataRow dr = aideGameRoomInfoProvider.NewRow(); dr[GameRoomInfo._ServerID] = gameRoomInfo.ServerID; dr[GameRoomInfo._ServerName] = gameRoomInfo.ServerName; dr[GameRoomInfo._KindID] = gameRoomInfo.KindID; dr[GameRoomInfo._SortID] = gameRoomInfo.SortID; dr[GameRoomInfo._NodeID] = gameRoomInfo.NodeID; dr[GameRoomInfo._GameID] = gameRoomInfo.GameID; dr[GameRoomInfo._TableCount] = gameRoomInfo.TableCount; dr[GameRoomInfo._ServerType] = gameRoomInfo.ServerType; dr[GameRoomInfo._ServerPort] = gameRoomInfo.ServerPort; dr[GameRoomInfo._DataBaseName] = gameRoomInfo.DataBaseName; dr[GameRoomInfo._DataBaseAddr] = gameRoomInfo.DataBaseAddr; dr[GameRoomInfo._CellScore] = gameRoomInfo.CellScore; dr[GameRoomInfo._RevenueRatio] = gameRoomInfo.RevenueRatio; dr[GameRoomInfo._RestrictScore] = gameRoomInfo.RestrictScore; dr[GameRoomInfo._MinTableScore] = gameRoomInfo.MinTableScore; dr[GameRoomInfo._MinEnterScore] = gameRoomInfo.MinEnterScore; dr[GameRoomInfo._MaxEnterScore] = gameRoomInfo.MaxEnterScore; dr[GameRoomInfo._MinEnterMember] = gameRoomInfo.MinEnterMember; dr[GameRoomInfo._MaxEnterMember] = gameRoomInfo.MaxEnterMember; dr[GameRoomInfo._MaxPlayer] = gameRoomInfo.MaxPlayer; dr[GameRoomInfo._ServerRule] = gameRoomInfo.ServerRule; dr[GameRoomInfo._DistributeRule] = gameRoomInfo.DistributeRule; dr[GameRoomInfo._MinDistributeUser] = gameRoomInfo.MinDistributeUser; dr[GameRoomInfo._MaxDistributeUser] = gameRoomInfo.MaxDistributeUser; dr[GameRoomInfo._DistributeTimeSpace] = gameRoomInfo.DistributeTimeSpace; dr[GameRoomInfo._DistributeDrawCount] = gameRoomInfo.DistributeDrawCount; dr[GameRoomInfo._DistributeStartDelay] = gameRoomInfo.DistributeStartDelay; dr[GameRoomInfo._AttachUserRight] = gameRoomInfo.AttachUserRight; dr[GameRoomInfo._ServiceMachine] = gameRoomInfo.ServiceMachine; dr[GameRoomInfo._CustomRule] = gameRoomInfo.CustomRule; dr[GameRoomInfo._Nullity] = gameRoomInfo.Nullity; dr[GameRoomInfo._ServerNote] = gameRoomInfo.ServerNote; dr[GameRoomInfo._CreateDateTime] = gameRoomInfo.CreateDateTime; dr[GameRoomInfo._ModifyDateTime] = gameRoomInfo.ModifyDateTime; dr[GameRoomInfo._ServiceScore] = gameRoomInfo.ServiceScore; aideGameRoomInfoProvider.Insert(dr); }
private TournamentDescriptor ParseTournamentDescriptor(GameRoomInfo gameRoomInfo) { if (!gameRoomInfo.IsTournament) { return(null); } var tournamentDescriptor = new TournamentDescriptor { BuyIn = Buyin.FromBuyinRake(PMImporterHelper.ConvertSNGTypeToBuyIn(gameRoomInfo.SNGGameRoomBaseInfo.SNGRoomtype), 0, Currency.YUAN), Speed = gameRoomInfo.SNGGameRoomBaseInfo.SNGRoomtype == SNGRoomType.QUICK_SNG ? TournamentSpeed.Turbo : TournamentSpeed.Regular, StartDate = DateTimeHelper.UnixTimeToDateTime(gameRoomInfo.SNGGameRoomBaseInfo.StartTime / 1000), TournamentName = gameRoomInfo.SNGGameRoomBaseInfo.RoomName, TournamentId = gameRoomInfo.SNGGameRoomBaseInfo.GameRoomId.ToString(), TotalPlayers = (short)gameRoomInfo.SNGGameRoomBaseInfo.GameRoomUserMaxNums }; return(tournamentDescriptor); }
/// <summary> /// 更新游戏房间 /// </summary> /// <param name="gameGameItem"></param> public Message UpdateGameRoomInfo(GameRoomInfo gameRoomInfo) { aidePlatformData.UpdateGameRoomInfo(gameRoomInfo); return(new Message(true)); }
/// <summary> /// 新增游戏房间 /// </summary> /// <param name="gameGameItem"></param> public Message InsertGameRoomInfo(GameRoomInfo gameRoomInfo) { aidePlatformData.InsertGameRoomInfo(gameRoomInfo); return(new Message(true)); }
/// <summary> /// 获取房间名称 /// </summary> /// <param name="roomid"></param> /// <returns></returns> public string GetRoomName(int roomid) { GameRoomInfo info = FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(roomid); return(info != null ? info.ServerName : ""); }
/// <summary> /// 获取房间名称 /// </summary> public string GetGameRoomName(int serverid) { GameRoomInfo room = FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(serverid); return(room != null ? room.ServerName : ""); }
private void ProcessData() { string serverName = CtrlHelper.GetText(txtServerName); //房间名称 string sortID = CtrlHelper.GetText(txtSortID); //排序 string tableCount = CtrlHelper.GetText(txtTableCount); //桌子数量 string serverPort = CtrlHelper.GetText(txtServerPort); //服务端口 string cellScore = CtrlHelper.GetText(txtServerPort); //单位积分 bigint string revenueRatio = CtrlHelper.GetText(txtRevenueRatio); //税收比例 tinyint string restrictScore = CtrlHelper.GetText(txtRestrictScore); //限制积分 bigint string minTableScore = CtrlHelper.GetText(txtMinTableScore); //最低积分 bigint string minEnterScore = CtrlHelper.GetText(txtMinEnterScore); //最小进入积分 bigint string maxEnterScore = CtrlHelper.GetText(txtMaxEnterScore); //最大进入积分 bigint string minEnterMember = CtrlHelper.GetText(txtMinEnterMember); //最小进入等级 string maxEnterMember = CtrlHelper.GetText(txtMaxEnterMember); //最大进入等级 string maxPlayer = CtrlHelper.GetText(txtMaxPlayer); //最大玩家数目 string serverRule = CtrlHelper.GetText(txtServerRule); //房间规则 string distributeRule = CtrlHelper.GetText(txtDistributeRule); //分组规则 string minDistributeUser = CtrlHelper.GetText(txtMinDistributeUser); //最小人数 string maxDistributeUser = CtrlHelper.GetText(txtMaxDistributeUser); //最大人数 string distributeTimeSpace = CtrlHelper.GetText(txtDistributeTimeSpace); //分组间隔 string distributeDrawCount = CtrlHelper.GetText(txtDistributeDrawCount); //分组局数 string distributeStartDelay = CtrlHelper.GetText(txtDistributeStartDelay); //开始延时 string attachUserRight = CtrlHelper.GetText(txtAttachUserRight); //附加属性 #region 数据验证 if (string.IsNullOrEmpty(serverName)) { ShowError("房间名称必须填写"); return; } if (!Utils.Validate.IsPositiveInt(sortID)) { ShowError("排序不规范,排序只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(tableCount)) { ShowError("桌子数量不规范,桌子只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(serverPort)) { ShowError("服务端口不规范,服务端口只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt64(cellScore)) { ShowError("单位积分不规范,单位积分只能为0或正整数"); return; } if (!Utils.Validate.IsPositiveInt64(revenueRatio) || Convert.ToInt32(revenueRatio) > 255) { ShowError("税收比例不规范,单位积分只能为0或正整数,且最大值不能超过255"); return; } if (!Utils.Validate.IsPositiveInt64(minTableScore)) { ShowError("最低积分不规范,最低积分只能为0或正整数"); return; } if (!Utils.Validate.IsPositiveInt64(minEnterScore)) { ShowError("最小进入积分不规范,最小进入积分只能为0或正整数"); return; } if (!Utils.Validate.IsPositiveInt64(maxEnterScore)) { ShowError("最大进入积分不规范,最大进入积分只能为0或正整数"); return; } if (!Utils.Validate.IsPositiveInt(minEnterMember)) { ShowError("最小进入等级不规范,最小进入等级只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(maxEnterMember)) { ShowError("最大进入等级不规范,最大进入等级只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(maxPlayer)) { ShowError("最大玩家数目不规范,最大玩家数目只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(serverRule)) { ShowError("房间规则不规范,房间规则只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(distributeRule)) { ShowError("分组规则不规范,分组规则只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(minDistributeUser)) { ShowError("最小人数不规范,最小人数只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(maxDistributeUser)) { ShowError("最大人数不规范,最大人数只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(distributeTimeSpace)) { ShowError("分组间隔不规范,分组间隔只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(distributeDrawCount)) { ShowError("分组局数不规范,分组局数只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(distributeStartDelay)) { ShowError("开始延时不规范,开始延时只能为0或正整数,且最大值不能超过2,147,483,647"); return; } if (!Utils.Validate.IsPositiveInt(attachUserRight)) { ShowError("附加属性不规范,附加属性只能为0或正整数,且最大值不能超过2,147,483,647"); return; } #endregion GameRoomInfo gameRoomInfo = new GameRoomInfo(); gameRoomInfo.ServerName = CtrlHelper.GetText(txtServerName); gameRoomInfo.KindID = Convert.ToInt32(ddlKindID.SelectedValue.Trim()); gameRoomInfo.NodeID = Convert.ToInt32(ddlNode.SelectedValue.Trim( )); gameRoomInfo.SortID = CtrlHelper.GetInt(txtSortID, 0); gameRoomInfo.GameID = Convert.ToInt32(ddlGameID.SelectedValue.Trim()); gameRoomInfo.TableCount = CtrlHelper.GetInt(txtTableCount, 0); gameRoomInfo.ServerType = Convert.ToInt32(ddlServerType.SelectedValue.Trim()); gameRoomInfo.ServerPort = CtrlHelper.GetInt(txtServerPort, 0); gameRoomInfo.DataBaseName = CtrlHelper.GetText(txtDataBaseName); gameRoomInfo.DataBaseAddr = ddlDataBaseAddr.SelectedValue.Trim(); gameRoomInfo.CellScore = Convert.ToInt64(CtrlHelper.GetInt(txtCellScore, 0)); gameRoomInfo.RevenueRatio = Convert.ToByte(CtrlHelper.GetInt(txtRevenueRatio, 0)); gameRoomInfo.RestrictScore = Convert.ToInt64(CtrlHelper.GetInt(txtRestrictScore, 0)); gameRoomInfo.MinTableScore = Convert.ToInt64(CtrlHelper.GetInt(txtMinTableScore, 0)); gameRoomInfo.MinEnterScore = Convert.ToInt64(CtrlHelper.GetInt(txtMinEnterScore, 0)); gameRoomInfo.MaxEnterScore = Convert.ToInt64(CtrlHelper.GetInt(txtMaxEnterScore, 0)); gameRoomInfo.MinEnterMember = CtrlHelper.GetInt(txtMinEnterMember, 0); gameRoomInfo.MaxEnterMember = CtrlHelper.GetInt(txtMaxEnterMember, 0); gameRoomInfo.MaxPlayer = CtrlHelper.GetInt(txtMaxPlayer, 0); gameRoomInfo.ServerRule = CtrlHelper.GetInt(txtServerRule, 0); gameRoomInfo.DistributeRule = CtrlHelper.GetInt(txtDistributeRule, 0); gameRoomInfo.MinDistributeUser = CtrlHelper.GetInt(txtMinDistributeUser, 0); //gameRoomInfo.MaxDistributeUser = CtrlHelper.GetInt(txtMaxDistributeUser, 0); gameRoomInfo.DistributeTimeSpace = CtrlHelper.GetInt(txtDistributeTimeSpace, 0); gameRoomInfo.DistributeDrawCount = CtrlHelper.GetInt(txtDistributeDrawCount, 0); //gameRoomInfo.DistributeStartDelay = CtrlHelper.GetInt(txtDistributeStartDelay, 0); gameRoomInfo.AttachUserRight = CtrlHelper.GetInt(txtAttachUserRight, 0); gameRoomInfo.ServiceMachine = CtrlHelper.GetText(txtServiceMachine); gameRoomInfo.CustomRule = CtrlHelper.GetText(txtCustomRule); gameRoomInfo.Nullity = Convert.ToByte(rbtnNullity.SelectedValue.Trim()); gameRoomInfo.ServerNote = CtrlHelper.GetText(txtServerNote); gameRoomInfo.ServiceScore = 0; Message msg = new Message(); if (StrCmd == "add") { //判断权限 AuthUserOperationPermission(Permission.Add); msg = FacadeManage.aidePlatformFacade.InsertGameRoomInfo(gameRoomInfo); } else { //判断权限 AuthUserOperationPermission(Permission.Edit); gameRoomInfo.ServerID = IntParam; gameRoomInfo.ModifyDateTime = DateTime.Now; msg = FacadeManage.aidePlatformFacade.UpdateGameRoomInfo(gameRoomInfo); } if (msg.Success) { if (StrCmd == "add") { ShowInfo("房间信息增加成功", "GameRoomInfoList.aspx", 1200); } else { ShowInfo("房间信息修改成功", "GameRoomInfoList.aspx", 1200); } } else { ShowError(msg.Content); } }
/// <summary> /// 更新游戏房间 /// </summary> /// <param name="gameGameItem"></param> public void UpdateGameRoomInfo(GameRoomInfo gameRoomInfo) { StringBuilder sqlQuery = new StringBuilder(); sqlQuery.Append("UPDATE GameRoomInfo SET ") .Append("ServerName=@ServerName, ") .Append("KindID=@KindID, ") .Append("NodeID=@NodeID, ") .Append("SortID=@SortID, ") .Append("GameID=@GameID, ") .Append("TableCount=@TableCount, ") .Append("ServerType=@ServerType, ") .Append("ServerPort=@ServerPort, ") .Append("DataBaseName=@DataBaseName, ") .Append("DataBaseAddr=@DataBaseAddr, ") .Append("CellScore=@CellScore, ") .Append("RevenueRatio=@RevenueRatio, ") .Append("RestrictScore=@RestrictScore, ") .Append("MinTableScore=@MinTableScore, ") .Append("MinEnterScore=@MinEnterScore, ") .Append("MaxEnterScore=@MaxEnterScore, ") .Append("MinEnterMember=@MinEnterMember, ") .Append("MaxEnterMember=@MaxEnterMember, ") .Append("MaxPlayer=@MaxPlayer, ") .Append("ServerRule=@ServerRule, ") .Append("DistributeRule=@DistributeRule, ") .Append("MinDistributeUser=@MinDistributeUser, ") .Append("MaxDistributeUser=@MaxDistributeUser, ") .Append("DistributeTimeSpace=@DistributeTimeSpace, ") .Append("DistributeDrawCount=@DistributeDrawCount, ") .Append("DistributeStartDelay=@DistributeStartDelay, ") .Append("AttachUserRight=@AttachUserRight, ") .Append("ServiceMachine=@ServiceMachine, ") .Append("CustomRule=@CustomRule, ") .Append("Nullity=@Nullity, ") .Append("ServerNote=@ServerNote, ") .Append("ModifyDateTime=@ModifyDateTime ") .Append("WHERE ServerID=@ServerID"); var prams = new List <DbParameter>(); prams.Add(Database.MakeInParam("ServerName", gameRoomInfo.ServerName)); prams.Add(Database.MakeInParam("KindID", gameRoomInfo.KindID)); prams.Add(Database.MakeInParam("NodeID", gameRoomInfo.NodeID)); prams.Add(Database.MakeInParam("SortID", gameRoomInfo.SortID)); prams.Add(Database.MakeInParam("GameID", gameRoomInfo.GameID)); prams.Add(Database.MakeInParam("TableCount", gameRoomInfo.TableCount)); prams.Add(Database.MakeInParam("ServerType", gameRoomInfo.ServerType)); prams.Add(Database.MakeInParam("ServerPort", gameRoomInfo.ServerPort)); prams.Add(Database.MakeInParam("DataBaseName", gameRoomInfo.DataBaseName)); prams.Add(Database.MakeInParam("DataBaseAddr", gameRoomInfo.DataBaseAddr)); prams.Add(Database.MakeInParam("CellScore", gameRoomInfo.CellScore)); prams.Add(Database.MakeInParam("RevenueRatio", gameRoomInfo.RevenueRatio)); prams.Add(Database.MakeInParam("RestrictScore", gameRoomInfo.RestrictScore)); prams.Add(Database.MakeInParam("MinTableScore", gameRoomInfo.MinTableScore)); prams.Add(Database.MakeInParam("MinEnterScore", gameRoomInfo.MinEnterScore)); prams.Add(Database.MakeInParam("MaxEnterScore", gameRoomInfo.MaxEnterScore)); prams.Add(Database.MakeInParam("MinEnterMember", gameRoomInfo.MinEnterMember)); prams.Add(Database.MakeInParam("MaxEnterMember", gameRoomInfo.MaxEnterMember)); prams.Add(Database.MakeInParam("MaxPlayer", gameRoomInfo.MaxPlayer)); prams.Add(Database.MakeInParam("ServerRule", gameRoomInfo.ServerRule)); prams.Add(Database.MakeInParam("DistributeRule", gameRoomInfo.DistributeRule)); prams.Add(Database.MakeInParam("MinDistributeUser", gameRoomInfo.MinDistributeUser)); prams.Add(Database.MakeInParam("MaxDistributeUser", gameRoomInfo.MaxDistributeUser)); prams.Add(Database.MakeInParam("DistributeTimeSpace", gameRoomInfo.DistributeTimeSpace)); prams.Add(Database.MakeInParam("DistributeDrawCount", gameRoomInfo.DistributeDrawCount)); prams.Add(Database.MakeInParam("DistributeStartDelay", gameRoomInfo.DistributeStartDelay)); prams.Add(Database.MakeInParam("AttachUserRight", gameRoomInfo.AttachUserRight)); prams.Add(Database.MakeInParam("ServiceMachine", gameRoomInfo.ServiceMachine)); prams.Add(Database.MakeInParam("CustomRule", gameRoomInfo.CustomRule)); prams.Add(Database.MakeInParam("Nullity", gameRoomInfo.Nullity)); prams.Add(Database.MakeInParam("ServerNote", gameRoomInfo.ServerNote)); prams.Add(Database.MakeInParam("ModifyDateTime", gameRoomInfo.ModifyDateTime)); prams.Add(Database.MakeInParam("ServerID", gameRoomInfo.ServerID)); Database.ExecuteNonQuery(CommandType.Text, sqlQuery.ToString(), prams.ToArray()); }
void Awake() { randomSeedNumClass = this; }
private static UserGameInfoNet[] GetUserGameInfos(GameRoomInfo gameRoomInfo, HandHistory handHistory) { return(gameRoomInfo.UserGameInfos ?? throw new HandBuilderException(handHistory.HandId, "UserGameInfo has not been found.")); }
private void ParseCashStartRoomStateChange(SCGameRoomStateChange startRoomStateChange, GameRoomInfo gameRoomInfo, HandHistory handHistory) { var gameRoomBaseInfo = gameRoomInfo.GameRoomBaseInfo ?? throw new HandBuilderException(handHistory.HandId, "GameRoomBaseInfo must be not empty."); handHistory.TableName = startRoomStateChange.GameRoomInfo?.GameRoomBaseInfo?.RoomName; handHistory.GameDescription = new GameDescriptor( EnumPokerSites.PokerMaster, ParseGameType(gameRoomInfo), Limit.FromSmallBlindBigBlind(gameRoomBaseInfo.SmallBlinds, gameRoomBaseInfo.BigBlinds, Currency.YUAN, gameRoomBaseInfo.IsAnteRoom, gameRoomBaseInfo.Ante), ParseTableType(gameRoomInfo), SeatType.FromMaxPlayers(gameRoomBaseInfo.GameRoomUserMaxNums), null ); handHistory.GameDescription.IsStraddle = gameRoomBaseInfo.Straddle; handHistory.GameDescription.Identifier = gameRoomBaseInfo.GameRoomId; }
private void ParseTournamentStartRoomStateChange(SCGameRoomStateChange startRoomStateChange, GameRoomInfo gameRoomInfo, HandHistory handHistory) { var gameRoomBaseInfo = gameRoomInfo.SNGGameRoomBaseInfo ?? throw new HandBuilderException(handHistory.HandId, "SNGGameRoomBaseInfo must be not empty."); handHistory.TableName = startRoomStateChange.GameRoomInfo?.SNGGameRoomBaseInfo?.RoomName; handHistory.GameDescription = new GameDescriptor( PokerFormat.Tournament, EnumPokerSites.PokerMaster, ParseGameType(gameRoomInfo), Limit.FromSmallBlindBigBlind(gameRoomBaseInfo.SmallBlinds, gameRoomBaseInfo.BigBlinds, Currency.YUAN, true, gameRoomBaseInfo.Ante), ParseTableType(gameRoomInfo), SeatType.FromMaxPlayers(gameRoomBaseInfo.GameRoomUserMaxNums), ParseTournamentDescriptor(gameRoomInfo) ) { Identifier = gameRoomBaseInfo.GameRoomId }; }