This commit is contained in:
root
2024-04-30 03:01:48 +08:00
parent 9abf8aa3a4
commit 47be0adc6b
330 changed files with 5549 additions and 39399 deletions

View File

@@ -24,16 +24,16 @@ void Controller::init()
{
CMem::WriteUChar((void *)(base::GlobalData::Init_fix_1 - 0x1), 0);
//.text:085BDE9D 83 F8 0A cmp eax, 10
CMem::WriteUChar((void *)(base::CParty::addDungeonClear_fix_1 + 2), 0x7E); // 普通被击
CMem::WriteUChar((void *)(base::CParty::addDungeonClear_fix_1 + 2), 0x7E); // 普通被击
//.text:085BDF30 83 F8 1E cmp eax, 30
CMem::WriteUChar((void *)(base::CParty::addDungeonClear_fix_2 + 2), 0x7E); // 远古被击
CMem::WriteUChar((void *)(base::CParty::addDungeonClear_fix_2 + 2), 0x7E); // 远古被击
//.text:085BDFC3 83 F8 32 cmp eax, 50
CMem::WriteUChar((void *)(base::CParty::addDungeonClear_fix_3 + 2), 0x7E); // 异界被击
CMem::WriteUChar((void *)(base::CParty::addDungeonClear_fix_3 + 2), 0x7E); // 异界被击
CMem::WriteUChar((void *)(0x081C025F + 1), 0x0B);
CMem::WriteUChar((void *)(0x081C029E + 1), 0x0B);
/* 修正使用代币增加积分
地址 长度 原始字节 已修补字节
/* 修正使用代币增加积分
地址 长度 原始字节 已修补字节
08179043 0x1 97 B8
0817904E 0x1 8C AD
*/
@@ -57,7 +57,7 @@ void Controller::init()
CMem::HookJmp(base::importCashShopItemList_hook_begin, (int)new_importCashShopItemList_addr);
/************************************************************************/
/* HOOK 商城购买物品成功处理 */
/* HOOK 商城购买物品成功处理 */
/************************************************************************/
// mov dword ptr [ebp-0FCh], 0FFFFFFFFh
@@ -144,7 +144,7 @@ int Controller::hook_UseJewel_dispatch_sig(void *pDispatcher_UseJewel, CUser *us
{
ENUM_PACK_RET_TYPE ret = CDispatch::Get()->UseJewel_dispatch_sig(pDispatcher_UseJewel, user, pBuf);
int result = (ret == PAK_ERROR) ? 1 : 0;
// 08217C06 分解
// 08217C06 分解
return result;
}
@@ -215,12 +215,12 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
}
return result;
}
// 区域移动
// 区域移动
else if (packet_id == 38)
{
std::lock_guard<std::recursive_mutex> lock(SqMtx);
SQBool R;
// 执行虚拟机Main函数
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
sq_pushstring(v, _SC("Cb_move_area"), -1);
@@ -237,13 +237,13 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
if (!R)
return 0;
}
// 普通输入
// 普通输入
else if (packet_id == 17)
{
std::string str = Utils::PackToHexString((const unsigned char *)packet_src, 20);
std::lock_guard<std::recursive_mutex> lock(SqMtx);
SQBool R;
// 执行虚拟机Main函数
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
sq_pushstring(v, _SC("Cb_base_input"), -1);
@@ -259,14 +259,14 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
if (!R)
return 0;
}
// GM输入
// GM输入
else if (packet_id == 179)
{
// std::cout << "传入的: " << std::hex << (int)user << std::endl;
// std::cout << "传入的: " << std::hex << (int)user << std::endl;
std::string str = Utils::PackToHexString((const unsigned char *)packet_src, 13);
str = str.substr(2);
std::lock_guard<std::recursive_mutex> lock(SqMtx);
// 执行虚拟机Main函数
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
sq_pushstring(v, _SC("Cb_gm_input"), -1);
@@ -279,11 +279,11 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
}
sq_settop(v, top); // restores the original stack size
}
// 特殊道具使用
else if (packet_id == 255)
// 特殊道具使用
else if (packet_id == 255)
{
std::lock_guard<std::recursive_mutex> lock(SqMtx);
// 执行虚拟机Main函数
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
sq_pushstring(v, _SC("Cb_use_item_sp"), -1);
@@ -296,12 +296,12 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
}
sq_settop(v, top); // restores the original stack size
}
// 自定义包
// 自定义包
else if (packet_id == 130)
{
std::string str = Utils::PackToHexString((const unsigned char *)packet_src, 13);
std::lock_guard<std::recursive_mutex> lock(SqMtx);
// 执行虚拟机Main函数
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
sq_pushstring(v, _SC("OnClientSocketMsg"), -1);
@@ -326,7 +326,7 @@ int Controller::hook_LenDispatcher_New_Gmdebug_Command(void *Command, void *CUse
msg = msg.substr(2);
std::lock_guard<std::recursive_mutex> lock(SqMtx);
// 执行虚拟机Main函数
// 执行虚拟机Main函数
SQInteger top = sq_gettop(v); // saves the stack size before the call
sq_pushroottable(v); // pushes the global table
sq_pushstring(v, _SC("Cb_gm_input"), -1);