diff --git a/Resources/RotationSolverRecord.json b/Resources/RotationSolverRecord.json index 466225fcd..855ccf7c1 100644 --- a/Resources/RotationSolverRecord.json +++ b/Resources/RotationSolverRecord.json @@ -1,4 +1,6 @@ { - "ClickingCount": 56849, - "SaidUsers": [] + "ClickingCount": 56901, + "SaidUsers": [ + "Ig4lHXUohMZNIeheUtAtRg==" + ] } \ No newline at end of file diff --git a/RotationSolver.Basic/Configuration/RotationSolverRecord.cs b/RotationSolver.Basic/Configuration/RotationSolverRecord.cs index 3b9e6dc58..7601db0bb 100644 --- a/RotationSolver.Basic/Configuration/RotationSolverRecord.cs +++ b/RotationSolver.Basic/Configuration/RotationSolverRecord.cs @@ -6,10 +6,15 @@ public class RotationSolverRecord { /// - /// How many times have rs clicked for you + /// How many times have rs clicked for you. /// public uint ClickingCount { get; set; } = 0; + /// + /// How many times have you greeted the other users. + /// + public uint SayingHelloCount { get; set; } = 0; + /// /// The users that already said hello. /// diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs index 837423d15..7416def20 100644 --- a/RotationSolver/Localization/Strings.cs +++ b/RotationSolver/Localization/Strings.cs @@ -746,6 +746,7 @@ internal class Strings public string ConfigWindow_Basic_ClickingDuration { get; set; } = "The clicking duration, RS will try to click at this moment."; public string ConfigWindow_Basic_WeaponDelay { get; set; } = "This is the clipping time.\nGCD is over. However, RS forgets to click the next action."; public string ConfigWindow_About_ClickingCount { get; set; } = "Rotation Solver helped you by clicking actions {0:N0} times."; + public string ConfigWindow_About_SayHelloCount { get; set; } = "You have sayed hello to other users {0:N0} times!"; public string ConfigWindow_Auto_AutoHealTimeToKill { get; set; } = "Stop healing when time to kill is lower then..."; public string ConfigWindow_UI_ShowHostiles { get; set; } = "Show the hostile target icon"; public string ConfigWindow_UI_HostileIconHeight { get; set; } = "Hostile Icon height from position"; diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 3a19e02a7..521964223 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -607,6 +607,18 @@ private static void DrawAbout() } } + var sayHelloCount = OtherConfiguration.RotationSolverRecord.SayingHelloCount; + if(sayHelloCount > 0) + { + using var color = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.2f, 0.8f, 0.95f, 1)); + var countStr = string.Format(LocalizationManager.RightLang.ConfigWindow_About_SayHelloCount, sayHelloCount); + + ImGuiHelper.DrawItemMiddle(() => + { + ImGui.TextWrapped(countStr); + }, width, ImGui.CalcTextSize(countStr).X); + } + _aboutHeaders.Draw(); } diff --git a/RotationSolver/Updaters/SocialUpdater.cs b/RotationSolver/Updaters/SocialUpdater.cs index d832af1c2..500dd691d 100644 --- a/RotationSolver/Updaters/SocialUpdater.cs +++ b/RotationSolver/Updaters/SocialUpdater.cs @@ -260,10 +260,12 @@ public ChatEntity(PlayerCharacter character) { player = character; } + public abstract SeString GetMessage(); public void Dispose() { + OtherConfiguration.RotationSolverRecord.SayingHelloCount++; var hash = EncryptString(player); saidAuthors.Add(hash); if (Service.Config.GetValue(PluginConfigBool.JustSayHelloOnce))