diff --git a/PKHeX.Core/Game/ComboItem.cs b/PKHeX.Core/Game/ComboItem.cs index ac2126746..16149ed70 100644 --- a/PKHeX.Core/Game/ComboItem.cs +++ b/PKHeX.Core/Game/ComboItem.cs @@ -1,26 +1,7 @@ -using System; - -namespace PKHeX.Core +namespace PKHeX.Core { /// /// Key Value pair for a displayed and underlying value. /// - public readonly struct ComboItem : IEquatable - { - public string Text { get; } - public int Value { get; } - - public ComboItem(string text, int value) - { - Text = text; - Value = value; - } - - public bool Equals(ComboItem other) => Value == other.Value && string.Equals(Text, other.Text); - public bool Equals(int other) => Value == other; - public override bool Equals(object obj) => obj is ComboItem other && Equals(other); - public override int GetHashCode() => Value; - public static bool operator ==(ComboItem left, ComboItem right) => left.Equals(right); - public static bool operator !=(ComboItem left, ComboItem right) => !(left == right); - } + public record ComboItem(string Text, int Value); } diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs index 4adc12236..ebcaa8ef9 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen4/SAV_Misc4.cs @@ -731,7 +731,7 @@ private void GetHallStat() bool c = curspe == species; CHK_HallCurrent.Checked = c; CHK_HallCurrent.Text = curspe > 0 && curspe <= SAV.MaxSpeciesID - ? "Current: " + CB_Species.Items.OfType().FirstOrDefault(x => x.Value == curspe).Text + ? $"Current: {SpeciesName.GetSpeciesName(curspe, GameLanguage.GetLanguageIndex(Main.CurrentLanguage))}" : "Current: (none)"; int s = 0;