Skip to content

Commit

Permalink
fix: 6.5 offset changes for CN
Browse files Browse the repository at this point in the history
  • Loading branch information
nt153133 committed Mar 5, 2024
1 parent 2ca32b7 commit 9012bf5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 53 deletions.
6 changes: 1 addition & 5 deletions Extensions/BagSlotExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,11 @@ public static class Offsets

//6.51 hotfix
[Offset("Search BA ? ? ? ? E8 ? ? ? ? 48 8B 7C 24 ? 84 C0 Add 1 Read32")]
//6.51
//[Offset("Search BA ? ? ? ? E8 ? ? ? ? 33 D2 48 8B CD E8 ? ? ? ? 48 8B 7C 24 ? Add 1 Read32")]
[OffsetCN("Search BA ? ? ? ? E8 ? ? ? ? 48 8B CD E8 ? ? ? ? 48 8B 7C 24 ? Add 1 Read32")]
public static int DesynthId;

//6.5
//6.5Done
//BA ? ? ? ? E8 ? ? ? ? 48 8B 7C 24 ? 48 8B 5C 24 ? 84 C0 Add 1 Read32
[Offset("Search BA ? ? ? ? E8 ? ? ? ? 48 8B 7C 24 ? 48 8B 5C 24 ? 84 C0 Add 1 Read32")]
[OffsetCN("Search BA ? ? ? ? E8 ? ? ? ? 48 8B 5C 24 ? 48 8B 74 24 ? 48 83 C4 ? 5F C3 48 8B 4E ? 48 8B 01 Add 1 Read32")]
public static int ReduceId;

[Offset("Search 44 0F B7 7C 73 ? Add 5 Read8")]
Expand Down
3 changes: 1 addition & 2 deletions Memory/Offsets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ public static partial class Offsets
[Offset("Search 48 8D 0D ? ? ? ? E8 ? ? ? ? 84 C0 0F 84 ? ? ? ? 8B 93 ? ? ? ? Add 3 TraceRelative")]
public static IntPtr PlayerState;

//6.5
//6.5Done
[Offset("Search E8 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? E9 ? ? ? ? 49 8D 8E ? ? ? ? TraceCall")]
[OffsetCN("Search E8 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? E9 ? ? ? ? 48 8D 8F ? ? ? ? TraceCall")]
public static IntPtr ExecuteCommandInner;

[Offset("Search 48 8B 0D ?? ?? ?? ?? 48 8B DA E8 ?? ?? ?? ?? 48 85 C0 74 ?? 4C 8B 00 48 8B C8 41 FF 90 ?? ?? ?? ?? 48 8B C8 BA ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 85 C0 74 ?? 4C 8B 00 48 8B D3 48 8B C8 48 83 C4 ?? 5B 49 FF 60 ?? 48 83 C4 ?? 5B C3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 40 53 Add 3 TraceRelative")]
Expand Down
33 changes: 0 additions & 33 deletions RemoteAgents/AgentFishGuide2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,38 +87,6 @@ public async Task<FishGuide2Item[]> GetFishList(int start = 0, int count = 0)
}
}

//6.5 Size and Layout is different
#if RB_CN
[StructLayout(LayoutKind.Explicit, Size = 0x10)]
public struct FishGuide2Item
{
//0
[FieldOffset(0x0)]
public uint FishItem;
//0x4
[FieldOffset(0X4)]
public ushort Index;
//0x6
[FieldOffset(0x6)]
public ushort Unknown;
//0x8
[FieldOffset(0x8)]
public ushort Unknown2;
//0xA
[FieldOffset(0xA)]
public ushort Unknown5;
//0xC
[FieldOffset(0xC)]
public byte bHasCaught;

public bool HasCaught => bHasCaught == 1;

public override string ToString()
{
return $"{DataManager.GetItem(FishItem)} : {HasCaught}";
}
}
#else
[StructLayout(LayoutKind.Explicit, Size = 0x14)]
public struct FishGuide2Item
{
Expand Down Expand Up @@ -153,5 +121,4 @@ public override string ToString()
return $"{DataManager.GetItem(FishItem)} : {HasCaught}";
}
}
#endif
}
18 changes: 5 additions & 13 deletions RemoteAgents/AgentInclusionShop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ internal static class Offsets
internal static int SecondPointer;

//0x20
//6.5
//6.5Done
[Offset("Search 41 8B 47 ? 49 8B DE Add 3 Read8")]
[OffsetCN("Search 41 8B 47 ? 48 C1 EB ? Add 3 Read8")]
internal static int ShopKey;

//0x38
Expand All @@ -46,46 +45,40 @@ internal static class Offsets
internal static int NumberOfSubCategories;

//0x11D1
//6.5
//6.5Done
[Offset("Search 41 0F B6 80 ? ? ? ? 4C 6B E8 ? Add 4 Read32")]
[OffsetCN("Search 41 0F B6 81 ? ? ? ? 48 69 D1 ? ? ? ? 48 69 C8 ? ? ? ? 41 0F B6 81 ? ? ? ? 4E 8B AC 0A ? ? ? ? Add 4 Read32")]
internal static int SubCategory;

//0x11A8
[Offset("Search 41 0F B6 80 ? ? ? ? 42 0F B6 94 00 ? ? ? ? Add 4 Read32")]
internal static int Category;

//0x1180
//6.5
//6.5Done
[Offset("Search 42 0F B6 94 00 ? ? ? ? 48 69 C2 ? ? ? ? Add 5 Read32")]
[OffsetCN("Search 42 0F B6 8C 08 ? ? ? ? 41 0F B6 81 ? ? ? ? 48 69 D1 ? ? ? ? 48 69 C8 ? ? ? ? 41 0F B6 81 ? ? ? ? 4E 8B AC 0A ? ? ? ? Add 5 Read32")]
internal static int CategoryArray;

//0x208
[Offset("Search 4E 03 AC 00 ? ? ? ? Add 4 Read32")]
[OffsetCN("Search 4E 8B AC 0A ? ? ? ? Add 4 Read32")]
internal static int SubCategoryArrayStart;

//0x88
//6.5
[Offset("Search 48 69 C1 ? ? ? ? 4E 03 AC 00 ? ? ? ? Add 3 Read8")]
[OffsetCN("Search 48 69 D1 ? ? ? ? 48 69 C8 ? ? ? ? 41 0F B6 81 ? ? ? ? 4E 8B AC 0A ? ? ? ? Add 3 Read8")]
internal static int StructSizeCategory;


[Offset("Search 0F B6 98 ? ? ? ? E8 ? ? ? ? 80 7C 24 ? ? Add 3 Read32")]
internal static int ItemCount;

//0x19d0
//6.5 unknown
//6.5 Done
[Offset("Search 48 69 D1 ? ? ? ? 49 8B 89 ? ? ? ? Add 3 Read32")]
[OffsetCN("Search 48 69 C8 ? ? ? ? 41 0F B6 81 ? ? ? ? 4E 8B AC 0A ? ? ? ? Add 3 Read32")]
internal static int StructSizeSubCategory;

//0x6C
//6.5
//6.5Done
[Offset("Search 8B 4B ? 85 C9 74 ? E8 ? ? ? ? 48 85 C0 74 ? 8B 4B ? Add 2 Read8")]
[OffsetCN("Search 48 6B C8 ? 48 8B 47 ? 4C 03 E9 Add 3 Read8")]
internal static int StructSizeItem;

//0x175
Expand All @@ -98,7 +91,6 @@ internal static class Offsets

//6.5
[Offset("Search 45 8B 7C B4 ? Add 4 Read8")]
[OffsetValueCN(0)]
internal static int ItemStructAdjustment;
}

Expand Down

0 comments on commit 9012bf5

Please sign in to comment.