Example #1
0
        private static async Task UpdatePlayerInfo(Room room, int huaCount)
        {
            foreach (var gamer in room.GetAll())
            {
                if (gamer == null)
                {
                    continue;
                }
                //胜利
                if (gamer.UserID == room.huPaiUid)
                {
//                    Log.Debug("玩家:" + gamer.UserID + "胜利");
                    await DBCommonUtil.UpdatePlayerInfo(gamer.UserID, huaCount, true);
                }
                else
                {
//                    Log.Debug("玩家:" + gamer.UserID + "失败");
                    await DBCommonUtil.UpdatePlayerInfo(gamer.UserID, 0);
                }
            }
        }