This commit is contained in:
Naruse
2026-04-29 16:00:34 +08:00
3 changed files with 13 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ public class ServerOption
public string FallbackLanguage { get; set; } = "EN";
public string[] DefaultPermissions { get; set; } = ["Admin"];
public ServerProfile ServerProfile { get; set; } = new();
public bool EnableGmMenu { get; set; } = true;
public bool AutoCreateUser { get; set; } = true;
public bool SavePersonalDebugFile { get; set; } = false;
public bool AutoSendResponseWhenNoHandler { get; set; } = true;

View File

@@ -53,6 +53,7 @@ public class HandlerReqLogin : Handler
await connection.Player.OnEnterGame();
connection.Player.Connection = connection;
await connection.SendPacket(new PacketRspLogin(connection.Player!));
await SendDebugLoginState(connection);
await connection.Player.OnHeartBeat();
await connection.SendPacket(new PacketNtfUpdateFriend(connection.Player!));
@@ -118,4 +119,14 @@ public class HandlerReqLogin : Handler
});
}
}
private static async Task SendDebugLoginState(Connection connection)
{
var response = new JsonObject
{
["IsDebug"] = ConfigManager.Config.ServerOption.EnableGmMenu
};
await CallGSRouter.SendScript(connection, "gm.notifylogin", response.ToJsonString());
}
}

View File

@@ -1 +1 @@
v=1.4
v=1.5