refactor: 优化地图节点数据获取逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
将获取地图Boss信息的过滤逻辑从循环中移至GetDataB方法
This commit is contained in:
@@ -27,6 +27,14 @@ func (s *MapNodeService) GetData(mapid uint32) []model.MapNode {
|
||||
|
||||
return pet
|
||||
|
||||
}
|
||||
func (s *MapNodeService) GetDataB(mapid uint32) []model.MapNode {
|
||||
|
||||
var pet []model.MapNode //一个特性应该是唯一的,但是我们要获取默认随机特性
|
||||
dbm_enable(s.Model).Where("map_id", mapid).Where("is_broadcast", 1).Scan(&pet)
|
||||
|
||||
return pet
|
||||
|
||||
}
|
||||
func (s *MapNodeService) GetDataNode(mapid, node uint32) *model.MapNode {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user