cgmsv引擎论坛

 找回密码
 注册/Sign up
搜索
查看: 1530|回复: 3

[LUA] NL.RegPartyEvent NLG.ShowWindowTalked 修复补丁

[复制链接]
发表于 2021-10-28 15:57:43 | 显示全部楼层 |阅读模式
1. 修复拦截离队后部分情况会卡死玩家的问题
2. 修复NLG.ShowWindowTalked data参数长度超过1024时崩端的问题,现在修改到支持8000

支持21.2a

  1. ffi.patch(0x0058BF06, { 0x34 });
  2. ffi.patch(0x0058C1EA, { 0x08 });
  3. ffi.patch(0x0058C1F0, { 0xCB });
  4. ffi.patch(0x0058C1F8, { 0xCB });
  5. print('[DEBUG] NLG_ShowWindowTalked_Patch done')
  6. ffi.patch(0x00438B89, {
  7.   0x8B, 0x45, 0xE4, 0xC7, 0x44, 0x24, 0x04, 0x39, 0x02, 0x00, 0x00, 0xC7, 0x04, 0x24, 0x80, 0x36, 0x61, 0x00,
  8.   0x89, 0x44, 0x24, 0x08, 0xE8, 0x0C, 0xEC, 0xFE, 0xFF, 0x85, 0xC0, 0x74, 0x15, 0x8B, 0x45, 0xE4,
  9.   0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xBA, 0x01, 0x00, 0x00, 0x00, 0x90, 0x90,
  10. })
  11. local fnA = ffi.cast('int (__cdecl*)(uint32_t a1)', 0x00438B70)
  12. local fnB = ffi.cast('int (__cdecl*) (uint32_t a1, uint32_t a2, int a3)', 0x005779E0);
  13. local function fnC(charPtr)
  14.   if ffi.readMemoryDWORD(0x09613C88) ~= 0 then
  15.     local targetCharPtr = ffi.readMemoryDWORD(charPtr + 0xA08);
  16.     local res = fnB(charPtr, targetCharPtr, 1);
  17.     if res == 0 then
  18.       return 1;
  19.     end
  20.   end
  21.   return fnA(charPtr);
  22. end
  23. local fnPtr = ffi.cast('int (__cdecl*)(uint32_t a1)', fnC)
  24. local fnPtr1 = ffi.new('uint32_t[?]', 2);
  25. fnPtr1[0] = ffi.cast('uint32_t', ffi.cast('void*', fnPtr)) - 0x0040EE50;
  26. fnPtr1 = ffi.cast('uint8_t*', fnPtr1);
  27. local s = {}
  28. for i = 1, 4 do
  29.   s[i] = fnPtr1[i - 1]
  30. end
  31. ffi.patch(0x0040EE4C, s)
  32. _G.___script_buffer_RegPartyEvent = { fnPtr, fnC };
  33. print('[DEBUG] NL_RegPartyEvent_Patch done')
复制代码


CGMSV21.2a_Patch1.7z (2.1 KB, 下载次数: 0)






Rank: 1

发表于 2021-11-13 14:14:11 来自手机 | 显示全部楼层
好厉害 这是修改内存吗?
 楼主| 发表于 2021-11-16 12:13:45 | 显示全部楼层
补一个Battle.PVE的补丁
ffi.patch(0x00572A12, { 0x7D });
print('[DEBUG] BATTLE_PVE_PATCH done')
您需要登录后才可以回帖 登录 | 注册/Sign up

本版积分规则

手机版|cgmsv引擎论坛

GMT+8, 2024-11-21 22:31 , Processed in 0.171358 second(s), 10 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表