public BattleTowerProfile4(EncodedString4 name, Versions version, Languages language, byte country, byte region, uint ot, TrendyPhrase4 phrase_leader, byte gender, byte unknown) { if (name == null) throw new ArgumentNullException("name"); if (name.Size != 16) throw new ArgumentException("name"); if (phrase_leader == null) throw new ArgumentNullException("phrase_leader"); Name = name; // todo: clone Version = version; Language = language; Country = country; Region = region; OT = ot; PhraseLeader = phrase_leader; // todo: clone Gender = gender; Unknown = unknown; }
public void Load(byte[] data, int start) { if (start + 0xe4 > data.Length) throw new ArgumentOutOfRangeException("start"); Party = new BattleTowerPokemon4[3]; for (int x = 0; x < 3; x++) { Party[x] = new BattleTowerPokemon4(data, start + x * 0x38); } Profile = new BattleTowerProfile4(data, 0xa8 + start); byte[] trendyPhrase = new byte[8]; Array.Copy(data, 0xca + start, trendyPhrase, 0, 8); PhraseChallenged = new TrendyPhrase4(trendyPhrase); trendyPhrase = new byte[8]; Array.Copy(data, 0xd2 + start, trendyPhrase, 0, 8); PhraseWon = new TrendyPhrase4(trendyPhrase); trendyPhrase = new byte[8]; Array.Copy(data, 0xda + start, trendyPhrase, 0, 8); PhraseLost = new TrendyPhrase4(trendyPhrase); Unknown3 = BitConverter.ToUInt16(data, 0xe2 + start); }
public void Load(byte[] data, int start) { if (start + 0x22 > data.Length) throw new ArgumentOutOfRangeException("start"); Name = new EncodedString4(data, start, 0x10); Version = (Versions)data[0x10 + start]; Language = (Languages)data[0x11 + start]; Country = data[0x12 + start]; Region = data[0x13 + start]; OT = BitConverter.ToUInt32(data, 0x14 + start); byte[] trendyPhrase = new byte[8]; Array.Copy(data, 0x18 + start, trendyPhrase, 0, 8); PhraseLeader = new TrendyPhrase4(trendyPhrase); Gender = data[0x20 + start]; Unknown = data[0x21 + start]; }