Beispiel #1
0
 void CheckIfNotify(float oldFavor, float newFavor)
 {
     if (Settings.FavorNotifySound || Settings.FavorNotifyPopup)
     {
         bool notify = false;
         if (Settings.FavorNotifyWhenMax)
         {
             if (oldFavor < CurrentFavorMax && newFavor > CurrentFavorMax)
             {
                 notify = true;
             }
         }
         else if (oldFavor < Settings.FavorNotifyOnLevel && newFavor > Settings.FavorNotifyOnLevel)
         {
             notify = true;
         }
         if (notify)
         {
             if (Settings.FavorNotifySound)
             {
                 favorHandler.Play();
             }
             if (Settings.FavorNotifyPopup)
             {
                 favorHandler.Message = string.Format("Favor on {0} reached {1}", this.serverGroupId, newFavor);
                 favorHandler.Show();
             }
         }
     }
 }