Skip to content

Commit

Permalink
Support SV v3.0.1 (architdate#240)
Browse files Browse the repository at this point in the history
No changes to pointers, yippee 🎉
  • Loading branch information
LegoFigure11 authored Feb 1, 2024
1 parent bc380e7 commit a3bbba8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions PKHeX.Core.Injection/Enums/LiveHeXVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ public enum LiveHeXVersion
SV_v201 = 30,
SV_v202 = 31,
SV_v300 = 32,
SV_v301 = 33,
}
}
2 changes: 2 additions & 0 deletions PKHeX.Core.Injection/InjectionBase/InjectionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public abstract class InjectionBase(LiveHeXVersion lv, bool useCache) : PointerC
LiveHeXVersion.SV_v201,
LiveHeXVersion.SV_v202,
LiveHeXVersion.SV_v300,
LiveHeXVersion.SV_v301
}
},
{
Expand All @@ -110,6 +111,7 @@ public abstract class InjectionBase(LiveHeXVersion lv, bool useCache) : PointerC
LiveHeXVersion.SV_v201,
LiveHeXVersion.SV_v202,
LiveHeXVersion.SV_v300,
LiveHeXVersion.SV_v301
}
},
};
Expand Down
1 change: 1 addition & 0 deletions PKHeX.Core.Injection/LiveHeXOffsets/RamOffsets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static LiveHeXVersion[] GetValidVersions(SaveFile sf)
LiveHeXVersion.SV_v201,
LiveHeXVersion.SV_v202,
LiveHeXVersion.SV_v300,
LiveHeXVersion.SV_v301,
],
SAV8LA
=>
Expand Down
6 changes: 4 additions & 2 deletions PKHeX.Core.Injection/Protocols/LPPointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class LPPointer(LiveHeXVersion lv, bool useCache) : InjectionBase(lv, use
LiveHeXVersion.SV_v201,
LiveHeXVersion.SV_v202,
LiveHeXVersion.SV_v300,
LiveHeXVersion.SV_v301,
LiveHeXVersion.LA_v100,
LiveHeXVersion.LA_v101,
LiveHeXVersion.LA_v102,
Expand Down Expand Up @@ -509,6 +510,7 @@ public class LPPointer(LiveHeXVersion lv, bool useCache) : InjectionBase(lv, use
public static readonly Dictionary<LiveHeXVersion, BlockData[]> SCBlocks =
new()
{
{ LiveHeXVersion.SV_v301, Blocks_SV_v300 },
{ LiveHeXVersion.SV_v300, Blocks_SV_v300 },
{ LiveHeXVersion.SV_v202, Blocks_SV_v202 },
{ LiveHeXVersion.SV_v201, Blocks_SV_v201 },
Expand Down Expand Up @@ -539,7 +541,7 @@ private static string GetB1S1Pointer(LiveHeXVersion lv)
{
return lv switch
{
LiveHeXVersion.SV_v300 => "[[[[main+4741FA0]+198]+30]+9D0]",
LiveHeXVersion.SV_v300 or LiveHeXVersion.SV_v301 => "[[[[main+4741FA0]+198]+30]+9D0]",
LiveHeXVersion.SV_v202 => "[[[[main+4623A30]+198]+30]+9D0]",
LiveHeXVersion.SV_v201 => "[[[[main+4622A30]+198]+30]+9D0]",
LiveHeXVersion.SV_v132 => "[[[main+44C1C18]+130]+9B0]",
Expand All @@ -559,7 +561,7 @@ public static string GetSaveBlockPointer(LiveHeXVersion lv)
{
return lv switch
{
LiveHeXVersion.SV_v300 => "[[[[[main+4735BB8]+D8]]]+30]",
LiveHeXVersion.SV_v300 or LiveHeXVersion.SV_v301 => "[[[[[main+4735BB8]+D8]]]+30]",
LiveHeXVersion.SV_v202 => "[[[[[main+4617648]+D8]]]+30]",
LiveHeXVersion.SV_v201 => "[[[[[main+4616648]+D8]]]+30]",
LiveHeXVersion.SV_v132 => "[[[[[main+44B71A8]+D8]]]+30]",
Expand Down

0 comments on commit a3bbba8

Please sign in to comment.