示例#1
0
 public void Brocast(Packet packet, IUserToken except = null)
 {
     lock (this._lockObj)
     {
         SendHelper.Brocast(this._users, packet, except);
     }
 }
示例#2
0
        public void Brocast(Packet packet, IUserToken except = null)
        {
            List <string> users = new List <string>();

            CacheFactory.HALL_CACHE.ForeachUser(user =>
            {
                users.Add(user);
            });
            SendHelper.Brocast(users, packet, except);
        }
示例#3
0
        private void BrocastTeam(Room room, int teamIndex, Packet packet,
                                 IUserToken except = null)
        {
            List <Room.Player> team = teamIndex == 0 ? room.teamOne : room.teamTwo;

            if (team.Count == 0)
            {
                return;
            }

            List <string> users = new List <string>();

            lock (CacheFactory.ROOM_CACHE.lockObj2)
            {
                int count = team.Count;
                for (int i = 0; i < count; i++)
                {
                    users.Add(team[i].id);
                }
            }
            SendHelper.Brocast(users, packet, except);
        }