更新DPS Hook时返回值false 被忽略的问题

This commit is contained in:
lenheart 2025-12-05 14:05:28 +08:00
parent a3b2ae9cc4
commit 19a6add83e
2 changed files with 25 additions and 7 deletions

View File

@ -48,6 +48,7 @@ Gm_InputFunc_Handle["转职"] <- function(SUser, CmdString) {
} }
} }
Gm_InputFunc_Handle["完成任务"] <- function(SUser, CmdString) { Gm_InputFunc_Handle["完成任务"] <- function(SUser, CmdString) {
SUser.ClearQuest_Gm(674); SUser.ClearQuest_Gm(674);
SUser.ClearQuest_Gm(649); SUser.ClearQuest_Gm(649);
@ -88,7 +89,6 @@ Gm_InputFunc_Handle["升级"] <- function(SUser, CmdString) {
} }
} }
Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) { Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) {
local count = -1; local count = -1;
local pos = 0; local pos = 0;
@ -109,6 +109,27 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) {
} }
} }
Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
local count = -1;
local pos = 0;
local handler = [];
do {
local start = pos;
pos = CmdString.find(" ", pos + 1);
if (pos != null) {
handler.append(CmdString.slice(start + 1, pos));
} else
handler.append(CmdString.slice(start + 1));
count = count + 1
} while (pos != null)
//得到空格数量
if (count == 1) {
SUser.DropItem(3038, 300, 300);
}
}
// Timer.SetTimeOut(function() { // Timer.SetTimeOut(function() {
// Haker.LoadHook("0x0830ADF6", ["pointer", "pointer", "pointer", "pointer", "int", "int", "int", "int", "int", "pointer", "float", "int", "void"], // Haker.LoadHook("0x0830ADF6", ["pointer", "pointer", "pointer", "pointer", "int", "int", "int", "int", "int", "pointer", "float", "int", "void"],
@ -248,9 +269,6 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) {
Timer.SetTimeOut(function () Timer.SetTimeOut(function ()
{ {
print(12313); print(12313);
// dofile("/dp_s/_DPS_/_BuiltProject/宿命魂石/FatalismStone.nut"); GameManager.SetGameMaxLevel(85);
// ProjectInitFuncMap.P_FatalismStone <- FatalismStone();
main();
}, 1); }, 1);

View File

@ -9,7 +9,7 @@ function _Hook_Enter_Currency_Func_(args, TableObj) {
local Ret = null; local Ret = null;
foreach(Func in TableObj) { foreach(Func in TableObj) {
local Buf = Func(args); local Buf = Func(args);
if (Buf) Ret = Buf; if (Buf != null) Ret = Buf;
} }
return Ret; return Ret;
} }
@ -18,7 +18,7 @@ function _Hook_Leave_Currency_Func_(args, TableObj) {
local Ret = null; local Ret = null;
foreach(Func in TableObj) { foreach(Func in TableObj) {
local Buf = Func(args); local Buf = Func(args);
if (Buf) Ret = Buf; if (Buf != null) Ret = Buf;
} }
return Ret; return Ret;
} }