diff --git a/KitchenSink/Commands/CharacterSwitch.cs b/KitchenSink/Commands/CharacterSwitch.cs index 6cd994b..8d549cd 100644 --- a/KitchenSink/Commands/CharacterSwitch.cs +++ b/KitchenSink/Commands/CharacterSwitch.cs @@ -75,7 +75,7 @@ internal sealed class CharacterSwitch : IDisposable UpdateDtrBar(); } - private Target? FindCharacter(int direction) + private Target? FindCharacter(int direction, bool showError = true) { _pluginLog.Verbose($"Switching characters ({direction})"); @@ -83,7 +83,8 @@ internal sealed class CharacterSwitch : IDisposable int index = characterIds.IndexOf(_clientState.LocalContentId); if (index < 0) { - _chatGui.PrintError("[KitchenSink] Current character not known."); + if (showError) + _chatGui.PrintError("[KitchenSink] Current character not known."); return null; } @@ -94,7 +95,8 @@ internal sealed class CharacterSwitch : IDisposable target = _autoRetainerApi.GetOfflineCharacterData(characterIds[index]); if (target?.CID == _clientState.LocalContentId) { - _chatGui.PrintError("[KitchenSink] No character to switch to found."); + if (showError) + _chatGui.PrintError("[KitchenSink] No character to switch to found."); return null; } @@ -184,8 +186,8 @@ internal sealed class CharacterSwitch : IDisposable { _dtrBarEntry.Text = seIconChar.ToIconString(); - var previous = FindCharacter(-1); - var next = FindCharacter(1); + var previous = FindCharacter(-1, showError: false); + var next = FindCharacter(1, showError: false); if (previous != null && next != null) _dtrBarEntry.Tooltip = $"Prev: {previous.Name}\nNext: {next.Name}"; else if (previous != null)