diff --git a/PKHeX.Core/PKM/PK7.cs b/PKHeX.Core/PKM/PK7.cs index 6eae60609..a35399698 100644 --- a/PKHeX.Core/PKM/PK7.cs +++ b/PKHeX.Core/PKM/PK7.cs @@ -226,7 +226,7 @@ public override string Nickname { if (!IsNicknamed) { - int lang = PKX.GetSpeciesNameLanguage(Species, value, 7); + int lang = PKX.GetSpeciesNameLanguage(Species, value, 7, Language); if (lang == 9 || lang == 10) { StringConverter.SetString7(value, 12, lang, chinese: true).CopyTo(Data, 0x40); diff --git a/PKHeX.Core/PKM/PKX.cs b/PKHeX.Core/PKM/PKX.cs index cc52c53c5..488f5240e 100644 --- a/PKHeX.Core/PKM/PKX.cs +++ b/PKHeX.Core/PKM/PKX.cs @@ -266,11 +266,15 @@ private static IEnumerable GetAvailableGameLanguages(int generation) /// National Dex number of the Pokémon. Should be 0 if an egg. /// Current name /// Generation specific formatting option + /// Language ID with a higher priority /// Language ID if it does not match any language name, -1 if no matches - public static int GetSpeciesNameLanguage(int species, string nick, int generation) + public static int GetSpeciesNameLanguage(int species, string nick, int generation, int priorlang = -1) { var langs = GetAvailableGameLanguages(generation); + if (langs.Contains(priorlang) && GetSpeciesNameGeneration(species, priorlang, generation) == nick) + return priorlang; + foreach (var lang in langs) if (GetSpeciesNameGeneration(species, lang, generation) == nick) return lang; diff --git a/PKHeX.Core/Resources/text/script/const_usum_zh.txt b/PKHeX.Core/Resources/text/script/const_usum_zh.txt index 3f40a2901..f0a1ed1da 100644 --- a/PKHeX.Core/Resources/text/script/const_usum_zh.txt +++ b/PKHeX.Core/Resources/text/script/const_usum_zh.txt @@ -3,5 +3,5 @@ 433 卡璞蝶蝶 01:可对战,02:已击倒,03:已捕获 434 卡璞哞哞 01:可对战,02:已击倒,03:已捕获 404 卡璞鳍鳍 03:可对战,04:已击倒,05:已捕获 -755 基格尔德 01:可对战,02:已击倒,03:已捕获 +755 基格尔德 01:可对战,02:已击倒,05:已捕获 867 霸主礼物 00:未领取,01:领取了1只,02:领取了2只,03:领取了3只,04:领取了4只,05:领取了5只,06:已全部领取 \ No newline at end of file