mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Merge pull request #924 from kamronbatman/fixed_gen3_eggs
Fixes gen 3 egg name and language.
This commit is contained in:
commit
3aa772bf22
1 changed files with 3 additions and 3 deletions
|
@ -43,11 +43,11 @@ namespace PKHeX.Core
|
|||
public override int SID { get { return BitConverter.ToUInt16(Data, 0x06); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x06); } }
|
||||
public override string Nickname {
|
||||
get { return PKX.getG3Str(Data.Skip(0x08).Take(10).ToArray(), Japanese); }
|
||||
set { byte[] strdata = PKX.setG3Str(value, Japanese);
|
||||
set { byte[] strdata = PKX.setG3Str(IsEgg ? "タマゴ" : value, Japanese);
|
||||
if (strdata.Length > 10)
|
||||
Array.Resize(ref strdata, 10);
|
||||
strdata.CopyTo(Data, 0x08); } }
|
||||
public override int Language { get { return BitConverter.ToUInt16(Data, 0x12) & 0xFF; } set { BitConverter.GetBytes((ushort)(value | 0x200)).CopyTo(Data, 0x12); } }
|
||||
public override int Language { get { return BitConverter.ToUInt16(Data, 0x12) & 0xFF; } set { BitConverter.GetBytes((ushort)(IsEgg ? 0x601 : value | 0x200)).CopyTo(Data, 0x12); } }
|
||||
public override string OT_Name {
|
||||
get { return PKX.getG3Str(Data.Skip(0x14).Take(7).ToArray(), Japanese); }
|
||||
set { byte[] strdata = PKX.setG3Str(value, Japanese);
|
||||
|
@ -159,7 +159,7 @@ namespace PKHeX.Core
|
|||
// Generated Attributes
|
||||
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
|
||||
public override int TSV => (TID ^ SID) >> 3;
|
||||
public bool Japanese => Language == 1;
|
||||
public bool Japanese => IsEgg || Language == 1;
|
||||
|
||||
public override byte[] Encrypt()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue