samba/proto/club.go
2025-06-04 09:51:39 +08:00

243 lines
7.8 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package proto
const (
ReqMatchClubRoomId = "ReqMatchClubRoomId" // 匹配游戏
RspMatchClubRoomId = "RspMatchClubRoomId"
ReqCancelMatchClubRoomId = "ReqCancelMatchClubRoomId" // 取消匹配
RspCancelMatchClubRoomId = "RspCancelMatchClubRoomId"
ReqUserInClubGameId = "ReqUserInClubGameId" // 游戏服向俱乐部服发送玩家在玩信息
ReqClubPlayingRoomsId = "ReqClubPlayingRoomsId"
RspClubPlayingRoomsId = "RspClubPlayingRoomsId"
ReqClubMainPageId = "ReqClubMainPageId" // 俱乐部主页详情
RspClubMainPageId = "RspClubMainPageId" //
ReqCreatePlayGameId = "ReqCreatePlayGameId" // 俱乐部管理员创建玩法
RspCreatePlayGameId = "RspCreatePlayGameId" //
ReqGetPlayGamesId = "ReqGetPlayGamesId" // 获取所有玩法
RspGetPlayGamesId = "RspGetPlayGamesId" //
ReqUpdatePlayGameId = "ReqUpdatePlayGameId" // 更新玩法
RspUpdatePlayGameId = "RspUpdatePlayGameId" //
ReqSetPlayGameValidId = "ReqSetPlayGameValidId" // 删除玩法
RspSetPlayGameValidId = "RspSetPlayGameValidId" //
ReqDeletePlayGameId = "ReqDeletePlayGameId" // 删除玩法
RspDeletePlayGameId = "RspDeletePlayGameId" //
ReqSetPlayGameTopId = "ReqSetPlayGameTopId"
RspSetPlayGameTopId = "RspSetPlayGameTopId"
ReqQuickEnterClubRoomId = "ReqQuickEnterClubRoomId" // 快速匹配
RspQuickEnterClubRoomId = "RspQuickEnterClubRoomId" //
ReqEnterClubRoomId = "ReqEnterClubRoomId" // 进入指定房间
RspEnterClubRoomId = "RspEnterClubRoomId" //
)
// 匹配
type ReqMatchClubRoom struct {
ClubId int `json:"cl"` // 俱乐部id
RoomType int `json:"r"` // 房间类型 room_config_id
Latitude float32 `json:"la"` // 经度
Longitude float32 `json:"lo"` // 纬度
Device string `json:"de"` // 设备信息
}
type RspMatchClubRoom struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
RoomType int `json:"rt"` // 房间类型
//Player *Player `json:"p"` // 玩家信息
}
// 取消匹配
type ReqCancelMatchClubRoom struct {
ClubId int `json:"cl"` // 俱乐部id
RoomType int `json:"r"` // 房间类型
}
type RspCancelMatchClubRoom struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
RoomType int `json:"rt"` // 房间类型
}
type ReqUserInClubGame struct {
UserId int64 `json:"u"` // 玩家id
ClubId int `json:"cl"` // 俱乐部id
RoomId int `json:"rt"` // 房间类型
Playing int `json:"p"` // 0:离开该房间1:进入该房间游玩
}
// 俱乐部主页
type ReqClubMainPage struct {
ClubId int `json:"c"` // 俱乐部id
}
// 实时显示房间人数等相关信息,俱乐部主页需要
type ClubPlayingRoom struct {
RoomId int `json:"r"` // 房间id
RoomType int `json:"ro"` // 房间配置id
PlayType int `json:"p"` // 玩法id
Blind int64 `json:"b"` // 底注
CurrPlayerNum int `json:"c"` // 当前玩家数量
MaxPlayerNum int `json:"m"` // 最大玩家数量
Status int `json:"s"` // 房间状态
MaxGameNum int `json:"n"` // 总局数
Top int `json:"t"` // 置顶 0:没有置顶 1:置顶
}
type ClubMainPageInfo struct {
ClubId int `json:"c"` // 俱乐部id
PrettyNo int `json:"p"` // 俱乐部靓号
Name string `json:"n"` // 昵称
HeadUrl string `json:"h"` // 头像
IconId int `json:"i"` // 头像
Level int `json:"l"` // 等级
Coin int64 `json:"co"` // 俱乐部币
Score int64 `json:"s"` // 俱乐部积分
JobTitle int `json:"a"` // 在俱乐部中的职位
Creator string `json:"mn"` // 俱乐部部长名称
UserScore int64 `json:"u"` // 俱乐部所有玩家总积分
}
// 俱乐部主页
type RspClubMainPage struct {
Code ErrorCode `json:"c"`
Rooms []*ClubPlayingRoom `json:"r"` // 房间信息
MainPageInfo ClubMainPageInfo `json:"m"` // 主页信息
Permissions []int `json:"p"` // 管理员权限
}
// 拉取俱乐部在线房间
type ReqClubPlayingRooms struct {
ClubId int `json:"cl"` // 俱乐部id
}
type RspClubPlayingRooms struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
Rooms []*ClubPlayingRoom `json:"r"` // 房间信息
}
// 设置房间置顶
type ReqSetRoomTop struct {
ClubId int `json:"cl"` // 俱乐部id
}
type RspSetRoomTop struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
Rooms []*ClubPlayingRoom `json:"r"` // 房间信息
}
// 俱乐部玩法信息
type ClubPlayGameInfo struct {
Id int `json:"i"` // 玩法id
Name string `json:"n"` // 名称
PlayType int `json:"p"` // 玩法
Blind int64 `json:"b"` // 底注
PlayerNum int `json:"pl"` // 最大玩家数量
GameNum int `json:"g"` // 游戏局数
Fee int `json:"f"` // 服务费
Valid int `json:"v"` // 是否生效 0失效 1:生效
Top int `json:"t"` // 置顶 0:没有置顶 1:置顶
}
// 管理员创建玩法
type ReqCreatePlayGame struct {
ClubId int `json:"c"` // 俱乐部id
GameInfo ClubPlayGameInfo `json:"g"` // 玩法
}
type RspCreatePlayGame struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
GameInfo ClubPlayGameInfo `json:"g"` // 玩法
}
// 管理员获取所有玩法
type ReqGetPlayGames struct {
ClubId int `json:"c"` // 俱乐部id
}
type RspGetPlayGames struct {
Code ErrorCode `json:"c"`
GameInfo []ClubPlayGameInfo `json:"g"` // 该俱乐部所有玩法
}
// 管理员修改玩法
type ReqUpdatePlayGame struct {
ClubId int `json:"c"` // 俱乐部id
GameInfo ClubPlayGameInfo `json:"g"` // 玩法
}
type RspUpdatePlayGame struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
SrcGameId int `json:"s"` // 原玩法id
GameInfo ClubPlayGameInfo `json:"g"` // 玩法
}
// 管理员删除玩法
type ReqDeletePlayGame struct {
ClubId int `json:"c"` // 俱乐部id
PlayGameId int `json:"p"` // 玩法
}
type RspDeletePlayGame struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
PlayGameId int `json:"p"` // 玩法
}
// 管理员设置玩法状态
type ReqSetPlayGameValid struct {
ClubId int `json:"c"` // 俱乐部id
PlayGameId int `json:"p"` // 玩法
Valid int `json:"v"` // 0:失效 1:生效
}
type RspSetPlayGameValid struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
PlayGameId int `json:"p"` // 玩法
Valid int `json:"v"` // 0:失效 1:生效
}
// 管理员设置玩法置顶
type ReqSetPlayGameTop struct {
ClubId int `json:"c"` // 俱乐部id
PlayGameId int `json:"p"` // 玩法
Top int `json:"t"` // 0:不置顶 1:置顶
}
type RspSetPlayGameTop struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
PlayGameId int `json:"p"` // 玩法
Top int `json:"t"` // 0:不置顶 1:置顶
}
// 快速开始匹配
type ReqQuickEnterClubRoom struct {
ClubId int `json:"cl"` // 俱乐部id
PlayType int `json:"p"` // 玩法类型
}
type RspQuickEnterClubRoom struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
PlayType int `json:"p"` // 玩法类型
}
type ReqEnterClubRoom struct {
ClubId int `json:"cl"` // 俱乐部id
RoomType int `json:"r"` // 房间配置id
RoomID int `json:"ro"` // 游戏服创建的唯一房间id
}
type RspEnterClubRoom struct {
Code ErrorCode `json:"c"`
ClubId int `json:"cl"` // 俱乐部id
PlayType int `json:"p"` // 玩法类型
RoomType int `json:"r"` // 房间配置id
RoomID int `json:"ro"` // 游戏服创建的唯一房间id
}