baseline: OpenMU upstream b5a0961 (fresh source)

This commit is contained in:
Acentech Dev
2026-07-14 19:00:35 +03:00
parent 450402e47d
commit 36fc125d5c
11968 changed files with 748705 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
// <copyright file="PeriodicTaskGameServerState.cs" company="MUnique">
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>
namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks;
/// <summary>
/// Game server state per event.
/// </summary>
public class PeriodicTaskGameServerState
{
/// <summary>
/// Initializes a new instance of the <see cref="PeriodicTaskGameServerState"/> class.
/// </summary>
/// <param name="context">The context.</param>
public PeriodicTaskGameServerState(IGameContext context)
{
this.Context = context;
}
/// <summary>
/// Gets the context to which this state belongs.
/// </summary>
public IGameContext Context { get; }
/// <summary>
/// Gets or sets the next run in UTC.
/// </summary>
public DateTime NextRunUtc { get; set; } = DateTime.UtcNow;
/// <summary>
/// Gets or sets the UTC timestamp of when the last event run started.
/// Used to prevent a new event from starting before the previous task duration has elapsed.
/// </summary>
public DateTime LastRunUtc { get; set; } = DateTime.MinValue;
/// <summary>
/// Gets or sets the state.
/// </summary>
public PeriodicTaskState State { get; set; } = PeriodicTaskState.NotStarted;
/// <summary>
/// Gets the description about the state.
/// </summary>
public virtual string Description => string.Empty;
}