Clamp abilitynumber value

keep to 3 bitflags
1/2/H
This commit is contained in:
Kurt
2018-04-04 21:42:02 -07:00
parent f56696bf5c
commit 2f57630b4a

View File

@@ -78,7 +78,7 @@ public override uint EXP
set => BitConverter.GetBytes(value).CopyTo(Data, 0x10);
}
public override int Ability { get => Data[0x14]; set => Data[0x14] = (byte)value; }
public override int AbilityNumber { get => Data[0x15]; set => Data[0x15] = (byte)value; }
public override int AbilityNumber { get => Data[0x15] & 7; set => Data[0x15] = (byte)(Data[0x15] & ~7 | value & 7); }
public override int MarkValue { get => BitConverter.ToUInt16(Data, 0x16); protected set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x16); }
public override uint PID
{