// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // namespace MUnique.OpenMU.GameLogic.PlugIns; using System.ComponentModel; /// /// Configuration for the speedhack detection anti-cheat system. /// public class SpeedHackDetectConfiguration { /// /// Gets or sets a value indicating whether to auto-ban players that are cheating with speedhacks. /// [DefaultValue(true)] public bool AutoBan { get; set; } = true; /// /// Gets or sets a value indicating whether to disconnect players that are cheating with speedhacks. /// [DefaultValue(true)] public bool DisconnectOnViolation { get; set; } = true; /// /// Gets or sets the threshold of warnings a player receives before being banned/disconnected. /// [DefaultValue(3)] public int MaxWarnings { get; set; } = 3; /// /// Gets or sets the warning alert debounce period in seconds. /// Consecutive warnings within this period are ignored to avoid spamming/jitter. /// [DefaultValue(5)] public int AlertDebounceSeconds { get; set; } = 5; /// /// Gets or sets the warning history expiration period in hours. /// Warnings older than this time are cleared from the player's history. /// [DefaultValue(1)] public int WarningHistoryHours { get; set; } = 1; /// /// Gets or sets the walk speed check tolerance threshold in milliseconds. /// Represents the maximum deficits allowed compared to expectations before a violation is flagged. /// [DefaultValue(900)] public int WalkSpeedToleranceMs { get; set; } = 900; /// /// Gets or sets the maximum distance offset between client walk start position and server position /// before resynchronizing (rubberbanding) the client. /// [DefaultValue(5)] public int MaxAllowedWalkStartOffset { get; set; } = 5; /// /// Gets or sets the maximum tokens for the token bucket attack check. /// [DefaultValue(5.0)] public double MaxAttackTokens { get; set; } = 5.0; /// /// Gets or sets the base delay in milliseconds used in attack speed calculation. /// [DefaultValue(450.0)] public double AttackSpeedBaseDelayMs { get; set; } = 450.0; /// /// Gets or sets the scaling factor applied to attack speed attribute in delay calculation. /// [DefaultValue(1.2)] public double AttackSpeedScalingFactor { get; set; } = 1.2; /// /// Gets or sets the minimum delay floor in milliseconds between attacks. /// [DefaultValue(60.0)] public double AttackSpeedMinIntervalMs { get; set; } = 60.0; }