// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // namespace MUnique.OpenMU.GameLogic.CastleSiege; /// /// One player operating one Crown Switch. The player starts it by clicking the switch and keeps it by /// staying in its area; the switch counts as held for the guild once the operation has run its time. /// public class CastleSiegeSwitchOperation { /// Initializes a new instance of the class. /// The operating player's guild identifier. /// The operating player's guild name, for display. /// The operating player's object identifier on the map. /// The operating player's name, for display. /// The switch NPC's object identifier on the map. /// When the operation started (UTC). public CastleSiegeSwitchOperation(Guid guildId, string guildName, ushort playerId, string playerName, ushort switchObjectId, DateTime startedUtc) { this.GuildId = guildId; this.GuildName = guildName; this.PlayerId = playerId; this.PlayerName = playerName; this.SwitchObjectId = switchObjectId; this.StartedUtc = startedUtc; } /// Gets the operating player's guild identifier. public Guid GuildId { get; } /// Gets the operating player's guild name. public string GuildName { get; } /// Gets the operating player's object identifier on the map. public ushort PlayerId { get; } /// Gets the operating player's name. public string PlayerName { get; } /// Gets the switch NPC's object identifier on the map, which the client's packets refer to. public ushort SwitchObjectId { get; } /// Gets the point in time (UTC) when the operation started. public DateTime StartedUtc { get; } /// /// Gets a value indicating whether the operation ran its time, so the switch counts for the guild. /// public bool IsHeld { get; private set; } /// Marks the operation as completed, which makes the switch count for the guild. internal void MarkHeld() => this.IsHeld = true; }