优化双端插件逻辑
This commit is contained in:
parent
39a2993481
commit
14da25237a
|
|
@ -27,10 +27,13 @@ if (!getroottable().rawin("OnGatewaySocketConnectFunc")) OnGatewaySocketConnectF
|
||||||
//插件网关建立连接时
|
//插件网关建立连接时
|
||||||
function OnGatewaySocketConnect() {
|
function OnGatewaySocketConnect() {
|
||||||
print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m");
|
print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m");
|
||||||
print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m");
|
|
||||||
print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m");
|
//获得本服务器的IP
|
||||||
print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m");
|
GatewaySocketPackFuncMap.rawset(10002, function(Jso) {
|
||||||
print("\x1b[96m" + "############双端插件连接建立############" + "\x1b[0m");
|
getroottable().Dps_Self_Ip <- Jso.myip;
|
||||||
|
print("\x1b[96m" + "############双端插件初始化成功############" + "\x1b[0m");
|
||||||
|
});
|
||||||
|
|
||||||
local Jso = {
|
local Jso = {
|
||||||
op = 10001,
|
op = 10001,
|
||||||
channel = Sq_Game_GetConfig(),
|
channel = Sq_Game_GetConfig(),
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
});
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
创建日期:2024-05-01 16:24
|
创建日期:2024-05-01 16:24
|
||||||
文件用途:服务端核心类
|
文件用途:服务端核心类
|
||||||
*/
|
*/
|
||||||
if (!getroottable().rawin("Dps_Self_Ip")) Dps_Self_Ip <- "";
|
|
||||||
|
|
||||||
function removeBackslashes(str) {
|
function removeBackslashes(str) {
|
||||||
local result = "";
|
local result = "";
|
||||||
local index = 0;
|
local index = 0;
|
||||||
|
|
@ -93,23 +91,6 @@ class ServerControl {
|
||||||
}.bindenv(this));
|
}.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列表的玩家信息
|
//给查询指定uid cid列表的玩家信息
|
||||||
GatewaySocketPackFuncMap.rawset(2023101902, function(Jso) {
|
GatewaySocketPackFuncMap.rawset(2023101902, function(Jso) {
|
||||||
local UserList = [];
|
local UserList = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue