From bf1a56af9d0fde717ce45f1cfd035cd96a9c90e6 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 29 Dec 2018 23:38:59 -0800 Subject: [PATCH] Add xmldoc --- PKHeX.Core/MysteryGifts/WR7.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/MysteryGifts/WR7.cs b/PKHeX.Core/MysteryGifts/WR7.cs index fc094f384..12b7572b1 100644 --- a/PKHeX.Core/MysteryGifts/WR7.cs +++ b/PKHeX.Core/MysteryGifts/WR7.cs @@ -4,6 +4,13 @@ namespace PKHeX.Core { + /// + /// Record of a received file. + /// + /// + /// A full is not stored in the structure, as it is immediately converted to upon receiving from server. + /// The save file just stores a summary of the received data for the user to look back at. + /// public class WR7 : MysteryGift { public const int Size = 0x140; @@ -42,6 +49,8 @@ public int ItemCount set => Data[0x0D] = (byte)value; } + // unknown: region from 0x10 to 0xFF ? + public override int Species { get => BitConverter.ToUInt16(Data, 0x10C); @@ -50,7 +59,7 @@ public override int Species public override bool GiftUsed { get; set; } - public override int Level + public override int Level // are moves stored? mew has '1' but this could be move { get => BitConverter.ToUInt16(Data, 0x10E); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x10E); @@ -118,9 +127,11 @@ public override bool IsItem public override PKM ConvertToPKM(ITrainerInfo SAV, EncounterCriteria criteria) { + // this method shouldn't really be called, use the WB7 data not the WR7 data. if (!IsPokémon) return null; + // we'll just generate something as close as we can, since we must return something! var pk = new PB7(); SAV.ApplyToPKM(pk); if (!GameVersion.GG.Contains((GameVersion) SAV.Game)) @@ -128,8 +139,9 @@ public override PKM ConvertToPKM(ITrainerInfo SAV, EncounterCriteria criteria) pk.Species = Species; pk.Met_Level = pk.CurrentLevel = Level; + pk.MetDate = Date; - return pk; // can't really do much more + return pk; // can't really do much more, just return the rough data } } }