refactor(common/cool/coolconfig): 修改RPC配置字段类型

将RPC字段从uint16类型更改为string类型的Address字段,
以支持更灵活的地址配置。同时更新了配置初始化逻辑,
从server.rpc改为server.address作为配置键。
```
This commit is contained in:
昔念
2026-01-25 03:40:29 +08:00
parent 392061df04
commit 32f57732fe
20 changed files with 166 additions and 196 deletions

View File

@@ -5,6 +5,7 @@ import (
"blazing/logic/service/player"
"context"
"fmt"
"time"
)
type Broadcast struct {
@@ -41,9 +42,17 @@ func (s *Server) QuitSelf(a int) error {
s.quit = true
if a != 0 {
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
value.Kick()
value.Kick(1)
return true
})
} else {
go func() {
<-time.After(10 * time.Minute)
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
value.Kick(1)
return true
})
}()
}
return nil