diff --git a/build/.cmake/api/v1/reply/index-2024-06-24T14-51-38-0750.json b/build/.cmake/api/v1/reply/index-2024-07-12T10-07-25-0552.json similarity index 100% rename from build/.cmake/api/v1/reply/index-2024-06-24T14-51-38-0750.json rename to build/.cmake/api/v1/reply/index-2024-07-12T10-07-25-0552.json diff --git a/build/src/CMakeFiles/hook_aurora.dir/controller.cpp.o b/build/src/CMakeFiles/hook_aurora.dir/controller.cpp.o index f4a308a..d85aed7 100644 Binary files a/build/src/CMakeFiles/hook_aurora.dir/controller.cpp.o and b/build/src/CMakeFiles/hook_aurora.dir/controller.cpp.o differ diff --git a/build/src/CMakeFiles/hook_aurora.dir/df_main.cpp.o b/build/src/CMakeFiles/hook_aurora.dir/df_main.cpp.o index da5dfb0..b768847 100644 Binary files a/build/src/CMakeFiles/hook_aurora.dir/df_main.cpp.o and b/build/src/CMakeFiles/hook_aurora.dir/df_main.cpp.o differ diff --git a/build/src/CMakeFiles/hook_aurora.dir/l_socket.cpp.o b/build/src/CMakeFiles/hook_aurora.dir/l_socket.cpp.o index ed4bc38..bcb312b 100644 Binary files a/build/src/CMakeFiles/hook_aurora.dir/l_socket.cpp.o and b/build/src/CMakeFiles/hook_aurora.dir/l_socket.cpp.o differ diff --git a/build/src/CMakeFiles/hook_aurora.dir/l_squirrel.cpp.o b/build/src/CMakeFiles/hook_aurora.dir/l_squirrel.cpp.o index 326d2ac..16fbecd 100644 Binary files a/build/src/CMakeFiles/hook_aurora.dir/l_squirrel.cpp.o and b/build/src/CMakeFiles/hook_aurora.dir/l_squirrel.cpp.o differ diff --git a/include/l_socket.h b/include/l_socket.h index dfaef47..2285929 100644 --- a/include/l_socket.h +++ b/include/l_socket.h @@ -162,9 +162,9 @@ public: std::string Str = StrBuffer; delete[] StrBuffer; - // std::cout << "包大小: " << PackSize << std::endl; - // std::cout << "包内容: " << Str << std::endl; - // std::cout << "收到了第: " << TestCode << "个包" << std::endl; + std::cout << "包大小: " << PackSize << std::endl; + std::cout << "包内容: " << Str << std::endl; + std::cout << "收到了第: " << TestCode << "个包" << std::endl; std::lock_guard lock(SqMtx); SQInteger top = sq_gettop(v); // saves the stack size before the call diff --git a/src/controller.cpp b/src/controller.cpp index 9eaec75..1110931 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -312,6 +312,25 @@ int Controller::hook_PacketDispatcher_doDispatch(PacketDispatcher *a1, CUser *us } 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 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) { diff --git a/src/l_squirrel.cpp b/src/l_squirrel.cpp index b3c81b3..5821e72 100644 --- a/src/l_squirrel.cpp +++ b/src/l_squirrel.cpp @@ -9,7 +9,7 @@ #include #include "SqrReqScript.hpp" -#define WEBSCRIPT true; +// #define WEBSCRIPT true; using asio::ip::tcp;