mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
Fix Mr. Mime/Farfetch'd Gen I/II name bugs
This commit is contained in:
parent
0b52c9a208
commit
efc66fd0b3
6 changed files with 36 additions and 7 deletions
|
@ -2325,9 +2325,14 @@ namespace PKHeX
|
||||||
|
|
||||||
if (SAV.Generation < 5) // All caps GenIV and previous
|
if (SAV.Generation < 5) // All caps GenIV and previous
|
||||||
nick = nick.ToUpper();
|
nick = nick.ToUpper();
|
||||||
|
if (SAV.Generation < 3)
|
||||||
|
nick = nick.Replace(" ", "");
|
||||||
TB_Nickname.Text = nick;
|
TB_Nickname.Text = nick;
|
||||||
if (SAV.Generation == 1)
|
if (SAV.Generation == 1)
|
||||||
((PK1)pkm).setNotNicknamed();
|
((PK1)pkm).setNotNicknamed();
|
||||||
|
if (SAV.Generation == 2)
|
||||||
|
((PK2)pkm).setNotNicknamed();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void updateNicknameClick(object sender, MouseEventArgs e)
|
private void updateNicknameClick(object sender, MouseEventArgs e)
|
||||||
|
@ -3156,6 +3161,8 @@ namespace PKHeX
|
||||||
|
|
||||||
if (SAV.Generation < 5) // All caps GenIV and previous
|
if (SAV.Generation < 5) // All caps GenIV and previous
|
||||||
nick = nick.ToUpper();
|
nick = nick.ToUpper();
|
||||||
|
if (SAV.Generation < 3)
|
||||||
|
nick = nick.Replace(" ", "");
|
||||||
if (TB_Nickname.Text != nick)
|
if (TB_Nickname.Text != nick)
|
||||||
{
|
{
|
||||||
CHK_Nicknamed.Checked = true;
|
CHK_Nicknamed.Checked = true;
|
||||||
|
|
|
@ -77,7 +77,10 @@ namespace PKHeX
|
||||||
pk1.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
pk1.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
||||||
pk1.EV_SPC = Util.ToInt32(TB_SPAEV.Text);
|
pk1.EV_SPC = Util.ToInt32(TB_SPAEV.Text);
|
||||||
|
|
||||||
|
if (CHK_Nicknamed.Checked)
|
||||||
pk1.Nickname = TB_Nickname.Text;
|
pk1.Nickname = TB_Nickname.Text;
|
||||||
|
else
|
||||||
|
pk1.setNotNicknamed();
|
||||||
pk1.Move1 = Util.getIndex(CB_Move1);
|
pk1.Move1 = Util.getIndex(CB_Move1);
|
||||||
pk1.Move2 = Util.getIndex(CB_Move2);
|
pk1.Move2 = Util.getIndex(CB_Move2);
|
||||||
pk1.Move3 = Util.getIndex(CB_Move3);
|
pk1.Move3 = Util.getIndex(CB_Move3);
|
||||||
|
|
|
@ -96,7 +96,10 @@ namespace PKHeX
|
||||||
pk2.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
pk2.EV_SPE = Util.ToInt32(TB_SPEEV.Text);
|
||||||
pk2.EV_SPC = Util.ToInt32(TB_SPAEV.Text);
|
pk2.EV_SPC = Util.ToInt32(TB_SPAEV.Text);
|
||||||
|
|
||||||
|
if (CHK_Nicknamed.Checked)
|
||||||
pk2.Nickname = TB_Nickname.Text;
|
pk2.Nickname = TB_Nickname.Text;
|
||||||
|
else
|
||||||
|
pk2.setNotNicknamed();
|
||||||
pk2.Move1 = Util.getIndex(CB_Move1);
|
pk2.Move1 = Util.getIndex(CB_Move1);
|
||||||
pk2.Move2 = Util.getIndex(CB_Move2);
|
pk2.Move2 = Util.getIndex(CB_Move2);
|
||||||
pk2.Move3 = Util.getIndex(CB_Move3);
|
pk2.Move3 = Util.getIndex(CB_Move3);
|
||||||
|
|
|
@ -100,9 +100,11 @@ namespace PKHeX
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
||||||
|
spName = spName.Replace(" ", ""); // Gen I/II didn't have a space for Mr. Mime
|
||||||
return !nick.SequenceEqual(
|
return !nick.SequenceEqual(
|
||||||
PKX.setG1Str(spName, Japanese)
|
PKX.setG1Str(spName, Japanese)
|
||||||
.Concat(Enumerable.Repeat((byte) 0x50, StringLength - spName.Length - 1)));
|
.Concat(Enumerable.Repeat((byte) 0x50, StringLength - spName.Length - 1))
|
||||||
|
.Select(b => (byte)(b == 0xF2 ? 0xE8 : b)));
|
||||||
}
|
}
|
||||||
set { }
|
set { }
|
||||||
}
|
}
|
||||||
|
@ -110,7 +112,11 @@ namespace PKHeX
|
||||||
public void setNotNicknamed()
|
public void setNotNicknamed()
|
||||||
{
|
{
|
||||||
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
||||||
nick = PKX.setG1Str(spName, Japanese).Concat(Enumerable.Repeat((byte)0x50, StringLength - spName.Length - 1)).ToArray();
|
spName = spName.Replace(" ", ""); // Gen I/II didn't have a space for Mr. Mime
|
||||||
|
nick = PKX.setG1Str(spName, Japanese)
|
||||||
|
.Concat(Enumerable.Repeat((byte)0x50, StringLength - spName.Length - 1))
|
||||||
|
.Select(b => (byte)(b == 0xF2 ? 0xE8 : b)) // Decimal point<->period fix
|
||||||
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,11 @@ namespace PKHeX
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
||||||
|
spName = spName.Replace(" ", ""); // Gen I/II didn't have a space for Mr. Mime
|
||||||
return !nick.SequenceEqual(
|
return !nick.SequenceEqual(
|
||||||
PKX.setG1Str(spName, Japanese)
|
PKX.setG1Str(spName, Japanese)
|
||||||
.Concat(Enumerable.Repeat((byte) 0x50, StringLength - spName.Length - 1)));
|
.Concat(Enumerable.Repeat((byte) 0x50, StringLength - spName.Length - 1))
|
||||||
|
.Select(b => (byte)(b == 0xF2 ? 0xE8 : b)));
|
||||||
}
|
}
|
||||||
set { }
|
set { }
|
||||||
}
|
}
|
||||||
|
@ -113,7 +115,11 @@ namespace PKHeX
|
||||||
public void setNotNicknamed()
|
public void setNotNicknamed()
|
||||||
{
|
{
|
||||||
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
string spName = PKX.getSpeciesName(Species, Japanese ? 1 : 2).ToUpper();
|
||||||
nick = PKX.setG1Str(spName, Japanese).Concat(Enumerable.Repeat((byte)0x50, StringLength - spName.Length - 1)).ToArray();
|
spName = spName.Replace(" ", ""); // Gen I/II didn't have a space for Mr. Mime
|
||||||
|
nick = PKX.setG1Str(spName, Japanese)
|
||||||
|
.Concat(Enumerable.Repeat((byte)0x50, StringLength - spName.Length - 1))
|
||||||
|
.Select(b => (byte)(b == 0xF2 ? 0xE8 : b)) // Decimal point<->period fix
|
||||||
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1713,11 +1713,13 @@ namespace PKHeX
|
||||||
{0xB7, "x"},
|
{0xB7, "x"},
|
||||||
{0xB8, "y"},
|
{0xB8, "y"},
|
||||||
{0xB9, "z"},
|
{0xB9, "z"},
|
||||||
|
{0xE0, "’"},
|
||||||
{0xE1, "{"}, /* Pk */
|
{0xE1, "{"}, /* Pk */
|
||||||
{0xE2, "}"}, /* Mn */
|
{0xE2, "}"}, /* Mn */
|
||||||
{0xE3, "-"},
|
{0xE3, "-"},
|
||||||
{0xE6, "?"},
|
{0xE6, "?"},
|
||||||
{0xE7, "!"},
|
{0xE7, "!"},
|
||||||
|
{0xE8, "."}, // Alias decimal point to .
|
||||||
{0xEF, "♂"},
|
{0xEF, "♂"},
|
||||||
{0xF2, "."},
|
{0xF2, "."},
|
||||||
{0xF3, "/"},
|
{0xF3, "/"},
|
||||||
|
@ -1797,6 +1799,8 @@ namespace PKHeX
|
||||||
{"x", 0xB7},
|
{"x", 0xB7},
|
||||||
{"y", 0xB8},
|
{"y", 0xB8},
|
||||||
{"z", 0xB9},
|
{"z", 0xB9},
|
||||||
|
{"'", 0xE0}, // Alias ' to ’ for Farfetch'd
|
||||||
|
{"’", 0xE0},
|
||||||
{"{", 0xE1}, /* Pk */
|
{"{", 0xE1}, /* Pk */
|
||||||
{"}", 0xE2}, /* Mn */
|
{"}", 0xE2}, /* Mn */
|
||||||
{"-", 0xE3},
|
{"-", 0xE3},
|
||||||
|
|
Loading…
Reference in a new issue