Exemplo n.º 1
0
        public void Add(Guest guest)
        {
            // Set the time entered if not set already
            if (guest.TimeEntered == null)
            {
                guest.TimeEntered = DateTime.Now;
            }

            // Add the guest to the guest list (so we can retrieve them later)
            Guests.Add(guest);

            // Check if someone is handling this event
            if (GuestAdded != null)
            {
                GuestAdded.Invoke(this, new GuestAddedEventArgs(guest));
            }
        }
Exemplo n.º 2
0
        protected virtual void OnGuestAdded(Character groupGuest)
        {
            PartyHandler.SendPartyNewGuestMessage(Clients, this, groupGuest);

            GuestAdded?.Invoke(this, groupGuest);
        }