装备跨界
This commit is contained in:
43
Base/_Tool/HookMap.nut
Normal file
43
Base/_Tool/HookMap.nut
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
文件名:HookMap.nut
|
||||
路径:Base/_Tool/HookMap.nut
|
||||
创建日期:2025-12-12 22:40
|
||||
文件用途:
|
||||
*/
|
||||
//通用HOOK入口函数
|
||||
function _Hook_Enter_Currency_Func_(args, TableObj) {
|
||||
local Ret = null;
|
||||
foreach(Func in TableObj) {
|
||||
local Buf = Func(args);
|
||||
if (Buf != null) Ret = Buf;
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
//通用HOOK出口函数
|
||||
function _Hook_Leave_Currency_Func_(args, TableObj) {
|
||||
local Ret = null;
|
||||
foreach(Func in TableObj) {
|
||||
local Buf = Func(args);
|
||||
if (Buf != null) Ret = Buf;
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
//通用HOOK注册全局临时表名
|
||||
_Hook_Register_Currency_TableName_ <- null;
|
||||
//通用注册HOOK函数
|
||||
function _Hook_Register_Currency_Func_(AddressString, ArgRetArr, TableName) {
|
||||
getroottable().rawset(TableName + "Enter_Func", {});
|
||||
getroottable().rawset(TableName + "Leave_Func", {});
|
||||
_Hook_Register_Currency_TableName_ = TableName;
|
||||
Rindro_Haker.LoadHook(AddressString, ArgRetArr,
|
||||
function(args) {
|
||||
return _Hook_Enter_Currency_Func_(args, getroottable()[getroottable()._Hook_Register_Currency_TableName_ + "Enter_Func"]);
|
||||
},
|
||||
function(args) {
|
||||
return _Hook_Leave_Currency_Func_(args, getroottable()[getroottable()._Hook_Register_Currency_TableName_ + "Leave_Func"]);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
_Hook_Register_Currency_Func_(0xE6E070, ["int", "int", "int", "int"], "Cb_OpenWindow_");
|
||||
Reference in New Issue
Block a user