Ejemplo n.º 1
0
        /// <summary>
        /// 翻倍处理
        /// </summary>
        /// <param name="client"></param>
        /// <param name="multi"></param>
        private void multi(ClientPeer client, int multi)
        {
            int       userId = userCache.GetId(client);
            FightRoom room   = fightCache.GetRoomByUId(userId);

            room.AddInMulti(userId, multi);
            if (room.multiDict.Count == 2)
            {
                room.isMulti = false;
            }
            if (room.isMulti == false)
            {
                foreach (var player in room.PlayerList)
                {
                    if (player.Identity == Identity.LANDLORD)
                    {
                        brocast(room, OpCode.FIGHT, FightCode.TURN_DEAL_BRO, player.UserId);
                    }
                }
            }
        }