Fixed some merge things.

This commit is contained in:
Megan Edwards
2026-07-26 20:07:55 -04:00
parent b7759e7a6b
commit 9045841cae
3 changed files with 25 additions and 21 deletions

View File

@@ -136,6 +136,7 @@
<Compile Include="Support\TrendyPhrase5.cs" />
<Compile Include="Support\TrendyPhraseBase.cs" />
<Compile Include="Support\ValidationSummary.cs" />
<Compile Include="Wfc\VipRecord.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />

View File

@@ -129,23 +129,20 @@ namespace PkmnFoundations.Wfc
private string[] QuestionAnswers;
/// <summary>A series of unknown bytes.</summary>
public byte[] Unk;
public byte[] Unk; // 12 bytes
/// <summary>If the question is a 'special' question, and the man in the plaza will say so.</summary>
public bool IsSpecial;
public PlazaQuestion(int id, string sentence, string[] answers, byte[] unk, bool isSpecial)
: this(id, id, sentence, answers, unk, isSpecial)
{
ID = id;
PublicID = id;
Unk = unk;
Sentence = sentence;
Answers = answers;
IsSpecial = isSpecial;
}
private PlazaQuestion(int id, int publicID, string sentence, string[] answers, byte[] unk, bool isSpecial)
{
if (Unk == null || Unk.Length != 12) throw new ArgumentException("Unk must be 12 bytes.");
ID = id;
PublicID = publicID;
Unk = unk;
@@ -231,16 +228,22 @@ namespace PkmnFoundations.Wfc
}
byte[] unk = new byte[] {
data[start + 336], data[start + 337], data[start + 338], data[start + 339], data[start + 340],
data[start + 341], data[start + 342], data[start + 343], data[start + 344], data[start + 345],
data[start + 346], data[start + 347],
};
data[start + 336], data[start + 337], data[start + 338], data[start + 339], data[start + 340],
data[start + 341], data[start + 342], data[start + 343], data[start + 344], data[start + 345],
data[start + 346], data[start + 347],
};
bool isSpecial = BitConverter.ToInt32(data, start + 348) != 0;
return new PlazaQuestion(internalID, publicID, question, answers, unk, isSpecial);
}
}
public enum StandardQuestions : int
{
// todo: Document all the standard questions
Custom = 1001
}
public class SubmittedQuestionnaire
{
public int ID;

View File

@@ -11,20 +11,20 @@ namespace PkmnFoundations.Wfc
{
public VipRecord()
{
Pid = 0;
WordPartA = 0;
WordPartB = 0;
WordPartC = 0;
WordPartD = 0;
Pid = 0;
WordPartA = 0;
WordPartB = 0;
WordPartC = 0;
WordPartD = 0;
}
public VipRecord(uint pid)
{
Pid = pid;
WordPartA = 0;
WordPartB = 0;
WordPartC = 0;
WordPartD = 0;
Pid = pid;
WordPartA = 0;
WordPartB = 0;
WordPartC = 0;
WordPartD = 0;
}
public VipRecord(uint pid, byte wordA, byte wordB, byte wordC, byte wordD)