Esempio n. 1
0
        private void WorkRoomAlertQueue()
        {
            if (roomAlerts.Count > 0)
            {
                lock (roomAlerts.SyncRoot)
                {
                    while (roomAlerts.Count > 0)
                    {
                        RoomAlert alert = (RoomAlert)roomAlerts.Dequeue();

                        foreach (RoomUser user in roomUserManager.UserList.Values)
                        {
                            if (user.IsBot)
                            {
                                continue;
                            }
                            if (user.GetClient().GetHabbo().Rank >= alert.minrank)
                            {
                                continue;
                            }

                            user.GetClient().SendNotif(alert.message, false);
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 internal void QueueRoomAlert(RoomAlert alert)
 {
     lock (roomAlerts.SyncRoot)
     {
         roomAlerts.Enqueue(alert);
     }
 }
Esempio n. 3
0
        private void OnRoomUpdate(RoomAlert alert)
        {
            People       = alert.PeopleInRoom.Aggregate((a, b) => $"{a}, {b}");
            Interactions = alert.Interactions.ToList().AsReadOnly();

            Notify("People");
            Notify("Interactions");
        }
Esempio n. 4
0
        internal static void RoomAlert(uint RoomId, Boolean Caution, String Message)
        {
            Room Room = FirewindEnvironment.GetGame().GetRoomManager().GetRoom(RoomId);

            if (Room == null || Message.Length <= 1)
            {
                return;
            }

            RoomAlert alert = new RoomAlert(Message, 3);
        }