refactor(logic): 重构服务器启动逻辑与任务状态管理

- 移除了 `gcmd` 包在 controller 中的直接使用,改为通过参数传递端口和服务器类型
- 统一使用 `GetTask` 和 `SetTask` 方法替代直接访问 `TaskList` 数组,提升代码可维护性
- 修改了战斗逻辑中部分调试打印语句,并优化战斗循环结束日志输出
- 调整了新手玩家初始化流程,默认完成新手任务4
- 更新了数据库模型字段及结构定义,如增加 `max_ts` 字段、扩展 `TaskList` 长度等
- 改进了宠物添加逻辑,采用 SQL 方式确保捕捉时间唯一递增
- 清理了无用或注释掉的旧代码块
This commit is contained in:
2025-12-08 17:03:43 +08:00
parent 7005c1047f
commit 8983222dcb
21 changed files with 341 additions and 177 deletions

View File

@@ -0,0 +1,22 @@
package admin
import (
"blazing/cool"
"blazing/modules/blazing/service"
)
type TalkConfigController struct {
*cool.Controller
}
func init() {
var task_info_controller = &TalkConfigController{
&cool.Controller{
Prefix: "/admin/sun/talkconfig",
Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"},
Service: service.NewTalkConfigService(),
},
}
// 注册路由
cool.RegisterController(task_info_controller)
}