```
feat(config): 重构配置结构并添加服务器列表支持 - 重命名PortBL字段为GameOnlineID,改进命名语义 - 添加ServerList结构体用于管理服务器配置 - 移除七牛云配置相关字段 - 更新ID生成器使用GameOnlineID参数 fix(server): 调整服务器启动参数和VIP逻辑 - 将启动参数从-port改为-id,统一参数命名 - 更新服务器启动逻辑,基于GameOnlineID获取服务器信息 - 为VIP服务器启用调试模式 - 优化端口可用性检查逻辑 refactor(model): 统一模型基类结构 - 将各模型中的*cool.Model嵌入改为Base基类 - 移除soul.go
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"blazing/common/data/xmlres"
|
||||
"blazing/common/rpc"
|
||||
"blazing/common/socket"
|
||||
"blazing/cool"
|
||||
|
||||
"blazing/logic/controller"
|
||||
|
||||
@@ -53,14 +54,15 @@ func isPortAvailable(port uint32) bool {
|
||||
|
||||
// Start 启动服务器
|
||||
// 如果id是0,那就是login server
|
||||
func Start(serverID uint16) {
|
||||
// 确定端口
|
||||
r := blservice.NewLoginServiceService().GetServerID(serverID)
|
||||
if r.IsVip == 1 {
|
||||
func Start() {
|
||||
serverID := cool.Config.GameOnlineID
|
||||
cool.Config.ServerInfo = blservice.NewLoginServiceService().GetServerID(serverID).ServerList
|
||||
|
||||
if cool.Config.ServerInfo.IsVip == 1 {
|
||||
g.DB().SetDebug(true)
|
||||
}
|
||||
|
||||
port, err := determinePort(r.CanPort)
|
||||
port, err := determinePort(cool.Config.ServerInfo.CanPort)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to determine port: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user