public HallOfFamePokemon() { TrainerId = 0; SecretId = 0; PersonalityValue = 0; Species = 0; Level = 0; Nickname = new String3(String3.Region.Western, 10); }
public HallOfFamePokemon(System.IO.Stream stream) { TrainerId = stream.ReadUInt16(); SecretId = stream.ReadUInt16(); PersonalityValue = stream.ReadUInt32(); int speciesLow = stream.ReadByte(); int speciesHighLv = stream.ReadByte(); Species = (ushort)(speciesLow | ((speciesHighLv & 0x1) << 8)); Level = (byte)((speciesHighLv & 0xFE) >> 1); // Nickname is always English, Japanese names are prepended with 0xFC15 which switches the text renderer to JP mode and appended with 0xFC16 to switch back. // This works because Japanese names are limited to 5 characters. Nickname = new String3(String3.Region.Western, stream, 10); }