39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace NeonSprawl.Server.Game.AbilityInput;
|
|
|
|
/// <summary>POST body for ability cast intent (NEO-31).</summary>
|
|
public sealed class AbilityCastRequest
|
|
{
|
|
public const int CurrentSchemaVersion = 1;
|
|
|
|
[JsonPropertyName("schemaVersion")]
|
|
public int SchemaVersion { get; init; }
|
|
|
|
[JsonPropertyName("slotIndex")]
|
|
public int SlotIndex { get; init; }
|
|
|
|
[JsonPropertyName("abilityId")]
|
|
public string? AbilityId { get; init; }
|
|
|
|
/// <summary>Optional; mirrors <c>lockedTargetId</c> from target state v1.</summary>
|
|
[JsonPropertyName("targetId")]
|
|
public string? TargetId { get; init; }
|
|
}
|
|
|
|
/// <summary>POST response for cast submit (prototype accept/deny only; NEO-31).</summary>
|
|
public sealed class AbilityCastResponse
|
|
{
|
|
public const int CurrentSchemaVersion = 1;
|
|
|
|
[JsonPropertyName("schemaVersion")]
|
|
public int SchemaVersion { get; init; } = CurrentSchemaVersion;
|
|
|
|
[JsonPropertyName("accepted")]
|
|
public bool Accepted { get; init; }
|
|
|
|
[JsonPropertyName("reasonCode")]
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
public string? ReasonCode { get; init; }
|
|
}
|