feat(space): 添加地图模型配置支持并优化BOSS信息结构 添加MapModel字段到MapBossInfo结构体中,用于存储更完整的BOSS模型数据, 修改初始化逻辑从新的MapModel服务获取数据,并更新HP恢复逻辑使用新模型数据。 同时优化MapNode配置表结构,移除冗余字段并调整数据查询逻辑, 将IsBroadcast字段类型改为uint32以
This commit is contained in:
28
modules/config/service/map_model.go
Normal file
28
modules/config/service/map_model.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
"blazing/modules/config/model"
|
||||
)
|
||||
|
||||
type MapmodelService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewMapmodelService() *MapmodelService {
|
||||
return &MapmodelService{
|
||||
&cool.Service{
|
||||
Model: model.NewMapModel(),
|
||||
PageQueryOp: &cool.QueryOp{
|
||||
KeyWordField: []string{"remake"},
|
||||
FieldEQ: []string{"map_id"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (s *MapmodelService) GetDataByModelId(modelid uint32) (ret *model.MapModel) {
|
||||
|
||||
dbm_notenable(s.Model).Where("model_id", modelid).Scan(&ret)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user