Added stub hax validations.

This commit is contained in:
Greg Edwards
2014-04-29 12:07:22 -04:00
parent 098c9434ba
commit 0e0226db20
2 changed files with 31 additions and 6 deletions

View File

@@ -150,6 +150,12 @@ namespace PkmnFoundations.Structures
return new GtsRecord4(Save());
}
public bool Validate()
{
// todo: a. legitimacy check, and b. check that pkm data matches metadata
return true;
}
public bool CanTrade(GtsRecord4 other)
{
if (Species != other.RequestedSpecies) return false;
@@ -194,7 +200,7 @@ namespace PkmnFoundations.Structures
byte hour = (byte)((timestamp >> 0x18) & 0xff);
byte minute = (byte)((timestamp >> 0x10) & 0xff);
byte second = (byte)((timestamp >> 0x08) & 0xff);
//byte fractional = (byte)(timestamp & 0xff);
//byte fractional = (byte)(timestamp & 0xff); // always 0
// allow ArgumentOutOfRangeExceptions to escape
return new DateTime(year, month, day, hour, minute, second);