using SilkroadBot.Domain.Enums; namespace SilkroadBot.Profiles.Models; /// /// A character profile containing all settings for a bot session. /// Stored as JSON locally. /// public class BotProfile { public string Id { get; set; } = Guid.NewGuid().ToString("N")[..8]; public string Name { get; set; } = "New Profile"; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime LastUsed { get; set; } = DateTime.UtcNow; // Account Data public AccountSettings Account { get; set; } = new(); // Server/Region public ServerSettings Server { get; set; } = new(); // Client Mode public ExecutionMode ExecutionMode { get; set; } = ExecutionMode.Clientless; // Plugin Configuration public PluginSettings Plugins { get; set; } = new(); // Automation Settings public AutomationSettings Automation { get; set; } = new(); // AI Settings public AIProfileSettings AI { get; set; } = new(); // Status (runtime, not persisted) public ProfileStatus Status { get; set; } = ProfileStatus.Offline; } public class AccountSettings { public string Username { get; set; } = string.Empty; public string Password { get; set; } = string.Empty; // Encrypted at rest public string CharacterName { get; set; } = string.Empty; public int CharacterSlot { get; set; } = 0; } public class ServerSettings { public GameClientType ClientType { get; set; } = GameClientType.VSRO; public string GatewayHost { get; set; } = "localhost"; public int GatewayPort { get; set; } = 15779; public string ServerName { get; set; } = string.Empty; public string Region { get; set; } = "Custom"; public string CustomServerName { get; set; } = string.Empty; } public class PluginSettings { public List EnabledPlugins { get; set; } = new(); public Dictionary> PluginConfigs { get; set; } = new(); } public class AutomationSettings { public bool AutoLogin { get; set; } = false; public bool AutoSelectCharacter { get; set; } = false; public bool AutoReconnect { get; set; } = true; public int ReconnectDelaySeconds { get; set; } = 30; public int MaxReconnectAttempts { get; set; } = 5; public bool AutoStartPlugins { get; set; } = true; // Training area public TrainingAreaSettings TrainingArea { get; set; } = new(); } public class TrainingAreaSettings { public float CenterX { get; set; } public float CenterY { get; set; } public short RegionId { get; set; } public float Radius { get; set; } = 100; public List TargetMonsterIds { get; set; } = new(); } public class AIProfileSettings { public bool Enabled { get; set; } = false; public string ProviderName { get; set; } = "Gemini"; public string ApiKey { get; set; } = string.Empty; public string Model { get; set; } = "gemini-pro"; public double Temperature { get; set; } = 0.3; public int DecisionIntervalMs { get; set; } = 2000; public List CustomConstraints { get; set; } = new(); } public enum ProfileStatus { Offline, Connecting, Online, Training, Error, Paused }