feat: 重构地图热度信息并添加地图提示功能
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、宠物和掉落等提示信息的收集功能 优化地图进入和离开时的计数逻辑
This commit is contained in:
@@ -3,6 +3,8 @@ package service
|
||||
import (
|
||||
"blazing/cool"
|
||||
"blazing/modules/config/model"
|
||||
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
|
||||
type TalkConfigService struct {
|
||||
@@ -25,3 +27,16 @@ func (s *TalkConfigService) GetCache(flag int) model.MineralCollectionConfig {
|
||||
return config
|
||||
|
||||
}
|
||||
|
||||
func (s *TalkConfigService) GetTip(mapid uint32) []uint32 {
|
||||
var item []model.TaskConfig
|
||||
dbm_enable(s.Model).Where("map_id", mapid).Scan(&item)
|
||||
var res []uint32
|
||||
for _, v := range item {
|
||||
res = append(res, v.ItemRewardIds...)
|
||||
|
||||
}
|
||||
|
||||
return lo.Union(res)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user