diff --git a/PKHeX.Core/PKM/Shared/G3PKM.cs b/PKHeX.Core/PKM/Shared/G3PKM.cs index aab179eb5..177092ad3 100644 --- a/PKHeX.Core/PKM/Shared/G3PKM.cs +++ b/PKHeX.Core/PKM/Shared/G3PKM.cs @@ -29,7 +29,7 @@ public abstract class G3PKM : PKM, IRibbonSetEvent3, IRibbonSetCommon3, IRibbonS public override uint EncryptionConstant { get => PID; set { } } public override int Nature { get => (int)(PID % 25); set { } } public override int AltForm { get => Species == (int)Core.Species.Unown ? PKX.GetUnownForm(PID) : 0; set { } } - public override bool IsNicknamed { get => SpeciesName.IsNicknamedAnyLanguage(Species, Nickname, Format); set { } } + public override bool IsNicknamed { get => SpeciesName.IsNicknamed(Species, Nickname, Language, 3); set { } } public override int Gender { get => PKX.GetGenderFromPID(Species, PID); set { } } public override int Characteristic => -1; public override int CurrentFriendship { get => OT_Friendship; set => OT_Friendship = value; } diff --git a/PKHeX.Core/PKM/Util/SpeciesName.cs b/PKHeX.Core/PKM/Util/SpeciesName.cs index 21e7bcd86..08989cfe8 100644 --- a/PKHeX.Core/PKM/Util/SpeciesName.cs +++ b/PKHeX.Core/PKM/Util/SpeciesName.cs @@ -102,7 +102,20 @@ public static bool IsNicknamedAnyLanguage(int species, string nick, int generati return false; var langs = Language.GetAvailableGameLanguages(generation); - return langs.All(lang => GetSpeciesNameGeneration(species, lang, generation) != nick); + return langs.All(lang => IsNicknamed(species, nick, lang, generation)); + } + + /// + /// Checks if a nickname matches the species name of any language. + /// + /// National Dex number of the Pokémon. Should be 0 if an egg. + /// Current name + /// Language ID of the Pokémon + /// Generation specific formatting option + /// True if it does not match any language name, False if not nicknamed + public static bool IsNicknamed(int species, string nick, int lang, int generation = PKX.Generation) + { + return GetSpeciesNameGeneration(species, lang, generation) != nick; } ///