public static void SetRegular(RegularLocalNotificationParam param, PlayerData player) { if (param == null || player == null) { return; } DateTime utc = TimeZoneInfo.ConvertTimeToUtc(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, param.mHour, param.mMinute, param.mSecond, DateTimeKind.Local)); LocalNotification.Notification notification = (LocalNotification.Notification)null; notification.message = (__Null)param.mMessage; notification.category = (__Null)param.mCategory; LocalNotification.ScheduleWithRepeat(notification, utc.Hour, utc.Minute, utc.Second, (LocalNotification.Weekday)(int) sbyte.MaxValue); }
public static void SetStamina(LocalNotificationParam param, PlayerData player) { if (param == null || player == null) { return; } MyLocalNotification.CancelStamina(); if (!GameUtility.Config_UsePushStamina.Value) { return; } LocalNotification.Notification notification = (LocalNotification.Notification)null; notification.message = (__Null)LocalizedText.Get("sys.LOCAL_NOTIFICATION_STAMINA"); notification.category = (__Null)MyLocalNotification.LOCAL_NOTIFICATION_CATEGORY_STAMINA; long num = (long)(player.StaminaMax - player.Stamina) * player.StaminaRecverySec; if (num < (long)param.limitSec_stamina) { return; } LocalNotification.ScheduleWithTimeInterval(notification, (int)num); }