refactor(maphot): 重构地图热度获取逻辑,将数据处理移至space服务
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user