Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/OutOfService.cs
gamer147 824309ec44 feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
2026-06-05 20:30:59 -04:00

47 lines
1.3 KiB
C#

using System;
using Wizard.ErrorDialog;
namespace Wizard;
public static class OutOfService
{
private static readonly DateTime RefundEndTime = new DateTime(2026, 10, 31, 14, 59, 59, DateTimeKind.Utc);
public const int ERROR_CODE_OUT_OF_SERVICE = 9999;
public static void ShowRefundDialog(string refundUrl)
{
SystemText systemText = Data.SystemText;
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(isSystem: true);
dialogBase.SetSize(DialogBase.Size.M);
dialogBase.SetTitleLabel(systemText.Get("System_0070"));
dialogBase.SetText(systemText.Get("System_0071"));
dialogBase.SetRefund(refundUrl, systemText.Get("System_0072"));
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn);
dialogBase.SetFadeButtonEnabled(flag: false);
dialogBase.SetPanelDepth(6000);
dialogBase.SetPanelSortingOrder(2);
UIManager.GetInstance().WebViewHelper.CloseWebViewDialog();
}
public static bool IsServiceEnded()
{
return DateTime.UtcNow > RefundEndTime;
}
public static bool ShowServiceEndedDialogIfNeeded()
{
if (IsServiceEnded())
{
ShowServiceEndedDialog();
return true;
}
return false;
}
private static void ShowServiceEndedDialog()
{
Wizard.ErrorDialog.Dialog.Create(9999);
}
}