28 lines
587 B
Go
28 lines
587 B
Go
package controller
|
|
|
|
import (
|
|
"blazing/common/data/entity"
|
|
"blazing/common/socket/errorcode"
|
|
"blazing/logic/service/maphot"
|
|
"blazing/logic/service/space"
|
|
)
|
|
|
|
func (h Controller) MapHot(data *maphot.InInfo, c *entity.Player) (result *maphot.OutInfo, err errorcode.ErrorCode) {
|
|
|
|
result = &maphot.OutInfo{
|
|
|
|
HotInfos: make([]maphot.MapHotInfo, 0),
|
|
}
|
|
|
|
ttt := space.GetMapHot()
|
|
for k, v := range ttt {
|
|
result.HotInfos = append(result.HotInfos, maphot.MapHotInfo{
|
|
MapID: uint32(k),
|
|
Count: uint32(space.GetPlanet(uint32(v)).Len()),
|
|
})
|
|
|
|
}
|
|
|
|
return
|
|
}
|