Skip to content

Commit

Permalink
update livehex to sv_v110
Browse files Browse the repository at this point in the history
  • Loading branch information
architdate committed Dec 2, 2022
1 parent 08ef397 commit 6806983
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions PKHeX.Core.Injection/BotController/LiveHeXVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
public enum LiveHeXVersion
{
SV_v110,
SV_v101,
LA_v111,
LA_v102,
Expand Down
2 changes: 1 addition & 1 deletion PKHeX.Core.Injection/LiveHeXOffsets/RamOffsets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public static LiveHeXVersion[] GetValidVersions(SaveFile sf)
{
return sf switch
{
SAV9SV => new[] { LiveHeXVersion.SV_v101 },
SAV9SV => new[] { LiveHeXVersion.SV_v101, LiveHeXVersion.SV_v110 },
SAV8LA => new[] { LiveHeXVersion.LA_v100 , LiveHeXVersion.LA_v101, LiveHeXVersion.LA_v102, LiveHeXVersion.LA_v111 },
SAV8BS => new[] { LiveHeXVersion.BD_v100, LiveHeXVersion.SP_v100, LiveHeXVersion.BD_v110, LiveHeXVersion.SP_v110, LiveHeXVersion.BD_v111, LiveHeXVersion.SP_v111, LiveHeXVersion.BDSP_v112, LiveHeXVersion.BDSP_v113, LiveHeXVersion.BDSP_v120, LiveHeXVersion.BD_v130, LiveHeXVersion.SP_v130 },
SAV8SWSH => new[] { LiveHeXVersion.SWSH_Orion, LiveHeXVersion.SWSH_Rigel1, LiveHeXVersion.SWSH_Rigel2 },
Expand Down
19 changes: 14 additions & 5 deletions PKHeX.Core.Injection/Protocols/LPPointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ namespace PKHeX.Core.Injection
{
public static class LPPointer
{
public static readonly LiveHeXVersion[] SupportedVersions = { LiveHeXVersion.SV_v101, LiveHeXVersion.LA_v100, LiveHeXVersion.LA_v101, LiveHeXVersion.LA_v102, LiveHeXVersion.LA_v111 };
public static readonly LiveHeXVersion[] SupportedVersions = { LiveHeXVersion.SV_v101, LiveHeXVersion.SV_v110, LiveHeXVersion.LA_v100, LiveHeXVersion.LA_v101, LiveHeXVersion.LA_v102, LiveHeXVersion.LA_v111 };

private const int LA_MYSTATUS_BLOCK_SIZE = 0x80;
private const int SV_MYSTATUS_BLOCK_SIZE = 0x68;

public static readonly BlockData[] Blocks_SV_v101 =
{
new() { Name = "MyStatus", Display = "Trainer Data", SCBKey = 0xE3E89BD1, Pointer = "[[main+42FD560]+128]+40" },
new() { Name = "KItem", Display = "Items", SCBKey = 0x21C9BD44, Pointer = "[[main+42FD560]+190]+40" },
new() { Name = "KTeraRaids", Display = "Raid", SCBKey = 0xCAAC8800, Pointer = "[[main+42FD560]+160]+40" },
new() { Name = "MyStatus", Display = "Trainer Data", SCBKey = 0xE3E89BD1, Pointer = "[[main+42DA8E8]+148]+40" },
new() { Name = "KItem", Display = "Items", SCBKey = 0x21C9BD44, Pointer = "[[main+42DA8E8]+1B0]+40" },
new() { Name = "KTeraRaids", Display = "Raid", SCBKey = 0xCAAC8800, Pointer = "[[main+42DA8E8]+180]+40" },
};

public static readonly BlockData[] Blocks_SV_v110 =
{
new() { Name = "MyStatus", Display = "Trainer Data", SCBKey = 0xE3E89BD1, Pointer = "[[main+4384B18]+148]+40" },
new() { Name = "KItem", Display = "Items", SCBKey = 0x21C9BD44, Pointer = "[[main+4384B18]+1B0]+40" },
new() { Name = "KTeraRaids", Display = "Raid", SCBKey = 0xCAAC8800, Pointer = "[[main+4384B18]+180]+40" },
};

public static readonly BlockData[] Blocks_LA_v100 =
Expand Down Expand Up @@ -78,6 +85,7 @@ public static class LPPointer
// LiveHexVersion -> Blockname -> List of <SCBlock Keys, OffsetValues>
public static readonly Dictionary<LiveHeXVersion, BlockData[]> SCBlocks = new()
{
{ LiveHeXVersion.SV_v110, Blocks_SV_v110 },
{ LiveHeXVersion.SV_v101, Blocks_SV_v101 },
{ LiveHeXVersion.LA_v100, Blocks_LA_v100 },
{ LiveHeXVersion.LA_v101, Blocks_LA_v101 },
Expand All @@ -97,7 +105,8 @@ private static string GetB1S1Pointer(LiveHeXVersion lv)
{
return lv switch
{
LiveHeXVersion.SV_v101 => "[[[main+42FD560]+108]+9B0]",
LiveHeXVersion.SV_v110 => "[[[main+4384B18]+128]+9B0]",
LiveHeXVersion.SV_v101 => "[[[main+42DA8E8]+128]+9B0]",
LiveHeXVersion.LA_v100 => "[[main+4275470]+1F0]+68",
LiveHeXVersion.LA_v101 => "[[main+427B470]+1F0]+68",
LiveHeXVersion.LA_v102 => "[[main+427C470]+1F0]+68",
Expand Down

0 comments on commit 6806983

Please sign in to comment.