创房 加入 解散 开始 流程
This commit is contained in:
parent
5235272d94
commit
906ca81ff1
83
modules/entertainment/api_create.go
Normal file
83
modules/entertainment/api_create.go
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
package entertainment
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) CreateRoomCheck(session comm.IUserSession, req *pb.EntertainCreateRoomReq) (errdata *pb.ErrorData) {
|
||||||
|
if req.Idcard == "" {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房主创建房间
|
||||||
|
func (this *apiComp) CreateRoom(session comm.IUserSession, req *pb.EntertainCreateRoomReq) (errdata *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
conf *cfg.GameConsumeHeroData
|
||||||
|
user *pb.DBUser
|
||||||
|
room *Room
|
||||||
|
)
|
||||||
|
if errdata = this.CreateRoomCheck(session, req); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if conf, err = this.module.configure.GetGameConsumeHero(req.Idcard); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if conf.Type != 1 { // 校验数量够不够
|
||||||
|
if list, err := this.module.model.getEntertainmList(session.GetUserId()); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
if list.Card[req.Idcard] <= 0 { // 需要购买
|
||||||
|
if errdata = this.module.ConsumeRes(session, conf.Consume, true); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.Card[req.Idcard] += 1
|
||||||
|
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
|
||||||
|
"card": list.Card,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
user, err = this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
p1 := &pb.PlayerData{
|
||||||
|
Userinfo: comm.GetUserBaseInfo(user),
|
||||||
|
Cardid: req.Idcard,
|
||||||
|
}
|
||||||
|
if room, err = this.module.gameMgr.CreateMasterRoom(p1); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_EntertainCreateFailed,
|
||||||
|
Title: pb.ErrorCode_EntertainCreateFailed.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), "createroom", &pb.EntertainCreateRoomResp{
|
||||||
|
Roomid: room.Id,
|
||||||
|
Servepath: fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()),
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
42
modules/entertainment/api_dissolve.go
Normal file
42
modules/entertainment/api_dissolve.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package entertainment
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) DissolveRoomCheck(session comm.IUserSession, req *pb.EntertainDissolveRoomReq) (errdata *pb.ErrorData) {
|
||||||
|
if req.Roomid == "" {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房主解散房间
|
||||||
|
func (this *apiComp) DissolveRoom(session comm.IUserSession, req *pb.EntertainDissolveRoomReq) (errdata *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
if errdata = this.DissolveRoomCheck(session, req); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if errdata = this.module.gameMgr.RoomDistribute(req.Roomid, session, "dissolve", req); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = this.module.gameMgr.CloseRoom(req.Roomid); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 操作消息返回
|
||||||
|
session.SendMsg(string(this.module.GetType()), "dissolveroom", &pb.EntertainDissolveRoomResp{})
|
||||||
|
return
|
||||||
|
}
|
81
modules/entertainment/api_joinroom.go
Normal file
81
modules/entertainment/api_joinroom.go
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
package entertainment
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) JoinRoomCheck(session comm.IUserSession, req *pb.EntertainJoinRoomReq) (errdata *pb.ErrorData) {
|
||||||
|
if req.Roomid == "" || req.Idcard == "" {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房主创建房间
|
||||||
|
func (this *apiComp) JoinRoom(session comm.IUserSession, req *pb.EntertainJoinRoomReq) (errdata *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
conf *cfg.GameConsumeHeroData
|
||||||
|
user *pb.DBUser
|
||||||
|
)
|
||||||
|
if errdata = this.JoinRoomCheck(session, req); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if conf, err = this.module.configure.GetGameConsumeHero(req.Idcard); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if conf.Type != 1 { // 校验数量够不够
|
||||||
|
if list, err := this.module.model.getEntertainmList(session.GetUserId()); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
if list.Card[req.Idcard] <= 0 { // 需要购买
|
||||||
|
if errdata = this.module.ConsumeRes(session, conf.Consume, true); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.Card[req.Idcard] += 1
|
||||||
|
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{
|
||||||
|
"card": list.Card,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
user, err = this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
p := &pb.PlayerData{
|
||||||
|
Userinfo: comm.GetUserBaseInfo(user),
|
||||||
|
Cardid: req.Idcard,
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, err = this.module.gameMgr.JoinMasterRoom(req.Roomid, p); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_EntertainCreateFailed,
|
||||||
|
Title: pb.ErrorCode_EntertainCreateFailed.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
session.SendMsg(string(this.module.GetType()), "joinroom", &pb.EntertainJoinRoomResp{
|
||||||
|
BJoin: true,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
52
modules/entertainment/api_masterstart.go
Normal file
52
modules/entertainment/api_masterstart.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package entertainment
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) MasterStartCheck(session comm.IUserSession, req *pb.EntertainMasterStartReq) (errdata *pb.ErrorData) {
|
||||||
|
if req.Roomid == "" {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房主开始游戏
|
||||||
|
func (this *apiComp) MasterStart(session comm.IUserSession, req *pb.EntertainMasterStartReq) (errdata *pb.ErrorData) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
room *Room
|
||||||
|
)
|
||||||
|
if errdata = this.MasterStartCheck(session, req); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if room, err = this.module.gameMgr.GetRoomInfo(req.Roomid); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
if room.rd2 { // 玩家2 准备了 那么你也可以开始准备了
|
||||||
|
if errdata = this.module.gameMgr.RoomDistribute(req.Roomid, session, "ready", req); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else { // 玩家2 还没准备不能开始
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_EntertainPlayerNoReady,
|
||||||
|
Title: pb.ErrorCode_EntertainPlayerNoReady.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 操作消息返回
|
||||||
|
session.SendMsg(string(this.module.GetType()), "masterstart", &pb.EntertainMasterStartResp{})
|
||||||
|
return
|
||||||
|
}
|
@ -58,17 +58,8 @@ func (this *apiComp) Match(session comm.IUserSession, req *pb.EntertainMatchReq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.module.match.MatchReq(&pb.DBXXLMatch{
|
this.module.match.MatchReq(&pb.DBXXLMatch{
|
||||||
Userinfo: &pb.BaseUserInfo{
|
Userinfo: comm.GetUserBaseInfo(user),
|
||||||
Uid: user.Uid,
|
Cardid: req.Idcard,
|
||||||
Sid: user.Sid,
|
|
||||||
Name: user.Name,
|
|
||||||
Gender: user.Gender,
|
|
||||||
Skin: user.CurSkin,
|
|
||||||
Aframe: "",
|
|
||||||
Title: user.Curtitle,
|
|
||||||
Lv: user.Lv,
|
|
||||||
},
|
|
||||||
Cardid: req.Idcard,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "match", &pb.EntertainMatchResp{
|
session.SendMsg(string(this.module.GetType()), "match", &pb.EntertainMatchResp{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package entertainment
|
package entertainment
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
@ -28,20 +29,51 @@ func (this *gameMgrComp) Init(service core.IService, module core.IModule, comp c
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *gameMgrComp) CreateRoom(p1 *pb.PlayerData, p2 *pb.PlayerData) (room *Room) {
|
// 通过房间ID 加入房间
|
||||||
|
func (this *gameMgrComp) JoinMasterRoom(roomid string, p *pb.PlayerData) (room *Room, err error) {
|
||||||
|
|
||||||
|
this.lock.Lock()
|
||||||
|
if _, ok := this.rooms[roomid]; ok {
|
||||||
|
err = errors.New("房间不存在")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
room, err = this.rooms[roomid].JoinRoom(this.module, p)
|
||||||
|
this.lock.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 手动创建房间
|
||||||
|
func (this *gameMgrComp) CreateMasterRoom(p *pb.PlayerData) (room *Room, err error) {
|
||||||
|
room = new(Room) //初始化房间
|
||||||
|
room, err = room.JoinRoom(this.module, p)
|
||||||
|
|
||||||
|
this.lock.Lock()
|
||||||
|
this.rooms[room.Id] = room
|
||||||
|
this.lock.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 匹配加入房间
|
||||||
|
func (this *gameMgrComp) MatchJoinRoom(p1 *pb.PlayerData, p2 *pb.PlayerData) (room *Room) {
|
||||||
room = new(Room) //初始化房间
|
room = new(Room) //初始化房间
|
||||||
room = room.InitRoom(this.module, p1, p2)
|
room = room.InitRoom(this.module, p1, p2)
|
||||||
|
|
||||||
this.lock.Lock()
|
this.lock.Lock()
|
||||||
this.rooms[room.Id] = room
|
this.rooms[room.Id] = room
|
||||||
this.lock.Unlock()
|
this.lock.Unlock()
|
||||||
return room
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *gameMgrComp) CloseRoom(id string) {
|
func (this *gameMgrComp) CloseRoom(id string) (err error) {
|
||||||
this.lock.Lock()
|
this.lock.Lock()
|
||||||
delete(this.rooms, id)
|
defer this.lock.Unlock()
|
||||||
this.lock.Unlock()
|
if _, ok := this.rooms[id]; ok {
|
||||||
|
delete(this.rooms, id)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = errors.New(fmt.Sprintf("cant found rooid:%s", id))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *gameMgrComp) RoomDistribute(rid string, session comm.IUserSession, stype string, req proto.Message) (errdata *pb.ErrorData) {
|
func (this *gameMgrComp) RoomDistribute(rid string, session comm.IUserSession, stype string, req proto.Message) (errdata *pb.ErrorData) {
|
||||||
@ -63,3 +95,18 @@ func (this *gameMgrComp) RoomDistribute(rid string, session comm.IUserSession, s
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取房间信息
|
||||||
|
func (this *gameMgrComp) GetRoomInfo(id string) (room *Room, err error) {
|
||||||
|
var (
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
this.lock.Lock()
|
||||||
|
defer this.lock.Unlock()
|
||||||
|
if room, ok = this.rooms[id]; ok {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
err = errors.New(fmt.Sprintf("cant found rooid:%s", id))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -103,7 +103,7 @@ func (this *matchComp) MatchNotic(players map[string]interface{}) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
this.module.gameMgr.CreateRoom(p1, p2)
|
this.module.gameMgr.MatchJoinRoom(p1, p2)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -43,7 +43,6 @@ func (this *modelComp) getEntertainmList(uid string) (result *pb.DBXXLData, err
|
|||||||
if tag, _, b := utils.UIdSplit(uid); b {
|
if tag, _, b := utils.UIdSplit(uid); b {
|
||||||
if conn, err := db.ServerDBConn(tag); err == nil {
|
if conn, err := db.ServerDBConn(tag); err == nil {
|
||||||
dbModel = db.NewDBModel(comm.TableEntertainm, conn)
|
dbModel = db.NewDBModel(comm.TableEntertainm, conn)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package entertainment
|
package entertainment
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/sys/timewheel"
|
"go_dreamfactory/lego/sys/timewheel"
|
||||||
@ -33,8 +34,10 @@ type Room struct {
|
|||||||
curPower string // 当前操作的玩家
|
curPower string // 当前操作的玩家
|
||||||
NexPower string // 下一个操作的玩家
|
NexPower string // 下一个操作的玩家
|
||||||
MaxRound int32
|
MaxRound int32
|
||||||
rd1 bool
|
rd1 bool // 玩家1 是否准备
|
||||||
rd2 bool
|
rd2 bool // 玩家2 是否准备
|
||||||
|
Status int32 //房间游戏状态 0未开始 1 已开始 2 已结束
|
||||||
|
bCreate bool // 是否是创建的房间
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
||||||
@ -119,6 +122,7 @@ func (this *Room) InitRoom(module *Entertainment, p1 *pb.PlayerData, p2 *pb.Play
|
|||||||
module: module,
|
module: module,
|
||||||
round: 1,
|
round: 1,
|
||||||
MaxRound: this.MaxRound,
|
MaxRound: this.MaxRound,
|
||||||
|
Status: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "enterroom", &pb.EntertainEnterRoomPush{
|
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "enterroom", &pb.EntertainEnterRoomPush{
|
||||||
@ -434,6 +438,9 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
weight = append(weight, v.Weight)
|
weight = append(weight, v.Weight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.Status = 1
|
||||||
|
this.round = 1
|
||||||
|
this.MaxRound = this.module.ModuleTools.GetGlobalConf().ConsumeRounds
|
||||||
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
User2: this.player2,
|
User2: this.player2,
|
||||||
@ -447,7 +454,6 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
}
|
}
|
||||||
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
|
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
|
||||||
}
|
}
|
||||||
|
|
||||||
case "reconnect": // 重连
|
case "reconnect": // 重连
|
||||||
session.SendMsg(string(this.module.GetType()), "reconnect", &pb.EntertainReconnectResp{
|
session.SendMsg(string(this.module.GetType()), "reconnect", &pb.EntertainReconnectResp{
|
||||||
Roomid: this.Id,
|
Roomid: this.Id,
|
||||||
@ -463,6 +469,12 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
User2: this.player2,
|
User2: this.player2,
|
||||||
})
|
})
|
||||||
|
case "dissolve": // 房主解散房间
|
||||||
|
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "dissolvemasterroom", &pb.EntertainDissolveMasterRoomPush{
|
||||||
|
Roomid: this.Id,
|
||||||
|
}, this.szSession...); err != nil {
|
||||||
|
this.Errorln(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
@ -523,7 +535,8 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 修改房间状态
|
||||||
|
this.Status = 2
|
||||||
this.module.SendMsgSyncToSession(string(this.module.GetType()), "gameover", &pb.EntertainGameOverPush{
|
this.module.SendMsgSyncToSession(string(this.module.GetType()), "gameover", &pb.EntertainGameOverPush{
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
User2: this.player2,
|
User2: this.player2,
|
||||||
@ -537,3 +550,44 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
|
|||||||
}, this.szSession...)
|
}, this.szSession...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加入房间
|
||||||
|
func (this *Room) JoinRoom(module *Entertainment, p *pb.PlayerData) (room *Room, err error) {
|
||||||
|
|
||||||
|
// 该房间是个空的
|
||||||
|
if this.player1 == nil {
|
||||||
|
this.player1 = p
|
||||||
|
this.module = module
|
||||||
|
this.chessboard = new(MapData)
|
||||||
|
this.chessboard.InitMap(module) // 初始化棋盘
|
||||||
|
if s1, ok := this.module.GetUserSession(p.Userinfo.Uid); !ok {
|
||||||
|
this.module.PutUserSession(s1)
|
||||||
|
} else {
|
||||||
|
this.szSession = append(this.szSession, s1.Clone())
|
||||||
|
}
|
||||||
|
this.Id = p.Userinfo.Uid // 房主ID 作为房间id
|
||||||
|
} else if this.player2 == nil {
|
||||||
|
//异常处理
|
||||||
|
if this.player1.Userinfo.Uid == p.Userinfo.Uid {
|
||||||
|
err = errors.New("重复加入")
|
||||||
|
}
|
||||||
|
this.player2 = p // 玩家2 赋值
|
||||||
|
if s1, ok := this.module.GetUserSession(p.Userinfo.Uid); !ok {
|
||||||
|
this.module.PutUserSession(s1)
|
||||||
|
} else {
|
||||||
|
this.szSession = append(this.szSession, s1.Clone())
|
||||||
|
}
|
||||||
|
// 推送消息
|
||||||
|
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "joincreateroom", &pb.EntertainJoinCreateRoomPush{
|
||||||
|
Roomid: this.Id,
|
||||||
|
User1: room.player1,
|
||||||
|
User2: room.player2,
|
||||||
|
}, this.szSession...); err != nil {
|
||||||
|
this.Errorln(err)
|
||||||
|
}
|
||||||
|
} else { // 房间满了 加不进来
|
||||||
|
err = errors.New("房间已满")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -97,7 +97,7 @@ func (this *MapData) Debugf() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查5消
|
// 检查5消 (s 是生成新的一个新的元素 key 下标 value 消除后效果类型)
|
||||||
func (this *MapData) Check5X() (bEliminate bool, xiaochu []int, s map[int]int) {
|
func (this *MapData) Check5X() (bEliminate bool, xiaochu []int, s map[int]int) {
|
||||||
//var xiaochu []int // 即将消除的key
|
//var xiaochu []int // 即将消除的key
|
||||||
s = make(map[int]int)
|
s = make(map[int]int)
|
||||||
|
@ -1331,6 +1331,498 @@ func (x *EntertainChangePush) GetCard() map[string]int32 {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 创建一个房间
|
||||||
|
type EntertainCreateRoomReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Idcard string `protobuf:"bytes,1,opt,name=idcard,proto3" json:"idcard"` //出战的英雄卡
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomReq) Reset() {
|
||||||
|
*x = EntertainCreateRoomReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[22]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainCreateRoomReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[22]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainCreateRoomReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainCreateRoomReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{22}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomReq) GetIdcard() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Idcard
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建成功
|
||||||
|
type EntertainCreateRoomResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` // 房间id
|
||||||
|
Servepath string `protobuf:"bytes,2,opt,name=servepath,proto3" json:"servepath"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomResp) Reset() {
|
||||||
|
*x = EntertainCreateRoomResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[23]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainCreateRoomResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[23]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainCreateRoomResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainCreateRoomResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{23}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomResp) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainCreateRoomResp) GetServepath() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Servepath
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过房间号加入房间
|
||||||
|
type EntertainJoinRoomReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间号
|
||||||
|
Idcard string `protobuf:"bytes,2,opt,name=idcard,proto3" json:"idcard"` //出战的英雄卡
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomReq) Reset() {
|
||||||
|
*x = EntertainJoinRoomReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[24]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainJoinRoomReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[24]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainJoinRoomReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainJoinRoomReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{24}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomReq) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomReq) GetIdcard() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Idcard
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过房间号加入房间结果
|
||||||
|
type EntertainJoinRoomResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
BJoin bool `protobuf:"varint,1,opt,name=bJoin,proto3" json:"bJoin"` //
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomResp) Reset() {
|
||||||
|
*x = EntertainJoinRoomResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[25]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainJoinRoomResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[25]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainJoinRoomResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainJoinRoomResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{25}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinRoomResp) GetBJoin() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.BJoin
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加入创建的房间推送
|
||||||
|
type EntertainJoinCreateRoomPush struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间号
|
||||||
|
User1 *PlayerData `protobuf:"bytes,2,opt,name=user1,proto3" json:"user1"`
|
||||||
|
User2 *PlayerData `protobuf:"bytes,3,opt,name=user2,proto3" json:"user2"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinCreateRoomPush) Reset() {
|
||||||
|
*x = EntertainJoinCreateRoomPush{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[26]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinCreateRoomPush) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainJoinCreateRoomPush) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainJoinCreateRoomPush) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[26]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainJoinCreateRoomPush.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainJoinCreateRoomPush) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{26}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinCreateRoomPush) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinCreateRoomPush) GetUser1() *PlayerData {
|
||||||
|
if x != nil {
|
||||||
|
return x.User1
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainJoinCreateRoomPush) GetUser2() *PlayerData {
|
||||||
|
if x != nil {
|
||||||
|
return x.User2
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房主开始游戏
|
||||||
|
type EntertainMasterStartReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间号
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartReq) Reset() {
|
||||||
|
*x = EntertainMasterStartReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[27]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainMasterStartReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[27]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainMasterStartReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainMasterStartReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{27}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartReq) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type EntertainMasterStartResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartResp) Reset() {
|
||||||
|
*x = EntertainMasterStartResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[28]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainMasterStartResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainMasterStartResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[28]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainMasterStartResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainMasterStartResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{28}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房主解散房间
|
||||||
|
type EntertainDissolveRoomReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间号
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomReq) Reset() {
|
||||||
|
*x = EntertainDissolveRoomReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[29]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainDissolveRoomReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[29]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainDissolveRoomReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainDissolveRoomReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{29}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomReq) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type EntertainDissolveRoomResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomResp) Reset() {
|
||||||
|
*x = EntertainDissolveRoomResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[30]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainDissolveRoomResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveRoomResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[30]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainDissolveRoomResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainDissolveRoomResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{30}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解散消息通知
|
||||||
|
type EntertainDissolveMasterRoomPush struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Roomid string `protobuf:"bytes,1,opt,name=roomid,proto3" json:"roomid"` //房间号
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveMasterRoomPush) Reset() {
|
||||||
|
*x = EntertainDissolveMasterRoomPush{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[31]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveMasterRoomPush) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EntertainDissolveMasterRoomPush) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveMasterRoomPush) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_entertain_entertain_msg_proto_msgTypes[31]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EntertainDissolveMasterRoomPush.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EntertainDissolveMasterRoomPush) Descriptor() ([]byte, []int) {
|
||||||
|
return file_entertain_entertain_msg_proto_rawDescGZIP(), []int{31}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EntertainDissolveMasterRoomPush) GetRoomid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Roomid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_entertain_entertain_msg_proto protoreflect.FileDescriptor
|
var File_entertain_entertain_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_entertain_entertain_msg_proto_rawDesc = []byte{
|
var file_entertain_entertain_msg_proto_rawDesc = []byte{
|
||||||
@ -1473,7 +1965,45 @@ var file_entertain_entertain_msg_proto_rawDesc = []byte{
|
|||||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x22, 0x30, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65,
|
||||||
|
0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x64,
|
||||||
|
0x63, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x64, 0x63, 0x61,
|
||||||
|
0x72, 0x64, 0x22, 0x4f, 0x0a, 0x17, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x43,
|
||||||
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a,
|
||||||
|
0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72,
|
||||||
|
0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x70, 0x61,
|
||||||
|
0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x70,
|
||||||
|
0x61, 0x74, 0x68, 0x22, 0x46, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e,
|
||||||
|
0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72,
|
||||||
|
0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f,
|
||||||
|
0x6d, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x45,
|
||||||
|
0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, 0x6d,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x4a, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x4a, 0x6f, 0x69, 0x6e, 0x22, 0x7b, 0x0a, 0x1b, 0x45, 0x6e,
|
||||||
|
0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f,
|
||||||
|
0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69,
|
||||||
|
0x64, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x75,
|
||||||
|
0x73, 0x65, 0x72, 0x31, 0x12, 0x21, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x18, 0x03, 0x20,
|
||||||
|
0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61,
|
||||||
|
0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x32, 0x22, 0x31, 0x0a, 0x17, 0x45, 0x6e, 0x74, 0x65, 0x72,
|
||||||
|
0x74, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52,
|
||||||
|
0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x45, 0x6e,
|
||||||
|
0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61,
|
||||||
|
0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x32, 0x0a, 0x18, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74,
|
||||||
|
0x61, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52,
|
||||||
|
0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x45, 0x6e,
|
||||||
|
0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52,
|
||||||
|
0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x22, 0x39, 0x0a, 0x1f, 0x45, 0x6e, 0x74, 0x65, 0x72,
|
||||||
|
0x74, 0x61, 0x69, 0x6e, 0x44, 0x69, 0x73, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x4d, 0x61, 0x73, 0x74,
|
||||||
|
0x65, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f,
|
||||||
|
0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d,
|
||||||
|
0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1488,63 +2018,75 @@ func file_entertain_entertain_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_entertain_entertain_msg_proto_rawDescData
|
return file_entertain_entertain_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
var file_entertain_entertain_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
|
||||||
var file_entertain_entertain_msg_proto_goTypes = []interface{}{
|
var file_entertain_entertain_msg_proto_goTypes = []interface{}{
|
||||||
(*EntertainMatchReq)(nil), // 0: EntertainMatchReq
|
(*EntertainMatchReq)(nil), // 0: EntertainMatchReq
|
||||||
(*EntertainMatchResp)(nil), // 1: EntertainMatchResp
|
(*EntertainMatchResp)(nil), // 1: EntertainMatchResp
|
||||||
(*EntertainCancelMatchReq)(nil), // 2: EntertainCancelMatchReq
|
(*EntertainCancelMatchReq)(nil), // 2: EntertainCancelMatchReq
|
||||||
(*EntertainCancelMatchResp)(nil), // 3: EntertainCancelMatchResp
|
(*EntertainCancelMatchResp)(nil), // 3: EntertainCancelMatchResp
|
||||||
(*EntertainReadyReq)(nil), // 4: EntertainReadyReq
|
(*EntertainReadyReq)(nil), // 4: EntertainReadyReq
|
||||||
(*EntertainReadyResp)(nil), // 5: EntertainReadyResp
|
(*EntertainReadyResp)(nil), // 5: EntertainReadyResp
|
||||||
(*EntertainStartGamePush)(nil), // 6: EntertainStartGamePush
|
(*EntertainStartGamePush)(nil), // 6: EntertainStartGamePush
|
||||||
(*EntertainOperatorReq)(nil), // 7: EntertainOperatorReq
|
(*EntertainOperatorReq)(nil), // 7: EntertainOperatorReq
|
||||||
(*EntertainOperatorResp)(nil), // 8: EntertainOperatorResp
|
(*EntertainOperatorResp)(nil), // 8: EntertainOperatorResp
|
||||||
(*EntertainOperatorRstPush)(nil), // 9: EntertainOperatorRstPush
|
(*EntertainOperatorRstPush)(nil), // 9: EntertainOperatorRstPush
|
||||||
(*EntertainGameOverPush)(nil), // 10: EntertainGameOverPush
|
(*EntertainGameOverPush)(nil), // 10: EntertainGameOverPush
|
||||||
(*EntertainEnterRoomPush)(nil), // 11: EntertainEnterRoomPush
|
(*EntertainEnterRoomPush)(nil), // 11: EntertainEnterRoomPush
|
||||||
(*EntertainReconnectReq)(nil), // 12: EntertainReconnectReq
|
(*EntertainReconnectReq)(nil), // 12: EntertainReconnectReq
|
||||||
(*EntertainReconnectResp)(nil), // 13: EntertainReconnectResp
|
(*EntertainReconnectResp)(nil), // 13: EntertainReconnectResp
|
||||||
(*EntertainRefreshPlatReq)(nil), // 14: EntertainRefreshPlatReq
|
(*EntertainRefreshPlatReq)(nil), // 14: EntertainRefreshPlatReq
|
||||||
(*EntertainRefreshPlatResp)(nil), // 15: EntertainRefreshPlatResp
|
(*EntertainRefreshPlatResp)(nil), // 15: EntertainRefreshPlatResp
|
||||||
(*EntertainRefreshPush)(nil), // 16: EntertainRefreshPush
|
(*EntertainRefreshPush)(nil), // 16: EntertainRefreshPush
|
||||||
(*EntertainGetListReq)(nil), // 17: EntertainGetListReq
|
(*EntertainGetListReq)(nil), // 17: EntertainGetListReq
|
||||||
(*EntertainGetListResp)(nil), // 18: EntertainGetListResp
|
(*EntertainGetListResp)(nil), // 18: EntertainGetListResp
|
||||||
(*EntertainRewardReq)(nil), // 19: EntertainRewardReq
|
(*EntertainRewardReq)(nil), // 19: EntertainRewardReq
|
||||||
(*EntertainRewardResp)(nil), // 20: EntertainRewardResp
|
(*EntertainRewardResp)(nil), // 20: EntertainRewardResp
|
||||||
(*EntertainChangePush)(nil), // 21: EntertainChangePush
|
(*EntertainChangePush)(nil), // 21: EntertainChangePush
|
||||||
nil, // 22: EntertainChangePush.CardEntry
|
(*EntertainCreateRoomReq)(nil), // 22: EntertainCreateRoomReq
|
||||||
(*PlayerData)(nil), // 23: PlayerData
|
(*EntertainCreateRoomResp)(nil), // 23: EntertainCreateRoomResp
|
||||||
(*MapData)(nil), // 24: MapData
|
(*EntertainJoinRoomReq)(nil), // 24: EntertainJoinRoomReq
|
||||||
(*UserAtno)(nil), // 25: UserAtno
|
(*EntertainJoinRoomResp)(nil), // 25: EntertainJoinRoomResp
|
||||||
(*DBXXLData)(nil), // 26: DBXXLData
|
(*EntertainJoinCreateRoomPush)(nil), // 26: EntertainJoinCreateRoomPush
|
||||||
|
(*EntertainMasterStartReq)(nil), // 27: EntertainMasterStartReq
|
||||||
|
(*EntertainMasterStartResp)(nil), // 28: EntertainMasterStartResp
|
||||||
|
(*EntertainDissolveRoomReq)(nil), // 29: EntertainDissolveRoomReq
|
||||||
|
(*EntertainDissolveRoomResp)(nil), // 30: EntertainDissolveRoomResp
|
||||||
|
(*EntertainDissolveMasterRoomPush)(nil), // 31: EntertainDissolveMasterRoomPush
|
||||||
|
nil, // 32: EntertainChangePush.CardEntry
|
||||||
|
(*PlayerData)(nil), // 33: PlayerData
|
||||||
|
(*MapData)(nil), // 34: MapData
|
||||||
|
(*UserAtno)(nil), // 35: UserAtno
|
||||||
|
(*DBXXLData)(nil), // 36: DBXXLData
|
||||||
}
|
}
|
||||||
var file_entertain_entertain_msg_proto_depIdxs = []int32{
|
var file_entertain_entertain_msg_proto_depIdxs = []int32{
|
||||||
23, // 0: EntertainStartGamePush.user1:type_name -> PlayerData
|
33, // 0: EntertainStartGamePush.user1:type_name -> PlayerData
|
||||||
23, // 1: EntertainStartGamePush.user2:type_name -> PlayerData
|
33, // 1: EntertainStartGamePush.user2:type_name -> PlayerData
|
||||||
24, // 2: EntertainStartGamePush.mpadata:type_name -> MapData
|
34, // 2: EntertainStartGamePush.mpadata:type_name -> MapData
|
||||||
24, // 3: EntertainOperatorRstPush.mpadata:type_name -> MapData
|
34, // 3: EntertainOperatorRstPush.mpadata:type_name -> MapData
|
||||||
23, // 4: EntertainOperatorRstPush.user1:type_name -> PlayerData
|
33, // 4: EntertainOperatorRstPush.user1:type_name -> PlayerData
|
||||||
23, // 5: EntertainOperatorRstPush.user2:type_name -> PlayerData
|
33, // 5: EntertainOperatorRstPush.user2:type_name -> PlayerData
|
||||||
23, // 6: EntertainGameOverPush.user1:type_name -> PlayerData
|
33, // 6: EntertainGameOverPush.user1:type_name -> PlayerData
|
||||||
23, // 7: EntertainGameOverPush.user2:type_name -> PlayerData
|
33, // 7: EntertainGameOverPush.user2:type_name -> PlayerData
|
||||||
24, // 8: EntertainGameOverPush.mpadata:type_name -> MapData
|
34, // 8: EntertainGameOverPush.mpadata:type_name -> MapData
|
||||||
25, // 9: EntertainGameOverPush.reward:type_name -> UserAtno
|
35, // 9: EntertainGameOverPush.reward:type_name -> UserAtno
|
||||||
23, // 10: EntertainEnterRoomPush.user1:type_name -> PlayerData
|
33, // 10: EntertainEnterRoomPush.user1:type_name -> PlayerData
|
||||||
23, // 11: EntertainEnterRoomPush.user2:type_name -> PlayerData
|
33, // 11: EntertainEnterRoomPush.user2:type_name -> PlayerData
|
||||||
24, // 12: EntertainReconnectResp.mpadata:type_name -> MapData
|
34, // 12: EntertainReconnectResp.mpadata:type_name -> MapData
|
||||||
23, // 13: EntertainReconnectResp.user1:type_name -> PlayerData
|
33, // 13: EntertainReconnectResp.user1:type_name -> PlayerData
|
||||||
23, // 14: EntertainReconnectResp.user2:type_name -> PlayerData
|
33, // 14: EntertainReconnectResp.user2:type_name -> PlayerData
|
||||||
24, // 15: EntertainRefreshPlatResp.mpadata:type_name -> MapData
|
34, // 15: EntertainRefreshPlatResp.mpadata:type_name -> MapData
|
||||||
24, // 16: EntertainRefreshPush.mpadata:type_name -> MapData
|
34, // 16: EntertainRefreshPush.mpadata:type_name -> MapData
|
||||||
26, // 17: EntertainGetListResp.data:type_name -> DBXXLData
|
36, // 17: EntertainGetListResp.data:type_name -> DBXXLData
|
||||||
26, // 18: EntertainRewardResp.data:type_name -> DBXXLData
|
36, // 18: EntertainRewardResp.data:type_name -> DBXXLData
|
||||||
25, // 19: EntertainRewardResp.reward:type_name -> UserAtno
|
35, // 19: EntertainRewardResp.reward:type_name -> UserAtno
|
||||||
22, // 20: EntertainChangePush.card:type_name -> EntertainChangePush.CardEntry
|
32, // 20: EntertainChangePush.card:type_name -> EntertainChangePush.CardEntry
|
||||||
21, // [21:21] is the sub-list for method output_type
|
33, // 21: EntertainJoinCreateRoomPush.user1:type_name -> PlayerData
|
||||||
21, // [21:21] is the sub-list for method input_type
|
33, // 22: EntertainJoinCreateRoomPush.user2:type_name -> PlayerData
|
||||||
21, // [21:21] is the sub-list for extension type_name
|
23, // [23:23] is the sub-list for method output_type
|
||||||
21, // [21:21] is the sub-list for extension extendee
|
23, // [23:23] is the sub-list for method input_type
|
||||||
0, // [0:21] is the sub-list for field type_name
|
23, // [23:23] is the sub-list for extension type_name
|
||||||
|
23, // [23:23] is the sub-list for extension extendee
|
||||||
|
0, // [0:23] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_entertain_entertain_msg_proto_init() }
|
func init() { file_entertain_entertain_msg_proto_init() }
|
||||||
@ -1819,6 +2361,126 @@ func file_entertain_entertain_msg_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainCreateRoomReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainCreateRoomResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainJoinRoomReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainJoinRoomResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainJoinCreateRoomPush); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainMasterStartReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainMasterStartResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainDissolveRoomReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainDissolveRoomResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_entertain_entertain_msg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*EntertainDissolveMasterRoomPush); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@ -1826,7 +2488,7 @@ func file_entertain_entertain_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_entertain_entertain_msg_proto_rawDesc,
|
RawDescriptor: file_entertain_entertain_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 23,
|
NumMessages: 33,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -451,10 +451,12 @@ const (
|
|||||||
//捕羊大赛的
|
//捕羊大赛的
|
||||||
ErrorCode_CapturesheepRankCloseed ErrorCode = 5101 //排位比赛不在开启时间内
|
ErrorCode_CapturesheepRankCloseed ErrorCode = 5101 //排位比赛不在开启时间内
|
||||||
// xxl
|
// xxl
|
||||||
ErrorCode_EntertainCantSwap ErrorCode = 5201 //不能交换
|
ErrorCode_EntertainCantSwap ErrorCode = 5201 //不能交换
|
||||||
ErrorCode_EntertainNoPower ErrorCode = 5202 //对方操作
|
ErrorCode_EntertainNoPower ErrorCode = 5202 //对方操作
|
||||||
ErrorCode_EntertainNoHeroSkill ErrorCode = 5203 //没找到该英雄对应的技能
|
ErrorCode_EntertainNoHeroSkill ErrorCode = 5203 //没找到该英雄对应的技能
|
||||||
ErrorCode_EntertainNoEnergy ErrorCode = 5204 //技能能量不足
|
ErrorCode_EntertainNoEnergy ErrorCode = 5204 //技能能量不足
|
||||||
|
ErrorCode_EntertainCreateFailed ErrorCode = 5205 // 创建房间失败
|
||||||
|
ErrorCode_EntertainPlayerNoReady ErrorCode = 5206 // 玩家1还没准备不能开始游戏
|
||||||
)
|
)
|
||||||
|
|
||||||
// Enum value maps for ErrorCode.
|
// Enum value maps for ErrorCode.
|
||||||
@ -847,6 +849,8 @@ var (
|
|||||||
5202: "EntertainNoPower",
|
5202: "EntertainNoPower",
|
||||||
5203: "EntertainNoHeroSkill",
|
5203: "EntertainNoHeroSkill",
|
||||||
5204: "EntertainNoEnergy",
|
5204: "EntertainNoEnergy",
|
||||||
|
5205: "EntertainCreateFailed",
|
||||||
|
5206: "EntertainPlayerNoReady",
|
||||||
}
|
}
|
||||||
ErrorCode_value = map[string]int32{
|
ErrorCode_value = map[string]int32{
|
||||||
"Success": 0,
|
"Success": 0,
|
||||||
@ -1236,6 +1240,8 @@ var (
|
|||||||
"EntertainNoPower": 5202,
|
"EntertainNoPower": 5202,
|
||||||
"EntertainNoHeroSkill": 5203,
|
"EntertainNoHeroSkill": 5203,
|
||||||
"EntertainNoEnergy": 5204,
|
"EntertainNoEnergy": 5204,
|
||||||
|
"EntertainCreateFailed": 5205,
|
||||||
|
"EntertainPlayerNoReady": 5206,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1270,7 +1276,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_errorcode_proto_rawDesc = []byte{
|
var file_errorcode_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x2a, 0xe4, 0x47, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
0x6f, 0x2a, 0x9d, 0x48, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
||||||
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
|
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
|
||||||
@ -1844,8 +1850,12 @@ var file_errorcode_proto_rawDesc = []byte{
|
|||||||
0x65, 0x72, 0x10, 0xd2, 0x28, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61,
|
0x65, 0x72, 0x10, 0xd2, 0x28, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61,
|
||||||
0x69, 0x6e, 0x4e, 0x6f, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x10, 0xd3, 0x28,
|
0x69, 0x6e, 0x4e, 0x6f, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x10, 0xd3, 0x28,
|
||||||
0x12, 0x16, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x45,
|
0x12, 0x16, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x45,
|
||||||
0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0xd4, 0x28, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0xd4, 0x28, 0x12, 0x1a, 0x0a, 0x15, 0x45, 0x6e, 0x74, 0x65,
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65,
|
||||||
|
0x64, 0x10, 0xd5, 0x28, 0x12, 0x1b, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69,
|
||||||
|
0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x6f, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0xd6,
|
||||||
|
0x28, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user