diff --git a/PKHeX/Legality/Core.cs b/PKHeX/Legality/Core.cs index 930fc7765..ef6117af9 100644 --- a/PKHeX/Legality/Core.cs +++ b/PKHeX/Legality/Core.cs @@ -361,6 +361,10 @@ private static EncounterArea[] getTables2() var HG_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Resources.encunters_hb_hg, "hg")); var SS_Headbutt_Slots = EncounterArea.getArray4HGSS_Headbutt(Data.unpackMini(Resources.encunters_hb_ss, "ss")); + var D_HoneyTrees_Slots = SlotsD_HoneyTree.Clone(HoneyTreesLocation); + var P_HoneyTrees_Slots = SlotsP_HoneyTree.Clone(HoneyTreesLocation); + var Pt_HoneyTrees_Slots = SlotsPt_HoneyTree.Clone(HoneyTreesLocation); + MarkG4Slots(ref D_Slots); MarkG4Slots(ref P_Slots); MarkG4Slots(ref Pt_Slots); @@ -369,9 +373,9 @@ private static EncounterArea[] getTables2() MarkG4Slots(ref HG_Headbutt_Slots); MarkG4Slots(ref SS_Headbutt_Slots); - SlotsD = addExtraTableSlots(D_Slots, SlotsDPPPtAlt); - SlotsP = addExtraTableSlots(P_Slots, SlotsDPPPtAlt); - SlotsPt = addExtraTableSlots(Pt_Slots, SlotsDPPPtAlt); + SlotsD = addExtraTableSlots(addExtraTableSlots(D_Slots, D_HoneyTrees_Slots), SlotsDPPPtAlt); + SlotsP = addExtraTableSlots(addExtraTableSlots(P_Slots, P_HoneyTrees_Slots), SlotsDPPPtAlt); + SlotsPt = addExtraTableSlots(addExtraTableSlots(Pt_Slots, Pt_HoneyTrees_Slots), SlotsDPPPtAlt); SlotsHG = addExtraTableSlots(addExtraTableSlots(HG_Slots, HG_Headbutt_Slots), SlotsHGSSAlt); SlotsSS = addExtraTableSlots(addExtraTableSlots(SS_Slots, SS_Headbutt_Slots), SlotsHGSSAlt); diff --git a/PKHeX/Legality/Structures/EncounterArea.cs b/PKHeX/Legality/Structures/EncounterArea.cs index 6b50ee57a..9c18d50ec 100644 --- a/PKHeX/Legality/Structures/EncounterArea.cs +++ b/PKHeX/Legality/Structures/EncounterArea.cs @@ -27,6 +27,28 @@ private EncounterArea(byte[] data) } } + public EncounterArea Clone(int location) + { + EncounterArea Areas = new EncounterArea(); + Areas.Location = location; + Areas.Slots = new EncounterSlot[Slots.Length]; + for (int i = 0; i < Slots.Length; i++) + { + Areas.Slots[i] = Slots[i].Clone(); + } + return Areas; + } + + public EncounterArea[] Clone(int[] locations) + { + EncounterArea[] Areas = new EncounterArea[locations.Length]; + for(int i=0;i