refactor(maphot): 重构地图热度获取逻辑,将数据处理移至space服务

This commit is contained in:
1
2025-08-16 03:34:04 +00:00
parent 046ad87097
commit b139f37868
3 changed files with 23 additions and 25 deletions

View File

@@ -11,16 +11,10 @@ func (h Controller) MapHot(data *maphot.InInfo, c *entity.Player) (result *mapho
result = &maphot.OutInfo{
HotInfos: make([]maphot.MapHotInfo, 0),
HotInfos: space.GetMapHot(),
}
for k, v := range space.GetMapHot() {
result.HotInfos = append(result.HotInfos, maphot.MapHotInfo{
MapID: uint32(k),
Count: uint32(space.GetPlanet(uint32(v)).Len()),
})
}
return
}