27 lines
688 B
Go
27 lines
688 B
Go
package maphot
|
|
|
|
import "blazing/common/socket/handler"
|
|
|
|
// MapHotInfo 表示地图热度信息
|
|
type MapHotInfo struct {
|
|
MapID uint64 `json:"mapId"` // 地图ID
|
|
Count uint64 `json:"count"` // 地图里的人数
|
|
}
|
|
type InInfo struct {
|
|
Head handler.TomeeHeader `cmd:"1004" struc:"[0]pad"` //玩家登录
|
|
}
|
|
|
|
func (m *InInfo) Def() []byte {
|
|
|
|
return m.Head.Pack(OutInfo{
|
|
|
|
HotInfos: make([]MapHotInfo, 0),
|
|
}) //返回传参
|
|
}
|
|
|
|
// OutInfo 表示地图热度的出站消息
|
|
type OutInfo struct {
|
|
HotInfosLen uint32 `json:"hotInfosLen" struc:"sizeof=HotInfos"` // 热度信息列表长度
|
|
HotInfos []MapHotInfo `json:"hotInfos"` // 热度信息列表
|
|
}
|