Skip to content

Commit 5614c7c

Browse files
author
誠 遺憾
committed
ouou
1 parent 4bada4e commit 5614c7c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "CommandHook.h"
22

33
bool CommandHook::ValidRange::handle(int input, int low, int high, __int64 out) {
4-
static auto oFunc = funcPtr->GetFastcall<bool, unsigned char, bool>();
4+
static auto oFunc = funcPtr->GetFastcall<bool, int, int, int, __int64>();
55
return true;
66
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "ItemEnchants.h"
22

3-
EnchantResult* ItemEnchantsHook::canEnchant::handle(__int64 _this, EnchantResult* result, EnchantMentInstance en, bool allowNonVanilla) {
4-
static auto oFunc = funcPtr->GetFastcall<EnchantResult*, __int64, EnchantResult*, EnchantMentInstance, bool>();
3+
EnchantResult* ItemEnchantsHook::canEnchant::handle(__int64 _this, EnchantResult* result, __int64 en, bool allowNonVanilla) {
4+
static auto oFunc = funcPtr->GetFastcall<EnchantResult*, __int64, EnchantResult*, __int64, bool>();
55
return oFunc(_this, result, en, true);
66
}

ForceEnchant/Force/Hooks/ItemEnchants/ItemEnchants.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace ItemEnchantsHook {
99
static inline std::unique_ptr<FuncHook> funcPtr;
1010
public:
1111
canEnchant() : Hook("ItemEnchants::canEnchant") {};
12-
static EnchantResult* handle(__int64 _this, EnchantResult* result, EnchantMentInstance en, bool allowNonVanilla);
12+
static EnchantResult* handle(__int64 _this, EnchantResult* result, __int64 en, bool allowNonVanilla);
1313
bool Initialize() override {
1414
uintptr_t address = SigScan("4C 89 44 24 ?? 53 55 57 41");
1515
return CreateHook(funcPtr, address, handle);

0 commit comments

Comments
 (0)