mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-04-17 06:16:00 -05:00
Store leader phrase in trendy phrase object.
This commit is contained in:
parent
d0f0bd650c
commit
ffbb2d6c10
|
|
@ -50,9 +50,7 @@ namespace PkmnFoundations.GTS
|
|||
foreach (BattleTowerProfile4 profile in results)
|
||||
{
|
||||
builder.Append("<li>");
|
||||
byte[] phrase = new byte[8];
|
||||
System.Buffer.BlockCopy(profile.TrendyPhrase, 0, phrase, 0, 8);
|
||||
TrendyPhrase4 tp = new TrendyPhrase4(phrase);
|
||||
TrendyPhrase4 tp = profile.PhraseLeader;
|
||||
builder.Append(tp.Render("<span style=\"color: #0066ff; font-weight: bold;\">{0}</span>"));
|
||||
builder.Append("</li>");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -553,11 +553,7 @@ namespace PkmnFoundations.Data
|
|||
result.Add(new MySqlParameter("@country", record.Profile.Country));
|
||||
result.Add(new MySqlParameter("@region", record.Profile.Region));
|
||||
result.Add(new MySqlParameter("@trainer_id", record.Profile.OT));
|
||||
|
||||
byte[] trendy_phrase = new byte[8];
|
||||
Buffer.BlockCopy(record.Profile.TrendyPhrase, 0, trendy_phrase, 0, 8);
|
||||
result.Add(new MySqlParameter("@trendy_phrase", trendy_phrase));
|
||||
|
||||
result.Add(new MySqlParameter("@trendy_phrase", record.Profile.PhraseLeader.Data));
|
||||
result.Add(new MySqlParameter("@gender", record.Profile.Gender));
|
||||
result.Add(new MySqlParameter("@unknown2", record.Profile.Unknown));
|
||||
result.Add(new MySqlParameter("@rank", record.Rank));
|
||||
|
|
@ -754,12 +750,7 @@ namespace PkmnFoundations.Data
|
|||
profile.Country = reader.GetByte(5);
|
||||
profile.Region = reader.GetByte(6);
|
||||
profile.OT = reader.GetUInt32(7);
|
||||
|
||||
byte[] buffer = reader.GetByteArray(8, 8);
|
||||
ushort[] trendyPhrase = new ushort[4];
|
||||
Buffer.BlockCopy(buffer, 0, trendyPhrase, 0, 8);
|
||||
profile.TrendyPhrase = trendyPhrase;
|
||||
|
||||
profile.PhraseLeader = new TrendyPhrase4(reader.GetByteArray(8, 8));
|
||||
profile.Gender = reader.GetByte(9);
|
||||
profile.Unknown = reader.GetByte(10);
|
||||
|
||||
|
|
@ -1408,11 +1399,7 @@ namespace PkmnFoundations.Data
|
|||
result.Add(new MySqlParameter("@country", record.Profile.Country));
|
||||
result.Add(new MySqlParameter("@region", record.Profile.Region));
|
||||
result.Add(new MySqlParameter("@trainer_id", record.Profile.OT));
|
||||
|
||||
byte[] trendy_phrase = new byte[8];
|
||||
Buffer.BlockCopy(record.Profile.TrendyPhrase, 0, trendy_phrase, 0, 8);
|
||||
result.Add(new MySqlParameter("@trendy_phrase", trendy_phrase));
|
||||
|
||||
result.Add(new MySqlParameter("@trendy_phrase", record.Profile.PhraseLeader.Data));
|
||||
result.Add(new MySqlParameter("@gender", record.Profile.Gender));
|
||||
result.Add(new MySqlParameter("@unknown2", record.Profile.Unknown));
|
||||
result.Add(new MySqlParameter("@rank", record.Rank));
|
||||
|
|
@ -1613,12 +1600,7 @@ namespace PkmnFoundations.Data
|
|||
profile.Country = reader.GetByte(5);
|
||||
profile.Region = reader.GetByte(6);
|
||||
profile.OT = reader.GetUInt32(7);
|
||||
|
||||
byte[] buffer = reader.GetByteArray(8, 8);
|
||||
ushort[] trendyPhrase = new ushort[4];
|
||||
Buffer.BlockCopy(buffer, 0, trendyPhrase, 0, 8);
|
||||
profile.TrendyPhrase = trendyPhrase;
|
||||
|
||||
profile.PhraseLeader = new TrendyPhrase5(reader.GetByteArray(8, 8));
|
||||
profile.Gender = reader.GetByte(9);
|
||||
profile.Unknown = reader.GetByte(10);
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@
|
|||
<Compile Include="Support\StreamExtender.cs" />
|
||||
<Compile Include="Support\StringHelper.cs" />
|
||||
<Compile Include="Support\TrendyPhrase4.cs" />
|
||||
<Compile Include="Support\TrendyPhrase5.cs" />
|
||||
<Compile Include="Support\TrendyPhraseBase.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ namespace PkmnFoundations.Structures
|
|||
public byte Country;
|
||||
public byte Region;
|
||||
public uint OT;
|
||||
// todo: TrendyPhrase4 class
|
||||
public ushort[] TrendyPhrase;
|
||||
public TrendyPhrase5 PhraseLeader;
|
||||
// Different from GTS, 0 = male, 2 = female, 1 = Plato????
|
||||
public byte Gender;
|
||||
public byte Unknown;
|
||||
|
|
@ -48,10 +47,7 @@ namespace PkmnFoundations.Structures
|
|||
writer.Write(Country);
|
||||
writer.Write(Region);
|
||||
writer.Write(OT);
|
||||
for (int x = 0; x < 4; x++)
|
||||
{
|
||||
writer.Write(TrendyPhrase[x]);
|
||||
}
|
||||
writer.Write(PhraseLeader.Data, 0, 8);
|
||||
writer.Write(Gender);
|
||||
writer.Write(Unknown);
|
||||
|
||||
|
|
@ -70,11 +66,9 @@ namespace PkmnFoundations.Structures
|
|||
Country = data[0x12 + start];
|
||||
Region = data[0x13 + start];
|
||||
OT = BitConverter.ToUInt32(data, 0x14 + start);
|
||||
TrendyPhrase = new ushort[4];
|
||||
for (int x = 0; x < 4; x++)
|
||||
{
|
||||
TrendyPhrase[x] = BitConverter.ToUInt16(data, 0x18 + x * 2 + start);
|
||||
}
|
||||
byte[] trendyPhrase = new byte[8];
|
||||
Array.Copy(data, 0x18 + start, trendyPhrase, 0, 8);
|
||||
PhraseLeader = new TrendyPhrase5(trendyPhrase);
|
||||
Gender = data[0x20 + start];
|
||||
Unknown = data[0x21 + start];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ namespace PkmnFoundations.Structures
|
|||
public byte Country;
|
||||
public byte Region;
|
||||
public uint OT;
|
||||
// todo: TrendyPhrase4 class
|
||||
public ushort[] TrendyPhrase;
|
||||
public TrendyPhrase4 PhraseLeader;
|
||||
// Different from GTS, 0 = male, 2 = female, 1 = Plato????
|
||||
public byte Gender;
|
||||
public byte Unknown;
|
||||
|
|
@ -48,10 +47,7 @@ namespace PkmnFoundations.Structures
|
|||
writer.Write(Country);
|
||||
writer.Write(Region);
|
||||
writer.Write(OT);
|
||||
for (int x = 0; x < 4; x++)
|
||||
{
|
||||
writer.Write(TrendyPhrase[x]);
|
||||
}
|
||||
writer.Write(PhraseLeader.Data, 0, 8);
|
||||
writer.Write(Gender);
|
||||
writer.Write(Unknown);
|
||||
|
||||
|
|
@ -70,11 +66,9 @@ namespace PkmnFoundations.Structures
|
|||
Country = data[0x12 + start];
|
||||
Region = data[0x13 + start];
|
||||
OT = BitConverter.ToUInt32(data, 0x14 + start);
|
||||
TrendyPhrase = new ushort[4];
|
||||
for (int x = 0; x < 4; x++)
|
||||
{
|
||||
TrendyPhrase[x] = BitConverter.ToUInt16(data, 0x18 + x * 2 + 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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user