From 14da25237a0bc2d6c125cac101ca64dc832948bc Mon Sep 17 00:00:00 2001 From: lenheart Date: Fri, 26 Dec 2025 15:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=8C=E7=AB=AF=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _DPS_/_Core/BaseClass/Socket/SocketBase.nut | 11 +++++++---- _DPS_/_Core/Interface.nut | 12 ++++++++++++ _DPS_/_Core/ServerControl/ServerControl.nut | 19 ------------------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/_DPS_/_Core/BaseClass/Socket/SocketBase.nut b/_DPS_/_Core/BaseClass/Socket/SocketBase.nut index 8c66ece..e7745d1 100644 --- a/_DPS_/_Core/BaseClass/Socket/SocketBase.nut +++ b/_DPS_/_Core/BaseClass/Socket/SocketBase.nut @@ -27,10 +27,13 @@ if (!getroottable().rawin("OnGatewaySocketConnectFunc")) OnGatewaySocketConnectF //插件网关建立连接时 function OnGatewaySocketConnect() { print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m"); - print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m"); - print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m"); - print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m"); - print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m"); + + //获得本服务器的IP + GatewaySocketPackFuncMap.rawset(10002, function(Jso) { + getroottable().Dps_Self_Ip <- Jso.myip; + print("\x1b[96m" + "############双端插件初始化成功############" + "\x1b[0m"); + }); + local Jso = { op = 10001, channel = Sq_Game_GetConfig(), diff --git a/_DPS_/_Core/Interface.nut b/_DPS_/_Core/Interface.nut index dba320f..a4acc22 100644 --- a/_DPS_/_Core/Interface.nut +++ b/_DPS_/_Core/Interface.nut @@ -205,3 +205,15 @@ if (getroottable().rawin("DP_S_VERSION") && DP_S_VERSION >= 25.329 && DP_S_VERSI } ); } + +if (!getroottable().rawin("Dps_Self_Ip")) Dps_Self_Ip <- ""; + Haker.LoadHook("0x081E8C78", ["pointer", "pointer", "pointer", "int"], + function(args) { + local SUser = User(args[1]); + local SNU = Memory.allocUtf8String(getroottable().Dps_Self_Ip); + SUser.SendBlob(SNU); + return null; + }, + function(args) { + return null; + }); \ No newline at end of file diff --git a/_DPS_/_Core/ServerControl/ServerControl.nut b/_DPS_/_Core/ServerControl/ServerControl.nut index e616a20..3d11d55 100644 --- a/_DPS_/_Core/ServerControl/ServerControl.nut +++ b/_DPS_/_Core/ServerControl/ServerControl.nut @@ -4,8 +4,6 @@ 创建日期:2024-05-01 16:24 文件用途:服务端核心类 */ -if (!getroottable().rawin("Dps_Self_Ip")) Dps_Self_Ip <- ""; - function removeBackslashes(str) { local result = ""; local index = 0; @@ -93,23 +91,6 @@ class ServerControl { }.bindenv(this)); - //获得本服务器的IP - GatewaySocketPackFuncMap.rawset(10002, function(Jso) { - getroottable().Dps_Self_Ip <- Jso.myip; - - Haker.LoadHook("0x081E8C78", ["pointer", "pointer", "pointer", "int"], - function(args) { - local SUser = User(args[1]); - local SNU = Memory.allocUtf8String(Dps_Self_Ip); - SUser.SendBlob(SNU); - return null; - }, - function(args) { - return null; - }); - }.bindenv(this)); - - //给查询指定uid cid列表的玩家信息 GatewaySocketPackFuncMap.rawset(2023101902, function(Jso) { local UserList = [];