58 lines
1.4 KiB
Go
58 lines
1.4 KiB
Go
package proto
|
||
|
||
const (
|
||
NtfUserOnlineId = "user_online"
|
||
NtfUserOfflineId = "user_offline"
|
||
ReqSetPokersId = "ReqSetPokersId"
|
||
NtfNewServiceId = "update_service"
|
||
NtfUpdateConfigId = "update_config"
|
||
RspLoginSuccessId = "RspLoginSuccessId" // 登陆成功
|
||
|
||
NtfPlayingNumId = "NtfPlayingNumId" // 在玩人数变更
|
||
|
||
ReqPlayingNumId = "ReqPlayingNumId" // 获取游戏在玩人数请求
|
||
RspPlayingNumId = "RspPlayingNumId" // 获取游戏在玩人数回复
|
||
)
|
||
|
||
type ReqSetPokers struct {
|
||
UserId int64 `json:"u"` // 玩家id
|
||
RoomId int `json:"r"` // 房间id
|
||
Pokers [][]int `json:"p"` // 配牌,该玩家的牌在0号位
|
||
GhostPoker int `json:"g"` // 鬼牌
|
||
}
|
||
|
||
type RspSetPokers struct {
|
||
Code ErrorCode `json:"c"` // 0:正确 其它:错误
|
||
}
|
||
|
||
type UserOnline struct {
|
||
Uid string `json:"u"` //
|
||
}
|
||
|
||
type NtfNewService struct {
|
||
Type string `json:"t"` // 服务类型
|
||
RouterKey string `json:"r"`
|
||
RoomMaxId int `json:"max"`
|
||
RoomMinId int `json:"min"`
|
||
PlayType []int `json:"pt"`
|
||
IsClub bool `json:"isClub"` // 是否俱乐部服务
|
||
}
|
||
|
||
type NtfPlayingNum struct {
|
||
RoomType int `json:"r"` // 房间类型,玩法ID
|
||
PlayingNum int64 `json:"p"` // 在玩的人数
|
||
}
|
||
|
||
type NtfUpdateConfig struct {
|
||
}
|
||
|
||
type RspLoginSuccess struct {
|
||
}
|
||
|
||
type ReqPlayingNum struct{}
|
||
|
||
type RspPlayingNum struct {
|
||
Code ErrorCode `json:"c"` // 错误码
|
||
Counts map[int]int `json:"co"` // 在玩人数 key为roomType
|
||
}
|