using System.Runtime.CompilerServices; using LLib.Notifications; using Questionable.Model.Questing; namespace Questionable.Notifications; internal sealed class NotificationService(OutOfGameNotifier notifier, Configuration configuration) { public void Notify(EInteractionType interactionType, string text) { Configuration.NotificationConfiguration notifications = configuration.Notifications; int num = (notifications.Enabled ? (-1688153917) : (-1688153920)); bool flag = default(bool); while (true) { int num2 = num; int num3 = -1688153918; int num4 = num2; int num5 = num4 + num3; int num6 = num4 & num3; switch (num5 - (num6 + num6)) { case 5: num = -1688153920; break; case 0: flag = true; num = -1688153916; break; case 6: num = ((!flag) ? (-1688153911) : (-1688153909)); break; case 3: flag = notifications.AlertForSnipe; num = -1688153916; break; case 8: flag = notifications.AlertForSinglePlayerDuties; num = -1688153916; break; case 4: num = ((interactionType == EInteractionType.Snipe) ? (-1688153919) : (-1688153912)); break; case 7: num = ((interactionType == EInteractionType.SinglePlayerDuty) ? (-1688153910) : (-1688153914)); break; case 2: return; case 12: flag = notifications.AlertForDuties; num = -1688153916; break; case 10: num = -1688153918; break; case 11: return; case 9: Dispatch(text); num = -1688153911; break; case 1: num = ((interactionType == EInteractionType.Duty) ? (-1688153906) : (-1688153915)); break; } } } public void NotifyStopCondition(string text) { Configuration.NotificationConfiguration notifications = configuration.Notifications; int num = ((!notifications.Enabled) ? 2126924644 : 2126924645); while (true) { int num2 = num; int num3 = 2126924646; int num4 = num2; switch ((num4 | num3) - (num4 & num3)) { case 1: Dispatch(text); num = 2126924644; break; case 3: num = ((!notifications.AlertForStopConditions) ? 2126924644 : 2126924647); break; case 2: return; case 0: num = 2126924645; break; } } } [MethodImpl(MethodImplOptions.NoInlining)] private void Dispatch(string text) { Configuration.NotificationConfiguration notifications = configuration.Notifications; int num = ((!notifications.FlashTaskbar) ? (-1607290236) : (-1607290238)); while (true) { int num2 = num; int num3 = -1607290237; int num4 = num2; int num5; switch ((num4 | num3) - (num4 & num3)) { case 2: num = ((!notifications.PlaySound) ? (-1607290240) : (-1607290235)); break; case 3: return; case 5: num = -1607290238; break; case 7: num = ((!notifications.OnlyWhenUnfocused) ? (-1607290237) : (-1607290233)); break; case 6: _206A_202D_202D_206E_200E_200E_206F_206A_200B_206B_206C_200D_202D_202E_206B_206C_200D_206F_206C_202B_200C_206B_202E_202E_202A_202B_206F_200E_206C_200E_206A_202B_202A_206D_202C_206A_206E_206F_202E_206F_202E(notifier, _202B_206B_202E_206D_202C_202C_202E_200D_200F_200F_200B_200E_206A_206F_200F_206D_200C_202D_206B_206A_200C_200F_202A_202E_200E_202B_200B_202A_200C_200C_202E_202B_202C_206F_202D_202D_202C_202A_202D_206F_202E(notifications.SoundFile)); num = -1607290240; break; case 4: num5 = ((!_202E_200F_206F_206D_202A_206C_206B_206C_200E_202B_200C_206D_202B_200D_202D_200E_202D_206E_206F_202E_200B_202C_206D_200F_200B_200B_200C_200B_200B_206B_206F_206B_206A_206D_200C_206D_200C_202B_202A_206B_202E(notifier)) ? 1 : 0); if (num5 != 0) { goto IL_00fa; } goto IL_011b; case 0: num5 = 1; goto IL_00fa; case 1: { _206C_206B_202D_206F_206B_206A_206C_202E_206D_200B_206A_202B_202E_202E_206F_202D_202E_206D_202B_200D_206B_202B_206F_206B_202B_206E_206E_200C_200D_202D_206E_200B_206A_202D_200F_206A_202D_206B_200B_202E_202E(notifier); num = -1607290236; break; } IL_00fa: if (notifications.ShowTrayMessage) { _200E_200D_202A_200B_200B_200D_206E_202E_206A_202D_206F_206B_206B_206B_206F_202C_206D_200D_200D_200F_200C_202D_206D_200D_202A_200D_206F_202C_200E_206F_200B_206F_200D_200F_206E_200C_206C_202B_200E_206A_202E(notifier, global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E(-1179749275), text); } goto IL_011b; IL_011b: num = ((num5 == 0) ? (-1607290240) : (-1607290239)); break; } } } static void _206C_206B_202D_206F_206B_206A_206C_202E_206D_200B_206A_202B_202E_202E_206F_202D_202E_206D_202B_200D_206B_202B_206F_206B_202B_206E_206E_200C_200D_202D_206E_200B_206A_202D_200F_206A_202D_206B_200B_202E_202E(OutOfGameNotifier P_0) { P_0.FlashTaskbar(); } static bool _202E_200F_206F_206D_202A_206C_206B_206C_200E_202B_200C_206D_202B_200D_202D_200E_202D_206E_206F_202E_200B_202C_206D_200F_200B_200B_200C_200B_200B_206B_206F_206B_206A_206D_200C_206D_200C_202B_202A_206B_202E(OutOfGameNotifier P_0) { return P_0.IsGameForeground; } static void _200E_200D_202A_200B_200B_200D_206E_202E_206A_202D_206F_206B_206B_206B_206F_202C_206D_200D_200D_200F_200C_202D_206D_200D_202A_200D_206F_202C_200E_206F_200B_206F_200D_200F_206E_200C_206C_202B_200E_206A_202E(OutOfGameNotifier P_0, string P_1, string P_2) { P_0.ShowTrayNotification(P_1, P_2); } static string _202B_206B_202E_206D_202C_202C_202E_200D_200F_200F_200B_200E_206A_206F_200F_206D_200C_202D_206B_206A_200C_200F_202A_202E_200E_202B_200B_202A_200C_200C_202E_202B_202C_206F_202D_202D_202C_202A_202D_206F_202E(string P_0) { return WindowsSounds.ResolvePath(P_0); } static void _206A_202D_202D_206E_200E_200E_206F_206A_200B_206B_206C_200D_202D_202E_206B_206C_200D_206F_206C_202B_200C_206B_202E_202E_202A_202B_206F_200E_206C_200E_206A_202B_202A_206D_202C_206A_206E_206F_202E_206F_202E(OutOfGameNotifier P_0, string P_1) { P_0.PlayAlertSound(P_1); } }