TA的每日心情 | 擦汗 3 小时前 |
---|
签到天数: 369 天 [LV.9]以坛为家II
论坛元老
- 积分
- 6617
|
BUG
引擎版本号: |
2023.11.30 |
BUG描述: |
function HookNpcConditionProcess(ScriptParam: PScriptCmdParam): Boolean; stdcall;
命令hook不到 |
BUG重现方式: |
function HookNpcConditionProcess(ScriptParam: PScriptCmdParam): Boolean; stdcall;
命令hook不到 |
修复后达到的效果: |
function HookNpcConditionProcess(ScriptParam: PScriptCmdParam): Boolean; stdcall;
hook到 |
联系方式: |
393960725 |
function HookNpcConditionProcess(ScriptParam: PScriptCmdParam): Boolean; stdcall;
命令hook不到
const
//检测
sCHECK_CHECKLEVEL = 'MyCheckLevel';
nCHECK_CHECKLEVEL = 1000;
sCHECK_CHECKMINE = 'CheckMineEx';
nCHECK_CHECKMINE = 1001;
//执行
sACT_TAKEBAGITEMS = 'TAKEBAGITEMSEX';
nACT_TAKEBAGITEMS = 1000;
sACT_TAKEMINE = 'TakeMineEx';
nACT_TAKEMINE = 1001;
//Hook NPC条件判断载入命令,如自定义命令:CheckTest,将返回值置为 1
function HookNpcLoadConditionCmd(pCmd: PAnsiChar): Integer; stdcall;
begin
Result := 0;
if lstrcmpiA(pCmd, 'MyCheckLevel') = 0 then // 不区分大小写比较
Result := nCHECK_CHECKLEVEL
else if lstrcmpiA(pCmd, sCHECK_CHECKMINE) = 0 then
Result := nCHECK_CHECKMINE;
end;
//Hook NPC条件判断执行命令,ScriptParam.nCMDCode = 1 即为 CheckTest命令
function HookNpcConditionProcess(ScriptParam: PScriptCmdParam): Boolean; stdcall;
//var
// Abil: TAbility;
begin
Result := False;
if ScriptParam.nCMDCode = nCHECK_CHECKMINE then
begin
g_AppFunc.BaseObject.SysMsg(ScriptParam.PlayObject, '检查测试?', 0, 250, MSGTYEPE_HINT); ------------》无法执行
// if g_AppFunc.BaseObject.GetWAbility(ScriptParam.PlayObject, @Abil) then
// begin
// Result := Abil.Level >= ScriptParam.nParam01;
// end;
end;
end;
|
|