//直接发送小结算 public static void SamllResultsFollow(this FiveStarRoom fiveStarRoom, int[] huCardSeatIndexs) { //发送小结算信息 fiveStarRoom.SendSamllResults(); //如果是匹配服直接销毁房间 if (fiveStarRoom.RoomType == RoomType.Match) { fiveStarRoom.Dispose(); return; } //算出下局最先摸牌的玩家索引 和4人房休息玩家索引 fiveStarRoom.CalcuateFirstMoCardAndRestPlayerSeat(huCardSeatIndexs); fiveStarRoom.LittleRoundClearData();//如果是房卡模式 正常打下去 清空一下小局应该清空的数据 //房间总结算 if (fiveStarRoom.JudgeIsRoomTotalResult()) { fiveStarRoom.RoomTotalResult();//如果进入总结算 房间直接就销毁了 return; } fiveStarRoom.CurrRoomStateType = RoomStateType.ReadyIn;//更改房间游戏状态为准备中 //所有玩家取消托管 for (int i = 0; i < fiveStarRoom.FiveStarPlayerDic.Count; i++) { fiveStarRoom.FiveStarPlayerDic[i].SetCollocation(false); } }
//房间总结算 解散投票也会走这 public static async void RoomTotalResult(this FiveStarRoom fiveStarRoom) { Actor_FiveStar_TotalResult actorFiveStarTotalResult = new Actor_FiveStar_TotalResult(); for (int i = 0; i < fiveStarRoom.FiveStarPlayerDic.Count; i++) { actorFiveStarTotalResult.TotalPlayerResults.Add(FiveStarTotalPlayerResultFactory.Create(fiveStarRoom.FiveStarPlayerDic[i])); } fiveStarRoom.BroadcastMssagePlayers(actorFiveStarTotalResult); await fiveStarRoom.SaveTotalMiltary(); //房间总结算 存储大局对战记录 fiveStarRoom.SendMiltaryFriendsCircle(); //发送战绩给亲友圈服 fiveStarRoom.Dispose(); //直接销毁房间 }