Exemplo n.º 1
0
 /// <summary>
 /// 抢地主
 /// </summary>
 /// <param name="clientPeer">客户端连接对象</param>
 /// <param name="value">请求参数</param>
 private void Grab(ClientPeer clientPeer, bool value)
 {
     SingleExcute.Instance.Excute(() =>
     {
         if (accountCache.IsOnline(clientPeer) == false)
         {
             return;
         }
         int aid = accountCache.GetId(clientPeer);
         int uid = userModelCache.GetUserIdByAid(aid);
         FightRoomModel fightRoom = fightRoomCache.GetFightRoomByUid(uid);
         if (value == true)
         {
             fightRoom.SetLandlord(uid);
             fightRoom.Sort(uid);
             //发送抢地主消息(包括抢地主的角色Id和底牌数据)给每个客户端发消息
             Brocast(fightRoom, OpCode.FIGHT, FightCode.GRAB_LANDLORD_BRO, new GrabDto(uid, fightRoom.TableCardList, fightRoom.GetPlayerModel(uid).CardDtos));
             //通知该玩家出牌
             Brocast(fightRoom, OpCode.FIGHT, FightCode.TURN_DEAL_BRO, uid);
         }
         else
         {
             //发送不抢地主的消息
             int nextUid = fightRoom.GetNext(uid);
             Brocast(fightRoom, OpCode.FIGHT, FightCode.TURN_GRAB_BRO, nextUid);
         }
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// 玩家中退出房间
        /// </summary>
        /// <param name="clientPeer"></param>
        private void Leave(ClientPeer clientPeer)
        {
            int aid = accountCache.GetId(clientPeer);

            if (aid == -1)
            {
                //客户端未登陆
                return;
            }
            int uid = userModelCache.GetUserIdByAid(aid);

            if (uid == -1)
            {
                //该账号下没有角色
                return;
            }

            FightRoomModel room = fightRoomCache.GetFightRoomByUid(uid);

            if (room != null)
            {
                //战斗还未结束,可以获取到房间数据
                room.Leave(uid);
                //如果房间逃跑用户有三个则直接摧毁房间
                if (room.EscapePlayerId.Count == 3)
                {
                    fightRoomCache.DestoryRoom(room);
                }
            }
            else
            {
                //战斗已结束,无法获取到房间数据,无需处理
            }
        }
Exemplo n.º 3
0
    /// <summary>
    /// 战斗开始前进行的加载
    /// </summary>
    /// <param name="model">游戏房间的数据</param>
    private void fightStart(FightRoomModel model)
    {
        //1.判断队伍1中有没有当前玩家,有的话属于队伍1
        foreach (FightPlayerModel item in model.teamOne)
        {
            if (item.id == GameData.user.id)
            {
                PlayerController.Instance.MyTeamId = 1;
                break;
            }
        }
        //2.没有的话,当前玩家属于队伍2
        if (PlayerController.Instance.MyTeamId == 0)
        {
            PlayerController.Instance.MyTeamId = 2;
        }
        //3.为两支队伍添加英雄
        foreach (FightPlayerModel item in model.teamOne)
        {
            addHero(1, item);
        }

        foreach (FightPlayerModel item in model.teamTwo)
        {
            addHero(2, item);
        }
    }
        /// <summary>
        /// 创建战斗房间,返回战斗房间数据模型
        /// </summary>
        /// <param name="uids">房间玩家id</param>
        /// <returns>战斗房间数据模型</returns>
        public FightRoomModel Create(List <int> uidList)
        {
            List <PlayerDto> players = new List <PlayerDto>();

            foreach (var uid in uidList)
            {
                players.Add(new PlayerDto(uid));
            }
            FightRoomModel fightRoom = null;

            if (fightRoomQueue.Count > 0)
            {
                fightRoom = fightRoomQueue.Dequeue();
                fightRoom.Init(players);
            }
            else
            {
                fightRoom = new FightRoomModel(this.concurrentInt.Add_Get(), players);
            }
            this.idRoomDict.Add(fightRoom.Id, fightRoom);

            foreach (var play in players)
            {
                this.uidRoomDict.Add(play.Uid, fightRoom);
            }

            return(fightRoom);
        }
Exemplo n.º 5
0
    private void fightStart(FightRoomModel model)
    {
        scene.initMap(model.map);

        foreach (FightPlayerModel item in model.teamOne)
        {
            if (item.id == GameData.user.id)
            {
                scene.myTeam = 1;
                break;
            }
        }

        if (scene.myTeam == 0)
        {
            scene.myTeam = 2;
        }

        foreach (FightPlayerModel item in model.teamOne)
        {
            addHero(1, item);
        }


        foreach (FightPlayerModel item in model.teamTwo)
        {
            addHero(2, item);
        }
    }
        /// <summary>
        /// 根据玩家id获取战斗房间数据模型
        /// </summary>
        /// <param name="uid">玩家id</param>
        /// <returns>房间数据模型</returns>
        public FightRoomModel GetFightRoomByUid(int uid)
        {
            FightRoomModel fightRoom = null;

            uidRoomDict.TryGetValue(uid, out fightRoom);
            return(fightRoom);
        }
        /// <summary>
        /// 根据房间id获取房间数据模型
        /// </summary>
        /// <param name="rid">房间id</param>
        /// <returns>房间数据模型</returns>
        public FightRoomModel GetFightRoomByRoomId(int rid)
        {
            FightRoomModel fightRoom = null;

            idRoomDict.TryGetValue(rid, out fightRoom);
            if (fightRoom == null)
            {
                throw new Exception("未获取到房间数据模型");
            }
            return(fightRoom);
        }
Exemplo n.º 8
0
        private void initGame()
        {
            FightRoomModel frm = new FightRoomModel();

            frm.teamOne         = teamOne.Values.ToArray();
            frm.teamTwo         = teamTwo.Values.ToArray();
            frm.teamOneBuildMap = teamOneBuildMap.Values.ToArray();
            frm.teamTwoBuildMap = teamTwoBuildMap.Values.ToArray();
            map     = createMap();
            frm.map = map;
            brocast(FightProtocol.FIGHT_BRO, frm);
        }
        /// <summary>
        /// 摧毁房间
        /// </summary>
        /// <param name="fightRoom">房间数据模型</param>
        public void DestoryRoom(FightRoomModel fightRoom)
        {
            //将玩家从 玩家,战斗房间字典里面移除
            foreach (var player in fightRoom.PlayerDtos)
            {
                uidRoomDict.Remove(player.Uid);
            }

            //情空房间数据
            fightRoom.Clear();
            this.idRoomDict.Remove(fightRoom.Id);
            fightRoomQueue.Enqueue(fightRoom);
        }
Exemplo n.º 10
0
        /// <summary>
        /// 不出牌
        /// </summary>
        /// <param name="clientPeer">客户端连接对象</param>
        private void Pass(ClientPeer clientPeer)
        {
            int            aid  = accountCache.GetId(clientPeer);
            int            uid  = userModelCache.GetModelByAccid(aid).Id;
            FightRoomModel room = fightRoomCache.GetFightRoomByUid(uid);

            if (room.GetCurBiggstPlayerId() == uid)
            {
            }
            else
            {
                //转换出牌者
                Turn(room, uid);
            }
        }
Exemplo n.º 11
0
 private new void Enter(UserToken token)
 {
     if (IsEntered(token))
     {
         return;
     }
     base.Enter(token);
     //所有人准备了 发送房间信息
     if (ReduIndex == 0)
     {
         FightRoomModel room = new FightRoomModel();
         room.teamOne = teamOnes.Values.ToArray();
         room.teamTwo = teamTwos.Values.ToArray();
         Brocast(FightProtocol.START_BRO, room);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// 转换出牌者
 /// </summary>
 /// <param name="room">房间</param>
 /// <param name="uid">当前出牌者id</param>
 /// <returns>下一个出牌者id</returns>
 private int Turn(FightRoomModel room, int uid)
 {
     while (true)
     {
         int next = room.Turn();
         if (room.EscapePlayerId.Contains(next))
         {
             continue;
         }
         else
         {
             Brocast(room, OpCode.FIGHT, FightCode.TURN_DEAL_BRO, next);
             return(next);
         }
     }
 }
Exemplo n.º 13
0
        /// <summary>
        /// 出牌
        /// </summary>
        /// <param name="clientPeer"></param>
        /// <param name="value"></param>
        private void Deal(ClientPeer clientPeer, DealDto dealDto)
        {
            SingleExcute.Instance.Excute(
                delegate()
            {
                //出牌者id
                int uid             = dealDto.Uid;
                FightRoomModel room = fightRoomCache.GetFightRoomByUid(uid);
                if (room.EscapePlayerId.Contains(uid))
                {
                    //玩家已经退出房间
                    Turn(room, uid);
                }
                else
                {
                    //玩家没有退出房间,判断玩家是否可以压过上一家出牌者
                    if (room.PlayCard(dealDto.Weight, dealDto.Type, dealDto.Length, dealDto.Uid, dealDto.Cards))
                    {
                        //给玩家发送出牌成功消息
                        clientPeer.Send(OpCode.FIGHT, FightCode.DEAL_SRES, 0);
                        //广播出牌成功消息

                        dealDto.RemainCards = room.GetPlayerModel(uid).CardDtos.Except(dealDto.Cards).ToList();

                        Brocast(room, OpCode.FIGHT, FightCode.DEAL_BRO, dealDto);

                        //判断玩家是否还有手牌
                        if (!room.HasCard(uid))
                        {
                            //没有手牌,结束游戏
                            GameOver(room, uid);
                        }
                        else
                        {
                            //还有手牌,转换出牌
                            Turn(room, uid);
                        }
                    }
                    else
                    {
                        //无法压过上一家的牌,出牌失败的处理
                        clientPeer.Send(OpCode.FIGHT, FightCode.DEAL_SRES, -1);
                    }
                }
            }
                );
        }
Exemplo n.º 14
0
        /// <summary>
        /// 向房间内玩家广播消息
        /// </summary>
        /// <param name="opCode"></param>
        /// <param name="fightCode"></param>
        /// <param name="value"></param>
        /// <param name="clientPeer"></param>
        public void Brocast(FightRoomModel fightRoom, int opCode, int fightCode, object value, ClientPeer exClientPeer = null)
        {
            SocketMsg socketMsg = new SocketMsg(opCode, fightCode, value);

            byte[] vs     = EncodeTool.EncodeMsg(socketMsg);
            byte[] packet = EncodeTool.EncodeMessage(vs);
            foreach (var player in fightRoom.PlayerDtos)
            {
                UserModel    userModel    = userModelCache.GetModelByUid(player.Uid);
                AccountModel accountModel = accountCache.GetModel(userModel.Aid);
                ClientPeer   clientPeer   = accountCache.GetClientPeerByAcc(accountModel.acc);
                if (clientPeer != exClientPeer)
                {
                    clientPeer.Send(packet);
                }
            }
        }
Exemplo n.º 15
0
 private new void enter(UserToken token)
 {
     if (isEntered(token))
     {
         return;
     }
     base.enter(token);
     enterCount.GetAndReduce();
     //所有人准备了 发送房间信息
     if (enterCount.get() == 0)
     {
         FightRoomModel room = new FightRoomModel();
         room.teamOne = teamOne.Values.ToArray();
         room.teamTwo = teamTwo.Values.ToArray();
         brocast(FightProtocol.START_BRO, room);
     }
 }
Exemplo n.º 16
0
    private void start(FightRoomModel value)
    {
        room = value;

        foreach (AbsFightModel item in value.teamOne)
        {
            GameObject go;
            if (item.type == ModelType.HUMAN)
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/Player/" + item.code), startPosition.position + new Vector3(Random.Range(0.5f, 1.5f), 0, Random.Range(0.5f, 1.5f)), startPosition.rotation);
            }
            else
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/build/1_" + item.code), positions[item.code - 1].position, positions[item.code - 1].rotation);
            }
            this.teamOne.Add(item.id, go);
            if (item.id == GameData.user.id)
            {
                FightScene.instance.initView((FightPlayerModel)item, go);
                FightScene.instance.lookAt();
            }
        }

        foreach (AbsFightModel item in value.teamTwo)
        {
            GameObject go;
            if (item.type == ModelType.HUMAN)
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/Player/" + item.code), startPosition1.position + new Vector3(Random.Range(5, 15), 0, Random.Range(5, 15)), startPosition1.rotation);
            }
            else
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/build/2_" + item.code), positions1[item.code - 1].position, positions1[item.code - 1].rotation);
            }
            this.teamTwo.Add(item.id, go);
            if (item.id == GameData.user.id)
            {
                FightScene.instance.initView((FightPlayerModel)item, go);
                FightScene.instance.lookAt();
            }
        }
    }
Exemplo n.º 17
0
        private void enterBattle(UserToken token)
        {
            int userId = getUserId(token);

            if (isEntered(token))
            {
                return;
            }
            base.enter(token);
            if (!enterList.Contains(userId))
            {
                enterList.Add(userId);
            }
            //所有人准备了 发送房间信息
            if (enterList.Count == heroCount)
            {
                FightRoomModel room = new FightRoomModel();
                room.teamOne = team.Values.ToArray();
                brocast(FightProtocol.START_BRO, room);
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// 开始战斗
        /// </summary>
        /// <param name="uidList"></param>
        public void StartFight(List <int> uidList)
        {
            //创建战斗房间
            FightRoomModel fightRoom = fightRoomCache.Create(uidList);

            //发牌
            fightRoom.Licensing();
            //排序
            fightRoom.Sort();
            //给每个客户端发送牌的数据
            foreach (var player in fightRoom.PlayerDtos)
            {
                UserModel    userModel    = userModelCache.GetModelByUid(player.Uid);
                AccountModel accountModel = accountCache.GetModel(userModel.Aid);
                ClientPeer   clientPeer   = accountCache.GetClientPeerByAcc(accountModel.acc);
                clientPeer.Send(OpCode.FIGHT, FightCode.GET_CARD_SRES, player.CardDtos);
            }
            //发送抢地主消息
            int first = fightRoom.GetFirstUid();

            Brocast(fightRoom, OpCode.FIGHT, FightCode.TURN_GRAB_BRO, first, null);
        }
Exemplo n.º 19
0
        void enterBattle(NetFrame.UserToken token)
        {
            int userID = getUserID(token);

            if (isEntered(token))
            {
                return;
            }
            base.enter(token);
            if (!enterList.Contains(userID))
            {
                enterList.Add(userID);
            }
            //所有人准备了 发送房间信息
            if (enterList.Count == heroCount)
            {
                FightRoomModel room = new FightRoomModel();
                room.teamOne = teamOne.Values.ToArray();
                room.teamTwo = teamTwo.Values.ToArray();
                brocast(FightProtocol.START_BRO, room);
                //刷新小兵
                refeshMonster();
            }
        }
Exemplo n.º 20
0
    private void start(FightRoomModel value)
    {
        room = value;

        int myTeam = -1;

        foreach (AbsFightModel item in value.teamOne)
        {
            if (item.id == GameData.User.id)
            {
                myTeam = item.team;
            }
        }
        if (myTeam == -1)
        {
            foreach (AbsFightModel item in value.teamTwo)
            {
                if (item.id == GameData.User.id)
                {
                    myTeam = item.team;
                }
            }
        }


        foreach (AbsFightModel item in value.teamOne)
        {
            GameObject go;
            PlayerCon  pc;
            if (item.type == ModelType.HUMAN)
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/Player/" + item.code), startPosition.position + new Vector3(UnityEngine.Random.Range(0, 2), 0, UnityEngine.Random.Range(0, 2)), startPosition.rotation);

                pc = go.GetComponent <PlayerCon>();

                pc.init((FightPlayerModel)item, myTeam);
            }
            else
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/build/1_" + item.code), positions[item.code - 1].position, positions[item.code - 1].rotation);
                pc = go.GetComponent <PlayerCon>();
                //pc.init((FightPlayerModel)item, myTeam);
            }
            this.models.Add(item.id, pc);

            if (item.id == GameData.User.id)
            {
                FightScene.instance.initView((FightPlayerModel)item, pc);
                FightScene.instance.lookAt();
            }
        }


        foreach (AbsFightModel item in value.teamTwo)
        {
            GameObject go;
            PlayerCon  pc;
            if (item.type == ModelType.HUMAN)
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/Player/" + item.code), startPosition1.position + new Vector3(UnityEngine.Random.Range(0, 2), 0, UnityEngine.Random.Range(0, 2)), startPosition1.rotation);

                pc = go.GetComponent <PlayerCon>();

                pc.init((FightPlayerModel)item, myTeam);
            }
            else
            {
                go = (GameObject)Instantiate(Resources.Load <GameObject>("prefab/build/2_" + item.code), positions1[item.code - 1].position, positions1[item.code - 1].rotation);
                pc = go.GetComponent <PlayerCon>();

                //pc.init((FightPlayerModel)item, myTeam);
            }
            this.models.Add(item.id, pc);

            if (item.id == GameData.User.id)
            {
                FightScene.instance.initView((FightPlayerModel)item, pc);
                FightScene.instance.lookAt();
            }
        }
    }
Exemplo n.º 21
0
 void start(FightRoomModel model)
 {
     FightScene._instance.start(model);
 }
Exemplo n.º 22
0
    public void start(FightRoomModel model)
    {
        int MyTeam = -1;

        foreach (AbsFightModel item in model.teamOne)
        {
            if (item.id == GameData.user.id)
            {
                MyTeam = item.team;
            }
        }
        foreach (AbsFightModel item in model.teamTwo)
        {
            if (item.id == GameData.user.id)
            {
                MyTeam = item.team;
            }
        }
        int team1 = 0;

        foreach (AbsFightModel item in model.teamOne)
        {
            GameObject go = null;
            GameObject hp = null;
            PlayerCon  pc = null;
            if (item.type == ModelType.HUMAN)
            {
                //实例化英雄
                go = LoadPlayer(item.code, teamOnePoints[team1]);
                pc = go.GetComponent <PlayerCon>();
                pc.init((FightPlayerModel)item, MyTeam);
                hp = LoadHP(go, (FightPlayerModel)item);
                gohpDic.Add(item.id, hp);
                if (item.id == GameData.user.id)
                {
                    FightUI._instance.initView((FightPlayerModel)item, go);
                    FightUI._instance.LookAt();
                }
                team1++;
            }
            else if (item.type == ModelType.BUILD)
            {
                //实例化防御塔
                FightBuildModel build = (FightBuildModel)item;
                go = Instantiate(Resources.Load("Prefab/Build/1-" + item.code)) as GameObject;
                go.transform.position = new Vector3(build.defaultVec.x, build.defaultVec.y, build.defaultVec.z);
                pc = go.GetComponent <PlayerCon>();
            }
            this.teamOne.Add(item.id, go);
            this.models.Add(item.id, pc);
        }
        int team2 = 0;

        foreach (AbsFightModel item in model.teamTwo)
        {
            GameObject go;
            PlayerCon  pc;
            GameObject hp = null;
            if (item.type == ModelType.HUMAN)
            {
                //实例化英雄
                go = LoadPlayer(item.code, teamTwoPoints[team2]);
                pc = go.GetComponent <PlayerCon>();
                pc.init((FightPlayerModel)item, MyTeam);
                hp = LoadHP(go, (FightPlayerModel)item);
                gohpDic.Add(item.id, hp);
                if (item.id == GameData.user.id)
                {
                    FightUI._instance.initView((FightPlayerModel)item, go);
                    FightUI._instance.LookAt();
                }
                team2++;
            }
            else
            {
                FightBuildModel build = (FightBuildModel)item;
                go = Instantiate(Resources.Load("Prefab/build/2-" + item.code)) as GameObject;
                go.transform.position = new Vector3(build.defaultVec.x, build.defaultVec.y, build.defaultVec.z);
                pc = go.GetComponent <PlayerCon>();
            }
            this.teamTwo.Add(item.id, go);
            this.models.Add(item.id, pc);
        }
    }
Exemplo n.º 23
0
        private void StartFight(FightRoomModel model)
        {
            room = model;

            //判断队伍
            int myTeam = -1;

            foreach (AbsFightModel item in model.teamOne)
            {
                if (item.Id == GameData.user.ID)
                {
                    myTeam = item.Team;
                }
            }
            if (myTeam == -1)
            {
                foreach (AbsFightModel item in model.teamTwo)
                {
                    if (item.Id == GameData.user.ID)
                    {
                        myTeam = item.Team;
                    }
                }
            }


            string path = null;

            foreach (AbsFightModel item in model.teamOne)
            {
                PlayerCtr ctrl = null;
                if (item.Type == ModelType.HUMAN)
                {
                    path = "Player/" + item.Code;
                    ctrl = Load(path, start1);
                    ctrl.Init((FightPlayerModel)item, myTeam);
                    this.models.Add(item.Id, ctrl);
                }
                else
                {
                    path = "Build/1_" + item.Code;
                    this.models.Add(item.Id, Load(path, position1[item.Code - 1]));
                }
                if (item.Id == GameData.user.ID)
                {
                    FightScene.Instance.InitView((FightPlayerModel)item, ctrl.gameObject);
                    FightScene.Instance.LookAt();
                }
            }

            foreach (AbsFightModel item in model.teamTwo)
            {
                PlayerCtr ctrl = null;
                if (item.Type == ModelType.HUMAN)
                {
                    path = "Player/" + item.Code;
                    ctrl = Load(path, start2);
                    ctrl.Init((FightPlayerModel)item, myTeam);
                    this.models.Add(item.Id, ctrl);
                }
                else
                {
                    path = "Build/2_" + item.Code;
                    this.models.Add(item.Id, Load(path, position2[item.Code - 1]));
                }
                if (item.Id == GameData.user.ID)
                {
                    FightScene.Instance.InitView((FightPlayerModel)item, ctrl.gameObject);
                    FightScene.Instance.LookAt();
                }
            }
        }
Exemplo n.º 24
0
        /// <summary>
        /// 结束游戏
        /// </summary>
        /// <param name="room">房间模型</param>
        /// <param name="uid">获胜角色id</param>
        private void GameOver(FightRoomModel room, int uid)
        {
            //获取获胜者身份
            int identity = room.GetPlayerIdentity(uid);

            if (identity == Identity.LANDLORD)
            {
                //地主获胜
                #region 更新地主玩家的信息,增加豆子,增加经验
                UserModel userModel = userModelCache.GetModelByUid(uid);
                userModel.Been += room.Multiple * 100 * 2;
                userModel.AddExp(20);
                userModel.Win++;
                userModelCache.Update(userModel);
                #endregion

                #region 更新农民玩家的信息,减少豆子,增加经验
                room.GetSameIdentityUids(Identity.FARMER).ForEach(u =>
                {
                    UserModel user = userModelCache.GetModelByUid(u.Uid);
                    user.Been     -= room.Multiple * 100;
                    user.Fail++;
                    user.AddExp(10);
                    userModelCache.Update(user);
                });
                #endregion
            }
            else
            {
                //农民获胜
                #region 更新农民玩家的信息,增加豆子,增加经验
                room.GetSameIdentityUids(Identity.FARMER).ForEach(u =>
                {
                    UserModel user = userModelCache.GetModelByUid(u.Uid);
                    user.Been     += room.Multiple * 100;
                    user.Win++;
                    user.AddExp(20);
                    userModelCache.Update(user);
                });
                #endregion

                #region 更新地主玩家的信息,减少豆子,增加经验
                room.GetSameIdentityUids(Identity.LANDLORD).ForEach(u =>
                {
                    UserModel user = userModelCache.GetModelByUid(u.Uid);
                    user.Been     -= room.Multiple * 100 * 2;
                    user.Fail++;
                    user.AddExp(10);
                    userModelCache.Update(user);
                });
                #endregion
            }

            //惩罚逃跑者
            userModelCache.GetModelsByUids(room.EscapePlayerId).ForEach(u =>
            {
                u.Been -= room.Multiple * 100;
                u.Escape++;
                userModelCache.Update(u);
            });


            OverDto overDto = new OverDto();
            overDto.WinIdentity = identity;
            List <PlayerDto> playerDtos = room.GetSameIdentityUids(identity);
            List <int>       uids       = new List <int>();
            foreach (var item in playerDtos)
            {
                uids.Add(item.Uid);
            }
            overDto.WinUidList = uids;
            overDto.BeenCount  = room.Multiple * 100;
            //广播游戏结束消息
            Brocast(room, OpCode.FIGHT, FightCode.OVER, overDto);

            //摧毁匹配房间
            RoomCache roomCache = Caches.RoomCache;
            roomCache.DestoryRoom(roomCache.GetRoomModelByUid(uid));

            //摧毁战斗房间
            fightRoomCache.DestoryRoom(room);
        }