From 1e13220e6e2148929d6a4bc8606fd2fbf5b3a26e Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 28 Mar 2018 20:38:07 -0700 Subject: [PATCH] Add IEncounterable -> pkm interface method egg,slot,static,link,trade need to be implemented later remove IEncounterable from PL6 --- PKHeX.Core/Legality/Encounters/EncounterEgg.cs | 2 ++ PKHeX.Core/Legality/Encounters/EncounterInvalid.cs | 2 ++ PKHeX.Core/Legality/Encounters/EncounterLink.cs | 2 ++ PKHeX.Core/Legality/Encounters/EncounterRejected.cs | 2 ++ PKHeX.Core/Legality/Encounters/EncounterSlot.cs | 2 ++ PKHeX.Core/Legality/Encounters/EncounterStatic.cs | 2 ++ PKHeX.Core/Legality/Encounters/EncounterTrade.cs | 2 ++ PKHeX.Core/Legality/Structures/IEncounterable.cs | 2 ++ PKHeX.Core/MysteryGifts/PL6.cs | 2 +- 9 files changed, 17 insertions(+), 1 deletion(-) diff --git a/PKHeX.Core/Legality/Encounters/EncounterEgg.cs b/PKHeX.Core/Legality/Encounters/EncounterEgg.cs index a2f53bb53..545f57e85 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterEgg.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterEgg.cs @@ -14,5 +14,7 @@ public GameVersion Game; public bool SplitBreed; + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } diff --git a/PKHeX.Core/Legality/Encounters/EncounterInvalid.cs b/PKHeX.Core/Legality/Encounters/EncounterInvalid.cs index 4ca7466aa..08e65c37e 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterInvalid.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterInvalid.cs @@ -19,5 +19,7 @@ LevelMax = pkm.CurrentLevel; EggEncounter = pkm.WasEgg; } + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } diff --git a/PKHeX.Core/Legality/Encounters/EncounterLink.cs b/PKHeX.Core/Legality/Encounters/EncounterLink.cs index bab2108e3..78604b32d 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterLink.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterLink.cs @@ -36,5 +36,7 @@ public bool RibbonWorld { get; set; } public bool RibbonChampionWorld { get; set; } public bool RibbonSouvenir { get; set; } + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } diff --git a/PKHeX.Core/Legality/Encounters/EncounterRejected.cs b/PKHeX.Core/Legality/Encounters/EncounterRejected.cs index c39bb2777..2e77e81ed 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterRejected.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterRejected.cs @@ -20,5 +20,7 @@ namespace PKHeX.Core Encounter = encounter; Check = check; } + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } \ No newline at end of file diff --git a/PKHeX.Core/Legality/Encounters/EncounterSlot.cs b/PKHeX.Core/Legality/Encounters/EncounterSlot.cs index f35be2ff3..fdfab7025 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterSlot.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterSlot.cs @@ -60,5 +60,7 @@ return $"{wild} {Type.ToString().Replace("_", " ")}"; } } + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } diff --git a/PKHeX.Core/Legality/Encounters/EncounterStatic.cs b/PKHeX.Core/Legality/Encounters/EncounterStatic.cs index 29f1bf8a6..dec9a4190 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterStatic.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterStatic.cs @@ -63,5 +63,7 @@ private const string _name = "Static Encounter"; public string Name => Version == GameVersion.Any ? _name : $"{_name} ({Version})"; + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } diff --git a/PKHeX.Core/Legality/Encounters/EncounterTrade.cs b/PKHeX.Core/Legality/Encounters/EncounterTrade.cs index 3af783bbb..410e3f56f 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterTrade.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterTrade.cs @@ -53,5 +53,7 @@ { 0, 126, 254, 2001, 30002, 30001, 30001, }; + + public PKM ConvertToPKM(ITrainerInfo SAV) => throw new System.NotImplementedException(); } } diff --git a/PKHeX.Core/Legality/Structures/IEncounterable.cs b/PKHeX.Core/Legality/Structures/IEncounterable.cs index 2156bb3f2..5edf96279 100644 --- a/PKHeX.Core/Legality/Structures/IEncounterable.cs +++ b/PKHeX.Core/Legality/Structures/IEncounterable.cs @@ -10,6 +10,8 @@ bool EggEncounter { get; } int LevelMin { get; } int LevelMax { get; } + + PKM ConvertToPKM(ITrainerInfo SAV); } public static partial class Extensions diff --git a/PKHeX.Core/MysteryGifts/PL6.cs b/PKHeX.Core/MysteryGifts/PL6.cs index 753a7f175..adbb9a950 100644 --- a/PKHeX.Core/MysteryGifts/PL6.cs +++ b/PKHeX.Core/MysteryGifts/PL6.cs @@ -189,7 +189,7 @@ namespace PKHeX.Core /// This Template object is very similar to the structure and similar objects, in that the structure offsets are ordered the same. /// This template object is only present in Generation 6 save files. /// - public class PL6_PKM : IEncounterable, IRibbonSetEvent3, IRibbonSetEvent4 + public class PL6_PKM : IRibbonSetEvent3, IRibbonSetEvent4 { internal const int Size = 0xA0;