feat(config): 添加服务器调试模式配置和塔配置重构

- 在ServerList结构体中添加IsDebug字段用于调试模式标识
- 修改GetServerInfoList函数增加isdebug参数支持
- 移除硬编码的rpcaddr本地地址配置
- 重构塔配置模型,将tower_500和tower_600合并到tower_110
This commit is contained in:
2026-01-08 23:57:22 +08:00
parent 4d0464c76b
commit 971abd29ab
26 changed files with 221 additions and 291 deletions

View File

@@ -11,7 +11,7 @@ type Broadcast struct {
Name string
}
func (h *Server) Broadcast(t string) int {
func (s *Server) Broadcast(t string) int {
cool.Logger.Info(context.TODO(), "全服广播", t)
var count int
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
@@ -24,7 +24,7 @@ func (h *Server) Broadcast(t string) int {
return count
}
func (h *Server) KickPerson(a int) error {
func (s *Server) KickPerson(a int) error {
cool.Logger.Info(context.TODO(), "检测到踢人请求", a)
if a == 0 {
return nil
@@ -34,11 +34,11 @@ func (h *Server) KickPerson(a int) error {
}
// 参数不为0是强制踢出
func (h *Server) QuitSelf(a int) error {
func (s *Server) QuitSelf(a int) error {
//TODO 这里待退出
fmt.Println("检测到退出请求")
h.quit = true
s.quit = true
if a != 0 {
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
value.Kick()