This commit is contained in:
lenheart
2024-06-03 10:57:47 +08:00
parent b6d3556286
commit d02932b717
144 changed files with 32907 additions and 527 deletions

View File

@@ -312,6 +312,26 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
}
sq_settop(v, top); // restores the original stack size
}
// 组队
else if (packet_id == 10)
{
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_userpartycreate"), -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_call(v, 2, 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 == 3)
{
@@ -328,22 +348,6 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
}
sq_settop(v, top); // restores the original stack size
}
// 放弃副本
else if (packet_id == 45)
{
std::lock_guard<std::recursive_mutex> lock(SqMtx);
// 执行虚拟机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_giveup_dgn"), -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_call(v, 2, SQFalse, SQTrue); // calls the function
}
sq_settop(v, top); // restores the original stack size
}
// 自定义包
else if (packet_id == 130)
{