This commit is contained in:
lenheart
2024-07-19 13:36:35 +08:00
parent 27e53d431e
commit 1fb87fa181
9 changed files with 14 additions and 11 deletions

View File

@@ -241,7 +241,9 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
else if (packet_id == 17)
{
std::string str = Utils::PackToHexString((const unsigned char *)packet_src, 20);
std::lock_guard<std::recursive_mutex> lock(SqMtx);
str += ("RindroType" + *(int *)(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
@@ -251,7 +253,7 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
{ // 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_pushstring(v, _SC((str).c_str()), -1);
sq_call(v, 3, SQTrue, SQTrue); // calls the function
sq_getbool(v, -1, &R);
}