diff --git a/library/Library.csproj b/library/Library.csproj index d24c174d..b6a8326a 100644 --- a/library/Library.csproj +++ b/library/Library.csproj @@ -136,6 +136,7 @@ + diff --git a/library/Wfc/PlazaQuestionnaire.cs b/library/Wfc/PlazaQuestionnaire.cs index bc0e560f..c9b186a4 100644 --- a/library/Wfc/PlazaQuestionnaire.cs +++ b/library/Wfc/PlazaQuestionnaire.cs @@ -129,23 +129,20 @@ namespace PkmnFoundations.Wfc private string[] QuestionAnswers; /// A series of unknown bytes. - public byte[] Unk; + public byte[] Unk; // 12 bytes /// If the question is a 'special' question, and the man in the plaza will say so. 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; diff --git a/library/Wfc/VipRecord.cs b/library/Wfc/VipRecord.cs index 084ddfe9..8888d536 100644 --- a/library/Wfc/VipRecord.cs +++ b/library/Wfc/VipRecord.cs @@ -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)