Files
bl/modules/config/service/map_pit.go
昔念 7c1540ff6d
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
refactor(common/data/xmlres): 注释掉未使用的MonsterMap配置变量

- 将MonsterMap配置变量注释掉,因为当前不再使用该配置
- 相应地注释掉了初始化代码中的MonsterMap赋值逻辑

feat(logic/controller): 统一CanFight方法返回值为ErrorCode

- 修改PlayerFightBoss等战斗控制器中的Can
2026-02-25 16:18:10 +08:00

31 lines
636 B
Go

package service
import (
"blazing/cool"
"blazing/modules/config/model"
)
type MapPitService struct {
*cool.Service
}
func NewMapPitService() *MapPitService {
return &MapPitService{
&cool.Service{
Model: model.NewMapPit(),
PageQueryOp: &cool.QueryOp{
KeyWordField: []string{"remake"},
FieldEQ: []string{"map_id"},
},
},
}
}
func (s *MapPitService) GetData(mapid, pos uint32) []model.MapPit {
var pet []model.MapPit //一个特性应该是唯一的,但是我们要获取默认随机特性
dbm_enable(s.Model).Where("map_id", mapid).Wheref(`pos @> ARRAY[?]::integer[]`, pos).Scan(&pet)
return pet
}