MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / setFunctionValue

Function setFunctionValue

Il2cppHook/_Ufunc.js:1942–1953  ·  view source on GitHub ↗
(mPtr, retValue = ptr(0))

Source from the content-addressed store, hash-verified

1940Object.defineProperty(exports, "__esModule", { value: true });
1941exports.setFunctionBool = exports.setFunctionValue = void 0;
1942let setFunctionValue = (mPtr, retValue = ptr(0)) => {
1943 let srcPtr = mPtr;
1944 mPtr = checkCmdInput(mPtr);
1945 retValue = checkCmdInput(retValue);
1946 mPtr = checkPointer(mPtr);
1947 Interceptor.attach(mPtr, {
1948 onLeave: (retval) => {
1949 LOGW(`setFunctionValue | ${ptr(srcPtr)} | ret => { ${retval} -> ${retValue} } `);
1950 retval.replace(retValue);
1951 }
1952 });
1953};
1954exports.setFunctionValue = setFunctionValue;
1955const setFunctionBool = (mPtr, retval = false) => (0, exports.setFunctionValue)(mPtr, ptr(retval ? 1 : 0));
1956exports.setFunctionBool = setFunctionBool;

Callers

nothing calls this directly

Calls 3

checkPointerFunction · 0.70
LOGWFunction · 0.70
attachMethod · 0.45

Tested by

no test coverage detected