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(); } } } }
public void Update() { if (sleepBonusStarted != null && meditHappened && DateTime.Now > sleepBonusStarted + TimeSpan.FromMinutes(5)) { if (lastMeditHappenedOn > DateTime.Now - TimeSpan.FromMinutes(10)) { if (Enabled) { handler.Show(); } } meditHappened = false; } handler.Update(); }