Byte 0x2A in PK7 is PelagoEventStatus

See pml::pokepara::CoreParam::GetResortEventStatus

Also see: #741.

Needs testing to see what values are legal.
This commit is contained in:
Michael Scire 2017-01-26 11:16:21 -08:00
parent 08adb4c2cb
commit 23cbeb7da3
2 changed files with 5 additions and 3 deletions

View File

@ -1561,8 +1561,10 @@ private void verifyForm()
}
private void verifyMisc()
{
if (pkm.Format == 7 && pkm.Data[0x2A] != 0)
{ AddLine(Severity.Invalid, "Incorrectly transferred from previous generation.", CheckIdentifier.Misc); return; }
if (pkm.Format == 7 && ((PK7)pkm).PelagoEventStatus != 0)
{
// TODO: Figure out what PelagoEventStati are legal.
}
if (pkm.IsEgg)
{

View File

@ -93,7 +93,7 @@ public override uint PID
public override int CNT_Smart { get { return Data[0x27]; } set { Data[0x27] = (byte)value; } }
public override int CNT_Tough { get { return Data[0x28]; } set { Data[0x28] = (byte)value; } }
public override int CNT_Sheen { get { return Data[0x29]; } set { Data[0x29] = (byte)value; } }
public byte _0x2A { get { return Data[0x2A]; } protected set { Data[0x2A] = value; } }
public byte PelagoEventStatus { get { return Data[0x2A]; } protected set { Data[0x2A] = value; } }
private byte PKRS { get { return Data[0x2B]; } set { Data[0x2B] = value; } }
public override int PKRS_Days { get { return PKRS & 0xF; } set { PKRS = (byte)(PKRS & ~0xF | value); } }
public override int PKRS_Strain { get { return PKRS >> 4; } set { PKRS = (byte)(PKRS & 0xF | value << 4); } }