mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Invert check, fix xmldoc descriptions
This commit is contained in:
parent
7d6249853d
commit
fa3fe0a380
2 changed files with 5 additions and 5 deletions
|
@ -73,7 +73,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
// Can only nickname if it matches your language.
|
||||
// Setting the nickname to the same as the species name does not set the Nickname flag (equals unmodified, no flag)
|
||||
if (SpeciesName.IsNicknamed(pkm.Species, nickname, pkm.Language, pkm.Format))
|
||||
if (!SpeciesName.IsNicknamed(pkm.Species, nickname, pkm.Language, pkm.Format))
|
||||
{
|
||||
data.AddLine(Get(LNickMatchLanguageFlag, Severity.Invalid));
|
||||
return true;
|
||||
|
@ -82,7 +82,7 @@ namespace PKHeX.Core
|
|||
else if (pkm.Format >= 8)
|
||||
{
|
||||
// Having the Nickname match the species name for the pkm.Language causes it to revert to un-nicknamed.
|
||||
if (SpeciesName.IsNicknamed(pkm.Species, nickname, pkm.Language, pkm.Format))
|
||||
if (!SpeciesName.IsNicknamed(pkm.Species, nickname, pkm.Language, pkm.Format))
|
||||
{
|
||||
data.AddLine(Get(LNickMatchLanguageFlag, Severity.Invalid));
|
||||
return true;
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a nickname matches the species name of any language.
|
||||
/// Checks if the input <see cref="nickname"/> is not the species name for all languages.
|
||||
/// </summary>
|
||||
/// <param name="species">National Dex number of the Pokémon. Should be 0 if an egg.</param>
|
||||
/// <param name="nickname">Current name</param>
|
||||
|
@ -134,13 +134,13 @@ namespace PKHeX.Core
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a nickname matches the species name of any language.
|
||||
/// Checks if the input <see cref="nickname"/> is not the species name.
|
||||
/// </summary>
|
||||
/// <param name="species">National Dex number of the Pokémon. Should be 0 if an egg.</param>
|
||||
/// <param name="nickname">Current name</param>
|
||||
/// <param name="language">Language ID of the Pokémon</param>
|
||||
/// <param name="generation">Generation specific formatting option</param>
|
||||
/// <returns>True if it does not match any language name, False if not nicknamed</returns>
|
||||
/// <returns>True if it does not match the language name, False if not nicknamed (matches).</returns>
|
||||
public static bool IsNicknamed(int species, string nickname, int language, int generation = PKX.Generation)
|
||||
{
|
||||
return GetSpeciesNameGeneration(species, language, generation) != nickname;
|
||||
|
|
Loading…
Add table
Reference in a new issue