Update speciesname fetch usages to be gen sensitive

This commit is contained in:
Kurt 2017-06-20 22:53:39 -07:00
parent ea473ae74f
commit f15333ea6c
6 changed files with 7 additions and 7 deletions

View file

@ -229,7 +229,7 @@ namespace PKHeX.Core
pk.OT_Gender = OTGender % 2; // %2 just in case?
}
pk.IsNicknamed = IsNicknamed;
pk.Nickname = IsNicknamed ? Nickname : PKX.GetSpeciesName(Species, pk.Language);
pk.Nickname = IsNicknamed ? Nickname : PKX.GetSpeciesNameGeneration(Species, pk.Language, Format);
// More 'complex' logic to determine final values

View file

@ -264,7 +264,7 @@ namespace PKHeX.Core
pk4.Met_Location = pk4.Egg_Location + 3000;
pk4.Egg_Location = 0;
pk4.IsNicknamed = true;
pk4.Nickname = PKX.GetSpeciesName(0, pk4.Language).ToUpper();
pk4.Nickname = PKX.GetSpeciesNameGeneration(0, pk4.Language, Format);
pk4.MetDate = DateTime.Now;
}
else

View file

@ -373,7 +373,7 @@ namespace PKHeX.Core
pk.HT_Friendship = pk.OT_Friendship;
}
pk.IsNicknamed = IsNicknamed;
pk.Nickname = IsNicknamed ? Nickname : PKX.GetSpeciesName(Species, pk.Language);
pk.Nickname = IsNicknamed ? Nickname : PKX.GetSpeciesNameGeneration(Species, pk.Language, Format);
// More 'complex' logic to determine final values

View file

@ -384,7 +384,7 @@ namespace PKHeX.Core
pk.MetDate = Date ?? DateTime.Now;
pk.IsNicknamed = IsNicknamed;
pk.Nickname = IsNicknamed ? Nickname : PKX.GetSpeciesName(Species, pk.Language);
pk.Nickname = IsNicknamed ? Nickname : PKX.GetSpeciesNameGeneration(Species, pk.Language, Format);
// More 'complex' logic to determine final values
@ -449,7 +449,7 @@ namespace PKHeX.Core
{
pk.IsEgg = true;
pk.EggMetDate = Date;
pk.Nickname = PKX.GetSpeciesName(0, pk.Language);
pk.Nickname = PKX.GetSpeciesNameGeneration(0, pk.Language, Format);
}
pk.RefreshChecksum();

View file

@ -275,7 +275,7 @@ namespace PKHeX.Core
// Yay for reusing string buffers!
PKX.G4TransferTrashBytes[pk4.Language].CopyTo(pk4.Data, 0x48 + 4);
pk4.Nickname = IsEgg ? PKX.GetSpeciesName(pk4.Species, pk4.Language) : Nickname;
pk4.Nickname = IsEgg ? PKX.GetSpeciesNameGeneration(pk4.Species, pk4.Language, pk4.Format) : Nickname;
Array.Copy(pk4.Data, 0x48, pk4.Data, 0x68, 0x10);
pk4.OT_Name = OT_Name;

View file

@ -362,7 +362,7 @@ namespace PKHeX.Core
// Apply trash bytes for species name of current app language -- default to PKM's language if no match
int curLang = PKX.GetSpeciesNameLanguage(Species, Nickname, Format);
pk6.Nickname = PKX.GetSpeciesName(Species, curLang < 0 ? Language : curLang);
pk6.Nickname = PKX.GetSpeciesNameGeneration(Species, curLang < 0 ? Language : curLang, pk6.Format);
if (IsNicknamed)
pk6.Nickname = Nickname;