Compare commits
2 Commits
a4d83b3557
...
27e53d431e
| Author | SHA1 | Date |
|---|---|---|
|
|
27e53d431e | |
|
|
29a4292618 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -162,9 +162,9 @@ public:
|
||||||
|
|
||||||
std::string Str = StrBuffer;
|
std::string Str = StrBuffer;
|
||||||
delete[] StrBuffer;
|
delete[] StrBuffer;
|
||||||
// std::cout << "包大小: " << PackSize << std::endl;
|
std::cout << "包大小: " << PackSize << std::endl;
|
||||||
// std::cout << "包内容: " << Str << std::endl;
|
std::cout << "包内容: " << Str << std::endl;
|
||||||
// std::cout << "收到了第: " << TestCode << "个包" << std::endl;
|
std::cout << "收到了第: " << TestCode << "个包" << std::endl;
|
||||||
|
|
||||||
std::lock_guard<std::recursive_mutex> lock(SqMtx);
|
std::lock_guard<std::recursive_mutex> lock(SqMtx);
|
||||||
SQInteger top = sq_gettop(v); // saves the stack size before the call
|
SQInteger top = sq_gettop(v); // saves the stack size before the call
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,25 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us
|
||||||
}
|
}
|
||||||
sq_settop(v, top); // restores the original stack size
|
sq_settop(v, top); // restores the original stack size
|
||||||
}
|
}
|
||||||
|
// 更换装备
|
||||||
|
else if (packet_id == 19)
|
||||||
|
{
|
||||||
|
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_player_chanage_equ"), -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
|
||||||
|
|
||||||
|
return Ret;
|
||||||
|
}
|
||||||
// 组队
|
// 组队
|
||||||
else if (packet_id == 10)
|
else if (packet_id == 10)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue