diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index f750ef56a..fbca83861 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -334,7 +334,7 @@ public enum PluginConfigBool : byte [Default(true)] HealWhenNothingTodo, [Default(true)] UseResourcesAction, - [Default(true)] SayHelloToUsers, + [Default(true)] SayHelloToParticipants, } public enum PluginConfigFloat : byte diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs index b8e558b29..004525ae6 100644 --- a/RotationSolver/Localization/ConfigTranslation.cs +++ b/RotationSolver/Localization/ConfigTranslation.cs @@ -56,6 +56,7 @@ internal static class ConfigTranslation PluginConfigBool.ToggleManual => LocalizationManager.RightLang.ConfigWindow_Param_ToggleManual, PluginConfigBool.ToggleAuto => LocalizationManager.RightLang.ConfigWindow_Param_ToggleAuto, PluginConfigBool.UseStopCasting => LocalizationManager.RightLang.ConfigWindow_Param_UseStopCasting, + PluginConfigBool.SayHelloToParticipants => LocalizationManager.RightLang.ConfigWindow_Basic_SayHelloToParticipants, // UI PluginConfigBool.HideWarning => LocalizationManager.RightLang.ConfigWindow_UI_HideWarning, diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs index ba25f17ce..d19dfe9ad 100644 --- a/RotationSolver/Localization/Strings.cs +++ b/RotationSolver/Localization/Strings.cs @@ -747,5 +747,5 @@ internal class Strings public string ConfigWindow_Auto_UseResourcesAction { get; set; } = "Use actions that use resources"; public string ConfigWindow_Auto_HealthForAutoDefense { get; set; } = "HP Ratio about defense single of Tanks"; - public string ConfigWindow_Basic_SayHelloToUsers { get; set; } = "Say hello to the users of Rotation Solver."; + public string ConfigWindow_Basic_SayHelloToParticipants { get; set; } = "Say hello to the participants of Rotation Solver."; } \ No newline at end of file diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs index aaf9542ee..69aa0371d 100644 --- a/RotationSolver/UI/RotationConfigWindow_Config.cs +++ b/RotationSolver/UI/RotationConfigWindow_Config.cs @@ -288,7 +288,7 @@ private static void DrawBasicAutoSwitch() new CheckBoxSearchPlugin(PluginConfigBool.UseWorkTask), - new CheckBoxSearchPlugin(PluginConfigBool.SayHelloToUsers), + new CheckBoxSearchPlugin(PluginConfigBool.SayHelloToParticipants), new DragFloatSearchPlugin(PluginConfigFloat.MistakeRatio, 0.002f), diff --git a/RotationSolver/Updaters/SocialUpdater.cs b/RotationSolver/Updaters/SocialUpdater.cs index a3edd0aad..c6243cb28 100644 --- a/RotationSolver/Updaters/SocialUpdater.cs +++ b/RotationSolver/Updaters/SocialUpdater.cs @@ -141,11 +141,15 @@ internal static async void UpdateSocial() #endif Service.Config.GlobalConfig.DutyStart.AddMacro(); await Task.Delay(new Random().Next(1000, 1500)); - SayHelloToAuthor(); + + if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.SayHelloToParticipants)) + { + SayHelloToParticipants(); + } } } - private static async void SayHelloToAuthor() + private static async void SayHelloToParticipants() { var players = DataCenter.AllianceMembers.OfType() #if DEBUG @@ -159,12 +163,9 @@ private static async void SayHelloToAuthor() .Where(p => DownloadHelper.ContributorsHash.Contains(p.Item2)) .Select(p => new ContributorChatEntity(p.player)); - if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.SayHelloToUsers)) - { entities = entities.Union(players .Where(p => DownloadHelper.UsersHash.Contains(p.Item2)) .Select(p => new UserChatEntity(p.player))); - } entities = entities.Union(players .Select(c =>