12131
This commit is contained in:
@@ -335,7 +335,7 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
|
||||
|
||||
return Ret;
|
||||
}
|
||||
// 组队
|
||||
// 组队 创建和加入
|
||||
else if (packet_id == 10)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(SqMtx);
|
||||
@@ -355,6 +355,79 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
|
||||
if (!R)
|
||||
return 0;
|
||||
}
|
||||
// 组队 同意组队和同意加入
|
||||
else if (packet_id == 11)
|
||||
{
|
||||
int Ret = Get()->old_PacketDispatcher_doDispatch(a1, user, packet_class, packet_id, packet_src, packet_len, a7, a8);
|
||||
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_userpartyagree"), -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, SQFalse); // calls the function
|
||||
}
|
||||
sq_settop(v, top); // restores the original stack size
|
||||
return Ret;
|
||||
}
|
||||
// 组队 退出队伍
|
||||
else if (packet_id == 13)
|
||||
{
|
||||
int Ret = Get()->old_PacketDispatcher_doDispatch(a1, user, packet_class, packet_id, packet_src, packet_len, a7, a8);
|
||||
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_userpartyexit"), -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, SQFalse); // calls the function
|
||||
}
|
||||
sq_settop(v, top); // restores the original stack size
|
||||
return Ret;
|
||||
}
|
||||
// 组队 踢出队伍
|
||||
else if (packet_id == 14)
|
||||
{
|
||||
int Ret = Get()->old_PacketDispatcher_doDispatch(a1, user, packet_class, packet_id, packet_src, packet_len, a7, a8);
|
||||
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_userpartykick"), -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, SQFalse); // calls the function
|
||||
}
|
||||
sq_settop(v, top); // restores the original stack size
|
||||
return Ret;
|
||||
}
|
||||
// 组队 委任队长
|
||||
else if (packet_id == 124)
|
||||
{
|
||||
int Ret = Get()->old_PacketDispatcher_doDispatch(a1, user, packet_class, packet_id, packet_src, packet_len, a7, a8);
|
||||
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_userpartygivemaster"), -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, SQFalse); // calls the function
|
||||
}
|
||||
sq_settop(v, top); // restores the original stack size
|
||||
return Ret;
|
||||
}
|
||||
|
||||
// 下线
|
||||
else if (packet_id == 3)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user