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)); } }
protected virtual void OnGuestAdded(Character groupGuest) { PartyHandler.SendPartyNewGuestMessage(Clients, this, groupGuest); GuestAdded?.Invoke(this, groupGuest); }