From 15f08fa5ce309f5af23e722af339eac252443dc1 Mon Sep 17 00:00:00 2001 From: pv
Date: Wed, 31 Jan 2024 22:27:52 +0300 Subject: [PATCH 1/2] Fix addresses for 2.11 --- include/RED4ext/Addresses.hpp | 4 ++-- scripts/patterns.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/RED4ext/Addresses.hpp b/include/RED4ext/Addresses.hpp index 32e08f96b..993f39a9f 100644 --- a/include/RED4ext/Addresses.hpp +++ b/include/RED4ext/Addresses.hpp @@ -131,7 +131,7 @@ constexpr uintptr_t ISerializable_sub_C0 = 0x1406CBEE4 - ImageBase; // 40 53 48 #pragma endregion #pragma region JobDispatcher -constexpr uintptr_t JobDispatcher = 0x143372C58 - ImageBase; // 48 89 05 ? ? ? ? 48 83 C4 ? 5F C3, expected: 6, index: 2, offset: 3 +constexpr uintptr_t JobDispatcher = 0x1433844E0 - ImageBase; // 48 89 05 ? ? ? ? 48 83 C4 ? 5F C3, expected: 6, index: 4, offset: 3 constexpr uintptr_t JobDispatcher_DispatchJob = 0x14013E140 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 44 88 40 ? 57 41 54 41 55, expected: 2, index: 0 #pragma endregion @@ -169,7 +169,7 @@ constexpr uintptr_t ResourceDepot = 0x1448345D8 - ImageBase; // 48 89 05 ? ? ? ? #pragma endregion #pragma region ResourceLoader -constexpr uintptr_t ResourceLoader = 0x143731060 - ImageBase; // 48 89 05 ? ? ? ? 48 83 C4 ? 5F C3, expected: 6, index: 3, offset: 3 +constexpr uintptr_t ResourceLoader = 0x143372C58 - ImageBase; // 48 89 05 ? ? ? ? 48 83 C4 ? 5F C3, expected: 6, index: 2, offset: 3 constexpr uintptr_t ResourceLoader_FindTokenFast = 0x1401388DC - ImageBase; // 48 8B C4 4C 89 40 ? 53 48 83 EC ? 48 8B DA 4C 8D 40 ?, expected: 2, index: 0 constexpr uintptr_t ResourceLoader_LoadAsync = 0x1401A3204 - ImageBase; // 48 89 5C 24 ? 55 48 8B EC 48 83 EC ? 83 4D E8 ? 33 C0, expected: 1, index: 0 #pragma endregion diff --git a/scripts/patterns.py b/scripts/patterns.py index fa0542fda..52b40a49e 100644 --- a/scripts/patterns.py +++ b/scripts/patterns.py @@ -157,7 +157,7 @@ def get_groups() -> List[Group]: ]), Group(name='JobDispatcher', pointers=[ - Item(pattern='48 89 05 ? ? ? ? 48 83 C4 ? 5F C3', offset=3, expected=6, index=2) + Item(pattern='48 89 05 ? ? ? ? 48 83 C4 ? 5F C3', offset=3, expected=6, index=4) ], functions=[ Item(name='DispatchJob', pattern='48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 44 88 40 ? 57 41 54 41 55', expected=2, index=0) @@ -194,7 +194,7 @@ def get_groups() -> List[Group]: ]), Group(name='ResourceLoader', pointers=[ - Item(pattern='48 89 05 ? ? ? ? 48 83 C4 ? 5F C3', offset=3, expected=6, index=3) + Item(pattern='48 89 05 ? ? ? ? 48 83 C4 ? 5F C3', offset=3, expected=6, index=2) ], functions=[ Item(name='FindTokenFast', pattern='48 8B C4 4C 89 40 ? 53 48 83 EC ? 48 8B DA 4C 8D 40 ?', expected=2, index=0), From b4fce5d870da8dde1bf08ab2280f2f7b1bafeb43 Mon Sep 17 00:00:00 2001 From: pv
Date: Wed, 31 Jan 2024 22:28:06 +0300
Subject: [PATCH 2/2] Fix transaction system
---
.../Natives/gameITransactionSystem.hpp | 48 ++++++++++---------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/include/RED4ext/Scripting/Natives/gameITransactionSystem.hpp b/include/RED4ext/Scripting/Natives/gameITransactionSystem.hpp
index 980bc15a2..27d97628c 100644
--- a/include/RED4ext/Scripting/Natives/gameITransactionSystem.hpp
+++ b/include/RED4ext/Scripting/Natives/gameITransactionSystem.hpp
@@ -18,14 +18,13 @@ struct ITransactionSystem : IGameSystem
static constexpr const char* NAME = "gameITransactionSystem";
static constexpr const char* ALIAS = "ITransactionSystem";
- virtual void sub_1A8() = 0; // 1A8
virtual void sub_1B0() = 0; // 1B0
virtual void sub_1B8() = 0; // 1B8
virtual void sub_1C0() = 0; // 1C0
- virtual CName* GetItemAppearance(CName& aAppearance, IScriptable* aOwner, const ItemID& aItemID) = 0; // 1C8
- virtual void ResetItemAppearance(IScriptable* aOwner, const ItemID& aItemID) = 0; // 1D0
- virtual void sub_1D8() = 0; // 1D8
- virtual void sub_1E0() = 0; // 1E0
+ virtual void sub_1C8() = 0; // 1C8
+ virtual void sub_1D0() = 0; // 1D0
+ virtual CName* GetItemAppearance(CName& aAppearance, IScriptable* aOwner, const ItemID& aItemID) = 0; // 1D8
+ virtual void ResetItemAppearance(IScriptable* aOwner, const ItemID& aItemID) = 0; // 1E0
virtual void sub_1E8() = 0; // 1E8
virtual void sub_1F0() = 0; // 1F0
virtual void sub_1F8() = 0; // 1F8
@@ -84,43 +83,46 @@ struct ITransactionSystem : IGameSystem
virtual void sub_3A0() = 0; // 3A0
virtual void sub_3A8() = 0; // 3A8
virtual void sub_3B0() = 0; // 3B0
- virtual bool IsSlotEmpty(IScriptable* aOwner, TweakDBID aSlotID) = 0; // 3B8
- virtual bool IsSlotSpawning(IScriptable* aOwner, TweakDBID aSlotID) = 0; // 3C0
- virtual void sub_3C8() = 0; // 3C8
- virtual void sub_3D0() = 0; // 3D0
+ virtual void sub_3B8() = 0; // 3B8
+ virtual void sub_3C0() = 0; // 3C0
+ virtual bool IsSlotEmpty(IScriptable* aOwner, TweakDBID aSlotID) = 0; // 3C8
+ virtual bool IsSlotSpawning(IScriptable* aOwner, TweakDBID aSlotID) = 0; // 3D0
virtual void sub_3D8() = 0; // 3D8
virtual void sub_3E0() = 0; // 3E0
virtual void sub_3E8() = 0; // 3E8
virtual void sub_3F0() = 0; // 3F0
virtual void sub_3F8() = 0; // 3F8
virtual void sub_400() = 0; // 400
- virtual bool GetItemInSlot(IScriptable* aOwner, TweakDBID aSlotID, const Handle