From 1e5468b3c67555f3d371ae8e437d978d9cea3c5a Mon Sep 17 00:00:00 2001 From: kurokobo <2920259+kurokobo@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:15:55 +0900 Subject: [PATCH] feat: add support for v2024.6.18x --- AUOffsetManager/OffsetManager.cs | 5 +- .../Memory/Structs/WinningPlayerData.cs | 4 +- Offsets.json | 171 ++++++++++++++++++ 3 files changed, 175 insertions(+), 5 deletions(-) diff --git a/AUOffsetManager/OffsetManager.cs b/AUOffsetManager/OffsetManager.cs index 0901e441..759aa6d4 100644 --- a/AUOffsetManager/OffsetManager.cs +++ b/AUOffsetManager/OffsetManager.cs @@ -170,6 +170,8 @@ public class PlayerInfoStructOffsets public class WinningPlayerDataStructOffsets { + public int PlayerNameOffset { get; set; } + public int OutfitOffset { get; set; } public int IsYouOffset { get; set; } public int IsImposterOffset { get; set; } public int IsDeadOffset { get; set; } @@ -177,7 +179,6 @@ public class WinningPlayerDataStructOffsets public class PlayerOutfitStructOffsets { - public int dontCensorNameOffset { get; set; } public int ColorIDOffset { get; set; } public int HatIDOffset { get; set; } public int PetIDOffset { get; set; } @@ -185,7 +186,5 @@ public class PlayerOutfitStructOffsets public int VisorIDOffset { get; set; } public int NamePlateIDOffset { get; set; } public int PlayerNameOffset { get; set; } - public int PreCensorNameOffset { get; set; } - public int PostCensorNameOffset { get; set; } } } diff --git a/AmongUsCapture/Memory/Structs/WinningPlayerData.cs b/AmongUsCapture/Memory/Structs/WinningPlayerData.cs index 207cb299..3f27db6f 100644 --- a/AmongUsCapture/Memory/Structs/WinningPlayerData.cs +++ b/AmongUsCapture/Memory/Structs/WinningPlayerData.cs @@ -29,8 +29,8 @@ public WinningPlayerData(IntPtr baseAddr, ProcessMemory MemInstance, GameOffsets WinningPlayerDataStructOffsets pOf = CurrentOffsets.WinningPlayerDataStructOffsets; fixed (byte* ptr = buffer) { var buffptr = (IntPtr) ptr; - Name = MemInstance.ReadString(MemInstance.Read(baseAddrCopy, oOf.PlayerNameOffset), CurrentOffsets.StringOffsets[0], CurrentOffsets.StringOffsets[1]); - ColorId = (int)Marshal.ReadInt32(buffptr, oOf.ColorIDOffset); + Name = MemInstance.ReadString(MemInstance.Read(baseAddrCopy, pOf.PlayerNameOffset), CurrentOffsets.StringOffsets[0], CurrentOffsets.StringOffsets[1]); + ColorId = MemInstance.Read(MemInstance.Read(baseAddrCopy, pOf.OutfitOffset), oOf.ColorIDOffset); // TODO: Since IDs are changed from enum to string like "hat_police", renaming or mapping existing svgs to string is required // TODO: As a workaround just fill with 0 as IDs HatId = 0; diff --git a/Offsets.json b/Offsets.json index 7b3d96ee..78ff9502 100644 --- a/Offsets.json +++ b/Offsets.json @@ -5998,5 +5998,176 @@ "PreCensorNameOffset": 0x48, "PostCensorNameOffset": 0x50, } + }, + "B46B63C1379942E67C29ED186EEB9730A86F87431BCDEDFEB900457834BC2977": { + "Description": "v2024.6.18s (build num: 4320)", + "AmongUsClientOffset": 0x231BEDC, + "GameDataOffset": 0x22FC248, + "MeetingHudOffset": 0x231DBCC, + "GameStartManagerOffset": 0x228D0FC, + "HudManagerOffset": 0x228D31C, + "ServerManagerOffset": 0x228DDF4, + "TempDataOffset": 0x22F5C50, + "GameOptionsOffset": 0x22FC78C, + + "MeetingHudPtr": [0x231DBCC, 0x5C, 0x0], + "MeetingHudCachePtrOffsets": [0x8], + "MeetingHudStateOffsets": [0x80], + "GameStateOffsets": [0x231BEDC, 0x5C, 0x0, 0x88], + "AllPlayerPtrOffsets": [0x22FC248, 0x5C, 0x0, 0xC], + "AllPlayersOffsets": [0x8], + "PlayerCountOffsets": [0xC], + "ExiledPlayerIdOffsets": [0x231DBCC, 0x5C, 0x0, 0x8C, 0x24], + "RawGameOverReasonOffsets": [0x22F5C50, 0x5C, 0x8], + "WinningPlayersPtrOffsets": [0x22F5C50, 0x5C, 0x0], + "WinningPlayersOffsets": [0x8], + "WinningPlayerCountOffsets": [0xC], + "GameCodeOffsets": [0x228D0FC, 0x5C, 0x0, 0x34, 0x80], + "PlayRegionOffsets": [0x228DDF4, 0x5C, 0x0, 0x10, 0x8, 0x8], + "PlayMapOffsets": [0x22FC78C, 0x5C, 0x0, 0x18, 0x14], + "StringOffsets": [0x8, 0xC], + "AddPlayerPtr": 0x4, + "PlayerListPtr": 0x10, + "PlayerInfoStructOffsets": { + "PlayerIDOffset": 0x24, + "OutfitsOffset": [0x3C, 0xC, 0x1C], + "PlayerLevelOffset": 0x40, + "DisconnectedOffset": 0x44, + "RoleTypeOffset": [0x48, 0xC], + "RoleTeamTypeOffset": [0x48, 0x48], + "TasksOffset": 0x4C, + "IsDeadOffset": 0x50, + "ObjectOffset": 0x54 + }, + "WinningPlayerDataStructOffsets": { + "PlayerNameOffset": 0x8, + "OutfitOffset": 0xC, + "IsYouOffset": 0x10, + "IsImposterOffset": 0x11, + "IsDeadOffset": 0x12 + }, + "PlayerOutfitStructOffsets": { + "ColorIDOffset": 0x8, + "HatIDOffset": 0xC, + "PetIDOffset": 0x10, + "SkinIDOffset": 0x14, + "VisorIDOffset": 0x18, + "NamePlateIDOffset": 0x1C, + "PlayerNameOffset": 0x20, + } + }, + "05E396861BF55AC12BD958DF8B02B85D688630A1CA458DBFBD0EC370645D46B9": { + "Description": "v2024.6.18e (build num: 4320)", + "AmongUsClientOffset": 0x2292578, + "GameDataOffset": 0x227225C, + "MeetingHudOffset": 0x22933D0, + "GameStartManagerOffset": 0x225014C, + "HudManagerOffset": 0x225038C, + "ServerManagerOffset": 0x2250F34, + "TempDataOffset": 0x226BCD4, + "GameOptionsOffset": 0x22727A4, + + "MeetingHudPtr": [0x22933D0, 0x5C, 0x0], + "MeetingHudCachePtrOffsets": [0x8], + "MeetingHudStateOffsets": [0x80], + "GameStateOffsets": [0x2292578, 0x5C, 0x0, 0x88], + "AllPlayerPtrOffsets": [0x227225C, 0x5C, 0x0, 0xC], + "AllPlayersOffsets": [0x8], + "PlayerCountOffsets": [0xC], + "ExiledPlayerIdOffsets": [0x22933D0, 0x5C, 0x0, 0x8C, 0x24], + "RawGameOverReasonOffsets": [0x226BCD4, 0x5C, 0x8], + "WinningPlayersPtrOffsets": [0x226BCD4, 0x5C, 0x0], + "WinningPlayersOffsets": [0x8], + "WinningPlayerCountOffsets": [0xC], + "GameCodeOffsets": [0x225014C, 0x5C, 0x0, 0x34, 0x80], + "PlayRegionOffsets": [0x2250F34, 0x5C, 0x0, 0x10, 0x8, 0x8], + "PlayMapOffsets": [0x22727A4, 0x5C, 0x0, 0x18, 0x14], + "StringOffsets": [0x8, 0xC], + "AddPlayerPtr": 0x4, + "PlayerListPtr": 0x10, + "PlayerInfoStructOffsets": { + "PlayerIDOffset": 0x24, + "OutfitsOffset": [0x3C, 0xC, 0x1C], + "PlayerLevelOffset": 0x40, + "DisconnectedOffset": 0x44, + "RoleTypeOffset": [0x48, 0xC], + "RoleTeamTypeOffset": [0x48, 0x48], + "TasksOffset": 0x4C, + "IsDeadOffset": 0x50, + "ObjectOffset": 0x54 + }, + "WinningPlayerDataStructOffsets": { + "PlayerNameOffset": 0x8, + "OutfitOffset": 0xC, + "IsYouOffset": 0x10, + "IsImposterOffset": 0x11, + "IsDeadOffset": 0x12 + }, + "PlayerOutfitStructOffsets": { + "ColorIDOffset": 0x8, + "HatIDOffset": 0xC, + "PetIDOffset": 0x10, + "SkinIDOffset": 0x14, + "VisorIDOffset": 0x18, + "NamePlateIDOffset": 0x1C, + "PlayerNameOffset": 0x20, + } + }, + "DF15E8B59DD1F52ED8D215AF767220FBFB19D343C49B51FA4A453F7870112FB3": { + "Description": "v2024.6.18m (build num: 4319)", + "AmongUsClientOffset": 0x2ACAC80, + "GameDataOffset": 0x2A8A6B8, + "MeetingHudOffset": 0x2ACCE18, + "GameStartManagerOffset": 0x2A5B918, + "HudManagerOffset": 0x2A5BD88, + "ServerManagerOffset": 0x2A5D328, + "TempDataOffset": 0x2A7DB90, + "GameOptionsOffset": 0x2A8B138, + + "MeetingHudPtr": [0x2ACCE18, 0xB8, 0x0], + "MeetingHudCachePtrOffsets": [0x10], + "MeetingHudStateOffsets": [0xD0], + "GameStateOffsets": [0x2ACAC80, 0xB8, 0x0, 0xEC], + "AllPlayerPtrOffsets": [0x2A8A6B8, 0xB8, 0x0, 0x18], + "AllPlayersOffsets": [0x10], + "PlayerCountOffsets": [0x18], + "ExiledPlayerIdOffsets": [0x2ACCE18, 0xB8, 0x0, 0xE8, 0x30], + "RawGameOverReasonOffsets": [0x2A7DB90, 0xB8, 0x10], + "WinningPlayersPtrOffsets": [0x2A7DB90, 0xB8, 0x0], + "WinningPlayersOffsets": [0x10], + "WinningPlayerCountOffsets": [0x18], + "GameCodeOffsets": [0x2A5B918, 0xB8, 0x0, 0x68, 0xD8], + "PlayRegionOffsets": [0x2A5D328, 0xB8, 0x0, 0x20, 0x10, 0x10], + "PlayMapOffsets": [0x2A8B138, 0xB8, 0x0, 0x30, 0x1C], + "StringOffsets": [0x10, 0x14], + "AddPlayerPtr": 0x8, + "PlayerListPtr": 0x20, + "PlayerInfoStructOffsets": { + "PlayerIDOffset": 0x30, + "OutfitsOffset": [0x50, 0x18, 0x30], + "PlayerLevelOffset": 0x58, + "DisconnectedOffset": 0x5C, + "RoleTypeOffset": [0x60, 0x18], + "RoleTeamTypeOffset": [0x60, 0x64], + "TasksOffset": 0x68, + "IsDeadOffset": 0x70, + "ObjectOffset": 0x78 + }, + "WinningPlayerDataStructOffsets": { + "PlayerNameOffset": 0x10, + "OutfitOffset": 0x18, + "IsYouOffset": 0x20, + "IsImposterOffset": 0x21, + "IsDeadOffset": 0x22 + }, + "PlayerOutfitStructOffsets": { + "ColorIDOffset": 0x10, + "HatIDOffset": 0x18, + "PetIDOffset": 0x20, + "SkinIDOffset": 0x28, + "VisorIDOffset": 0x30, + "NamePlateIDOffset": 0x38, + "PlayerNameOffset": 0x40, + } } }