Fix reflective ability bit transfer

AbilityNumber is shared between XK3/PK3/CK3 and is the only setter that
sets the ability index between the formats.
This commit is contained in:
Kurt 2017-04-14 16:27:21 -07:00
parent 06f54bb3d0
commit 974ca70e5f

View File

@ -153,7 +153,7 @@ public PK3(byte[] decryptedData = null, string ident = null)
public override int Stat_SPD { get { return BitConverter.ToUInt16(Data, 0x62); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x62); } }
// Generated Attributes
public override int AbilityNumber { get { return 1 << PIDAbility; } set { } }
public override int AbilityNumber { get { return 1 << PIDAbility; } set { AbilityBit = value > 1; } } // 1/2 -> 0/1
public override int PSV => (int)((PID >> 16 ^ PID & 0xFFFF) >> 3);
public override int TSV => (TID ^ SID) >> 3;
public bool Japanese => IsEgg || Language == 1;