Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private string EnterTableAdd(tb_User _user, cs_entertable_bf100 _data)
        {
            sc_entertable_bf100 _senddata = new sc_entertable_bf100()
            {
                result = 0, fn = "sc_entertable_bf100", cc = 0
            };

            BullFight100Table table = BullFight100Lobby.instance.GetTableByRoomIDandTableID(_data.levelid, _data.tableid);

            if (table == null)
            {
                return(JsonUtils.Serialize(_senddata));
            }
            bool _succes = table.EnterTableAdditive(_user);

            _senddata.result = _succes?1:0;
            string _redata = JsonUtils.Serialize(_senddata);

            table.AddSendDataRecord(_user.UserID, _redata);
            return(_redata);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 进入房间 返回现在等待用户数
        /// </summary>
        /// <returns></returns>
        private string BankerGetBonusPot(tb_User _user, cs_bankergetbonuspot_bf100 _data)
        {
            sc_bankergetbonuspot_bf100 _senddata = new sc_bankergetbonuspot_bf100()
            {
                result = 0, fn = "sc_bankergetbonuspot_bf100", cc = 0
            };

            BullFight100Table table = BullFight100Lobby.instance.GetTableByRoomIDandTableID(_data.levelid, _data.tableid);

            if (table == null)
            {
                return(JsonUtils.Serialize(_senddata));
            }
            if (table.BankerGetBonusPot(_user.UserID))
            {
                _senddata.result = 1;
            }
            string _redata = JsonUtils.Serialize(_senddata);

            table.AddSendDataRecord(_user.UserID, _redata);
            return(_redata);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 下注一次,只有升庄牛牛才会有的
        /// </summary>
        /// <returns></returns>
        private string GambleOne(tb_User _user, cs_gambleone_bf100 _data)
        {
            sc_gambleone_bf100 _senddata = new sc_gambleone_bf100()
            {
                result = 0, fn = "sc_gambleone_bf100", cc = 0
            };

            BullFight100Table table = BullFight100Lobby.instance.GetTableByRoomIDandTableID(_data.levelid, _data.tableid);

            if (table == null)
            {
                return(JsonUtils.Serialize(_senddata));
            }
            if (table.GambleOne(_user.UserID, _data.targetpos, _data.gamble))
            {
                _senddata.result = 1;
            }
            string _redata = JsonUtils.Serialize(_senddata);

            table.AddSendDataRecord(_user.UserID, _redata);
            return(_redata);
        }