This commit is contained in:
lenheart 2024-10-08 00:28:00 +08:00
parent a563244c48
commit 8089cd55a6
5 changed files with 25 additions and 23 deletions

Binary file not shown.

View File

@ -65,3 +65,5 @@
4927 5655 1727852657922704935 src/CMakeFiles/hook_aurora.dir/asmjit/x86/x86instapi.cpp.o b8ee5965066143b1
5731 6317 1727852658570701818 src/CMakeFiles/hook_aurora.dir/Tool.cpp.o ff4157d87b4d223d
2895 3304 1727852655574716229 src/CMakeFiles/hook_aurora.dir/asmjit/core/string.cpp.o d744bacf7efd3e43
3 960 1728318477365295769 src/CMakeFiles/hook_aurora.dir/controller.cpp.o 966257e703ebe5d2
960 1828 1728318478226291580 /dp_s/lib/libAurora.so f60120a0f41d47a8

View File

@ -52,29 +52,29 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
return 0;
}
// 普通输入
else if (packet_id == 17)
{
std::string str = Utils::PackToHexString((const unsigned char *)packet_src, 20);
str += ("RindroType");
str += std::to_string((int)(*(unsigned char *)(packet_src + 0x0d)));
std::lock_guard<std::recursive_mutex> lock(SqMtx);
SQBool R;
// 执行虚拟机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);
if (SQ_SUCCEEDED(sq_get(v, -2)))
{ // gets the fie123oo' from the global table
sq_pushroottable(v); // push the 'this' (in this case is the global table)
sq_pushuserpointer(v, user);
sq_pushstring(v, _SC((str).c_str()), -1);
sq_call(v, 3, SQTrue, SQTrue); // calls the function
sq_getbool(v, -1, &R);
}
sq_settop(v, top); // restores the original stack size
if (!R)
return 0;
}
// else if (packet_id == 17)
// {
// std::string str = Utils::PackToHexString((const unsigned char *)packet_src, 20);
// str += ("RindroType");
// str += std::to_string((int)(*(unsigned char *)(packet_src + 0x0d)));
// std::lock_guard<std::recursive_mutex> lock(SqMtx);
// SQBool R;
// // 执行虚拟机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);
// if (SQ_SUCCEEDED(sq_get(v, -2)))
// { // gets the fie123oo' from the global table
// sq_pushroottable(v); // push the 'this' (in this case is the global table)
// sq_pushuserpointer(v, user);
// sq_pushstring(v, _SC((str).c_str()), -1);
// sq_call(v, 3, SQTrue, SQTrue); // calls the function
// sq_getbool(v, -1, &R);
// }
// sq_settop(v, top); // restores the original stack size
// if (!R)
// return 0;
// }
// GM输入
else if (packet_id == 179)
{