diff --git a/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiGameServerState.cs b/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiGameServerState.cs new file mode 100644 index 0000000..57ccdf7 --- /dev/null +++ b/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiGameServerState.cs @@ -0,0 +1,23 @@ +// +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// + +namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks; + +/// +/// The state of a game server state for a heykel savasi event. +/// +public class HeykelSavasiGameServerState : PeriodicTaskGameServerState +{ + /// + /// Initializes a new instance of the class. + /// + /// The context. + public HeykelSavasiGameServerState(IGameContext context) + : base(context) + { + } + + /// + public override string Description => "Heykel Savasi"; +} diff --git a/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiStartConfiguration.cs b/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiStartConfiguration.cs new file mode 100644 index 0000000..5a7003f --- /dev/null +++ b/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiStartConfiguration.cs @@ -0,0 +1,28 @@ +// +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// + +namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks; + +/// +/// The heykel savasi start configuration. +/// +public class HeykelSavasiStartConfiguration : MiniGameStartConfiguration +{ + /// + /// Gets the default configuration for heykel savasi. + /// + public static HeykelSavasiStartConfiguration Default => + new() + { + PreStartMessageDelay = TimeSpan.Zero, + EntranceOpenedMessage = "Heykel Savasi entrance is open and closes in {0} minute(s).", + EntranceClosedMessage = "Heykel Savasi entrance closed.", + TaskDuration = TimeSpan.FromMinutes(20), + Timetable = new List + { + new(20, 0), + new(22, 0), + }, + }; +} diff --git a/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiStartPlugIn.cs b/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiStartPlugIn.cs new file mode 100644 index 0000000..90ee839 --- /dev/null +++ b/src/GameLogic/PlugIns/PeriodicTasks/HeykelSavasiStartPlugIn.cs @@ -0,0 +1,33 @@ +// +// Licensed under the MIT License. See LICENSE file in the project root for full license information. +// + +namespace MUnique.OpenMU.GameLogic.PlugIns.PeriodicTasks; + +using System.Runtime.InteropServices; +using MUnique.OpenMU.GameLogic.MiniGames; +using MUnique.OpenMU.PlugIns; + +/// +/// This plugin enables the start of the heykel savasi event. +/// +[PlugIn] +[Display(Name = nameof(HeykelSavasiStartPlugIn), Description = "Heykel Savasi event")] +[Guid("2C6E1B4A-7F3D-4E9A-9B1C-3A6D2F8E5C7B")] +public sealed class HeykelSavasiStartPlugIn : MiniGameStartBasePlugIn +{ + /// + public override MiniGameType Key => MiniGameType.HeykelSavasi; + + /// + public override object CreateDefaultConfig() + { + return HeykelSavasiStartConfiguration.Default; + } + + /// + protected override HeykelSavasiGameServerState CreateState(IGameContext gameContext) + { + return new HeykelSavasiGameServerState(gameContext); + } +}