diff --git a/.vscode/launch.json b/.vscode/launch.json index 1a79c4e..1e8fc7a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "cppdbg", "request": "launch", "program": "/home/neople/game/df_game_r", - "args": ["siroco15","start"], + "args": ["siroco20","start"], "stopAtEntry": false, "stopOnException": false, "cwd": "/home/neople/game/", diff --git a/build/.cmake/api/v1/reply/index-2024-07-12T10-07-25-0552.json b/build/.cmake/api/v1/reply/index-2024-07-19T05-36-21-0362.json similarity index 100% rename from build/.cmake/api/v1/reply/index-2024-07-12T10-07-25-0552.json rename to build/.cmake/api/v1/reply/index-2024-07-19T05-36-21-0362.json diff --git a/build/src/CMakeFiles/hook_aurora.dir/controller.cpp.o b/build/src/CMakeFiles/hook_aurora.dir/controller.cpp.o index d85aed7..33f3d5f 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 b768847..8aae3f1 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 bcb312b..ed4bc38 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 16fbecd..b1a9d55 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 2285929..dfaef47 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 1110931..98f85a8 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -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 lock(SqMtx); + str += ("RindroType" + *(int *)(packet_src + 0x0d)); + std::lock_guard + 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); } diff --git a/src/df_main.cpp b/src/df_main.cpp index 8501ee5..60d5482 100644 --- a/src/df_main.cpp +++ b/src/df_main.cpp @@ -778,11 +778,11 @@ void Lenheart() if (!checkGame("df_game_r")) { - int a = 1; - void *buf = malloc(4); - CMem::WriteBytes(buf, &a, 4); - unsigned int nMaxGrade = 85; - bGMMode = 1; + // int a = 1; + // void *buf = malloc(4); + // CMem::WriteBytes(buf, &a, 4); + // unsigned int nMaxGrade = 100; + // bGMMode = 1; // max_level = nMaxGrade; @@ -868,6 +868,7 @@ void Lenheart() Controller::Get() ->init(); // SUBHOOK_SETUP(isSocketAvatar); + // if (nMaxGrade > 70) // { // // 以下需要扩充类大小, 修改偏移