feat(logic): 实现地图刷怪功能并优化数据库查询
- 在玩家结构中添加 StopChan 通道,用于停止刷怪协程 - 优化 MapEnter 和 MapLeave 函数,支持刷怪功能 - 新增 spawnMonsters 函数实现具体刷怪逻辑 - 优化多个模块的数据库查询语句,提高查询效率 - 调整 PlayerService 中的 Reg 函数,优化数据插入操作
This commit is contained in:
22
modules/blazing/controller/admin/monster_refresh.go
Normal file
22
modules/blazing/controller/admin/monster_refresh.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
"blazing/modules/blazing/service"
|
||||
)
|
||||
|
||||
type TaskInfoController struct {
|
||||
*cool.Controller
|
||||
}
|
||||
|
||||
func init() {
|
||||
var task_info_controller = &TaskInfoController{
|
||||
&cool.Controller{
|
||||
Prefix: "/admin/monster/refresh",
|
||||
Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"},
|
||||
Service: service.NewMonsterService(),
|
||||
},
|
||||
}
|
||||
// 注册路由
|
||||
cool.RegisterController(task_info_controller)
|
||||
}
|
||||
Reference in New Issue
Block a user