Exemple #1
0
 /// <summary>
 /// Does this person want this notification
 /// </summary>
 /// <param name="playerName">The player's name who's triggering the notification</param>
 /// <param name="isGossipSystem">Is this the gossip system</param>
 /// <param name="type">what type of notification is this</param>
 /// <returns>Whether or not they want it</returns>
 public bool WantsNotification(string playerName, bool isGossipSystem, AcquaintenceNotifications type)
 {
     return(Acquaintences.Any(acq => acq.IsFriend &&
                              acq.PersonHandle.Equals(playerName, StringComparison.InvariantCultureIgnoreCase) &&
                              acq.NotificationSubscriptions.Contains(type) &&
                              isGossipSystem == acq.GossipSystem));
 }
Exemple #2
0
 /// <summary>
 /// Does this person want this notification
 /// </summary>
 /// <param name="playerName">The player's name who's triggering the notification</param>
 /// <param name="isGossipSystem">Is this the gossip system</param>
 /// <param name="type">what type of notification is this</param>
 /// <returns>Whether or not they want it</returns>
 public bool IsBlocking(string playerName, bool isGossipSystem)
 {
     return(Acquaintences.Any(acq => !acq.IsFriend &&
                              acq.PersonHandle.Equals(playerName, StringComparison.InvariantCultureIgnoreCase) &&
                              isGossipSystem == acq.GossipSystem));
 }