Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
c1c2790ddd
@ -108,11 +108,12 @@ const (
|
||||
ModuleBattleRecord core.M_Modules = "battlerecord" //战斗记录
|
||||
ModuleDragon core.M_Modules = "dragon" //坐骑
|
||||
ModuleCaptureSheep core.M_Modules = "capturesheep" //捕羊大赛
|
||||
ModuleTurntable core.M_Modules = "turntable" //
|
||||
ModuleVenture core.M_Modules = "venture" //
|
||||
ModuleTurntable core.M_Modules = "turntable" //转盘
|
||||
ModuleVenture core.M_Modules = "venture" //7日签到
|
||||
ModuleAchieve core.M_Modules = "achieve" //全局成就
|
||||
ModuleJielong core.M_Modules = "jielong" //
|
||||
ModuleEntertainment core.M_Modules = "entertainment" //
|
||||
ModuleJielong core.M_Modules = "jielong" //接龙
|
||||
ModuleEntertainment core.M_Modules = "entertainment" //消消乐
|
||||
ModuleDcolor core.M_Modules = "dcolor" //猜颜色
|
||||
)
|
||||
|
||||
// 数据表名定义处
|
||||
@ -388,6 +389,8 @@ const (
|
||||
|
||||
//日常任务
|
||||
TableAchieve = "achieve"
|
||||
//猜颜色
|
||||
TableDcolorQieChuo = "dcolorqiecuo"
|
||||
)
|
||||
|
||||
// RPC服务接口定义处
|
||||
|
@ -17,7 +17,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.DailytaskReceive
|
||||
var (
|
||||
dtask *pb.DBDailytask
|
||||
conf *cfg.GameAnnulartaskAllData
|
||||
award []*pb.UserAssets
|
||||
atno []*pb.UserAtno
|
||||
err error
|
||||
)
|
||||
if errdata = this.ReceiveCheck(session, req); errdata != nil {
|
||||
@ -52,17 +52,9 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.DailytaskReceive
|
||||
return
|
||||
}
|
||||
}
|
||||
award = make([]*pb.UserAssets, 0)
|
||||
for _, v := range conf.Reward {
|
||||
award = append(award, &pb.UserAssets{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N,
|
||||
})
|
||||
}
|
||||
if errdata = this.module.DispenseRes(session, conf.Reward, true); errdata != nil {
|
||||
if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.DailytaskReceiveResp{Award: award})
|
||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.DailytaskReceiveResp{Award: atno})
|
||||
return
|
||||
}
|
||||
|
17
modules/dcolor/api.go
Normal file
17
modules/dcolor/api.go
Normal file
@ -0,0 +1,17 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
module *DColor
|
||||
}
|
||||
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
_ = this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*DColor)
|
||||
return
|
||||
}
|
138
modules/dcolor/api_accept.go
Normal file
138
modules/dcolor/api_accept.go
Normal file
@ -0,0 +1,138 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
//接受切磋
|
||||
|
||||
func (this *apiComp) AcceptCheck(session comm.IUserSession, req *pb.DColorAcceptReq) (errdata *pb.ErrorData) {
|
||||
if req.Uid == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Accept(session comm.IUserSession, req *pb.DColorAcceptReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
err error
|
||||
redRecord *pb.DBDColorQiecuoRecord
|
||||
blueRecord *pb.DBDColorQiecuoRecord
|
||||
room *Room
|
||||
keep bool
|
||||
)
|
||||
|
||||
if errdata = this.AcceptCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
//校验切磋请求是否超时
|
||||
if redRecord, err = this.module.modelQiecuo.queryQiecuo(req.Uid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if blueRecord, err = this.module.modelQiecuo.queryQiecuo(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if redRecord.Status == 1 { //已经在战斗中了
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PracticeQiecuoing,
|
||||
Title: pb.ErrorCode_PracticeQiecuoing.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
keep = false
|
||||
for _, v := range redRecord.Targets {
|
||||
if v.Uid == session.GetUserId() {
|
||||
if configure.Now().Sub(time.Unix(v.Timestamp, 0)).Seconds() > 10 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PracticeInviteTimeOut,
|
||||
Title: pb.ErrorCode_PracticeInviteTimeOut.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
keep = true
|
||||
}
|
||||
}
|
||||
if !keep {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//发起者 red
|
||||
red, err := this.module.ModuleUser.GetUser(req.Uid)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserNofound,
|
||||
Title: pb.ErrorCode_UserNofound.ToString(),
|
||||
}
|
||||
this.module.Error("未找到红方信息", log.Field{Key: "uid", Value: req.Uid})
|
||||
return
|
||||
}
|
||||
blue, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserNofound,
|
||||
Title: pb.ErrorCode_UserNofound.ToString(),
|
||||
}
|
||||
this.module.Error("未找到蓝方信息", log.Field{Key: "uid", Value: session.GetUserId()})
|
||||
return
|
||||
}
|
||||
|
||||
redRecord.Status = 1
|
||||
redRecord.Member = []string{session.GetUserId(), req.Uid}
|
||||
blueRecord.Status = 1
|
||||
blueRecord.Member = []string{session.GetUserId(), req.Uid}
|
||||
this.module.modelQiecuo.Change(session.GetUserId(), map[string]interface{}{
|
||||
"status": 1,
|
||||
"member": redRecord.Member,
|
||||
"battid": redRecord.Battid,
|
||||
})
|
||||
this.module.modelQiecuo.Change(req.Uid, map[string]interface{}{
|
||||
"status": 1,
|
||||
"member": redRecord.Member,
|
||||
"battid": redRecord.Battid,
|
||||
})
|
||||
|
||||
if room, err = this.module.rooms.newRoom(&pb.DBDColorRoom{
|
||||
Rid: primitive.NewObjectID().Hex(),
|
||||
Red: &pb.DBDColorRoomPlayer{
|
||||
Info: comm.GetUserBaseInfo(red),
|
||||
},
|
||||
Blue: &pb.DBDColorRoomPlayer{
|
||||
Info: comm.GetUserBaseInfo(blue),
|
||||
},
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "accept", &pb.PracticeAcceptResp{
|
||||
IsSucc: true,
|
||||
})
|
||||
go func() {
|
||||
room.GameStart()
|
||||
}()
|
||||
|
||||
return
|
||||
}
|
51
modules/dcolor/api_loadcomplete.go
Normal file
51
modules/dcolor/api_loadcomplete.go
Normal file
@ -0,0 +1,51 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
//接受切磋
|
||||
func (this *apiComp) LoadCompleteCheck(session comm.IUserSession, req *pb.DColorLoadCompleteReq) (errdata *pb.ErrorData) {
|
||||
if req.Roomid == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) LoadComplete(session comm.IUserSession, req *pb.DColorLoadCompleteReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
room *Room
|
||||
err error
|
||||
)
|
||||
|
||||
if errdata = this.LoadCompleteCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if room, err = this.module.rooms.queryRoom(req.Roomid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.String(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err = room.PlayerLoadEnd(session.GetUserId()); errdata != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.String(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "loadcomplete", &pb.DColorLoadCompleteResp{
|
||||
Roomid: req.Roomid,
|
||||
Issucc: true,
|
||||
})
|
||||
return
|
||||
}
|
146
modules/dcolor/api_qiecuo.go
Normal file
146
modules/dcolor/api_qiecuo.go
Normal file
@ -0,0 +1,146 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 踢馆(熊猫武馆)
|
||||
func (this *apiComp) QiecuoCheck(session comm.IUserSession, req *pb.DColorQiecuoReq) (errdata *pb.ErrorData) {
|
||||
if req.Fid == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Qiecuo(session comm.IUserSession, req *pb.DColorQiecuoReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.QiecuoCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
var (
|
||||
err error
|
||||
result *pb.DBDColorQiecuoRecord
|
||||
fresult *pb.DBDColorQiecuoRecord
|
||||
user *pb.DBUser
|
||||
keep bool
|
||||
)
|
||||
|
||||
//切磋请求处理
|
||||
if result, err = this.module.modelQiecuo.queryQiecuo(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if fresult, err = this.module.modelQiecuo.queryQiecuo(req.Fid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if result.Status == 1 || fresult.Status == 1 { //已经在战斗中了
|
||||
if result.Battid == fresult.Battid { //两个人正在战斗中
|
||||
if _, err = this.module.rooms.queryRoom(result.Battid); err != nil {
|
||||
this.module.Error("查询pvp数据失败!", log.Field{Key: "id", Value: result.Battid}, log.Field{Key: "err", Value: err.Error()})
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
Title: pb.ErrorCode_SystemError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if err = session.SendMsg(string(this.module.GetType()), "qiecuo", &pb.DColorQiecuoResp{Fid: req.Fid, Isbattle: true}); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
Title: pb.ErrorCode_SystemError.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
return
|
||||
} else {
|
||||
if result.Status == 1 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PracticeYouQiecuoing,
|
||||
Title: pb.ErrorCode_PracticeYouQiecuoing.ToString(),
|
||||
}
|
||||
return
|
||||
} else {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PracticeTargetQiecuoing,
|
||||
Title: pb.ErrorCode_PracticeTargetQiecuoing.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
//目标是否在线
|
||||
if !this.module.ModuleUser.IsOnline(req.Fid) {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserOffline,
|
||||
Title: pb.ErrorCode_UserOffline.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if user, err = this.module.ModuleUser.GetUser(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
keep = false
|
||||
for _, v := range result.Targets {
|
||||
if v.Uid == req.Fid {
|
||||
keep = true
|
||||
if configure.Now().Sub(time.Unix(v.Timestamp, 0)).Seconds() > 10 {
|
||||
v.Timestamp = configure.Now().Unix()
|
||||
} else {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PracticeSent,
|
||||
Title: pb.ErrorCode_PracticeSent.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if !keep {
|
||||
result.Targets = append(result.Targets, &pb.DBDColorQiecuoInvite{
|
||||
Uid: req.Fid,
|
||||
Timestamp: configure.Now().Unix(),
|
||||
})
|
||||
}
|
||||
result.Difficulty = req.Difficulty
|
||||
result.Repeat = req.Repeat
|
||||
this.module.modelQiecuo.Change(session.GetUserId(), map[string]interface{}{
|
||||
"difficulty": result.Difficulty,
|
||||
"repeat": result.Repeat,
|
||||
"targets": result.Targets,
|
||||
})
|
||||
|
||||
if err = session.SendMsg(string(this.module.GetType()), "qiecuo", &pb.DColorQiecuoResp{Fid: req.Fid}); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
Title: pb.ErrorCode_SystemError.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify",
|
||||
&pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), Name: user.Name, NotifyType: 1}, req.Fid)
|
||||
|
||||
return
|
||||
}
|
27
modules/dcolor/configure.go
Normal file
27
modules/dcolor/configure.go
Normal file
@ -0,0 +1,27 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
const (
|
||||
gameDispatchLv = "game_dispatch_lv.json"
|
||||
gameDispatchTask = "game_dispatch_task.json"
|
||||
new_hero = "game_hero.json"
|
||||
)
|
||||
|
||||
type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
}
|
||||
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
gameDispatchLv: cfg.NewGameDispatch_Lv,
|
||||
gameDispatchTask: cfg.NewGameDispatch_Task,
|
||||
new_hero: cfg.NewGameHero,
|
||||
})
|
||||
return
|
||||
}
|
24
modules/dcolor/model.go
Normal file
24
modules/dcolor/model.go
Normal file
@ -0,0 +1,24 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
type modelComp struct {
|
||||
modules.MCompModel
|
||||
module *DColor
|
||||
}
|
||||
|
||||
func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.TableName = comm.TablekfPushGiftbag
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
73
modules/dcolor/modelqiecuo.go
Normal file
73
modules/dcolor/modelqiecuo.go
Normal file
@ -0,0 +1,73 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
type modelQiecuoComp struct {
|
||||
modules.MCompModel
|
||||
module *DColor
|
||||
}
|
||||
|
||||
func (this *modelQiecuoComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.TableName = comm.TableDcolorQieChuo
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 切磋请求处理
|
||||
func (this *modelQiecuoComp) queryQiecuo(uid string) (result *pb.DBDColorQiecuoRecord, err error) {
|
||||
result = &pb.DBDColorQiecuoRecord{}
|
||||
if err = this.Get(uid, result); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
result = &pb.DBDColorQiecuoRecord{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Targets: make([]*pb.DBDColorQiecuoInvite, 0),
|
||||
}
|
||||
if err = this.Add(uid, result); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
return
|
||||
}
|
||||
|
||||
func (this *modelQiecuoComp) endQiecuo(uid string) (result *pb.DBDColorQiecuoRecord, err error) {
|
||||
result = &pb.DBDColorQiecuoRecord{}
|
||||
if err = this.Get(uid, result); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
this.Change(uid, map[string]interface{}{
|
||||
"status": 0,
|
||||
"battid": "",
|
||||
"targets": []*pb.DBPracticeQiecuoInvite{},
|
||||
"member": []string{},
|
||||
})
|
||||
for _, v := range result.Member {
|
||||
if v != uid {
|
||||
this.Change(v, map[string]interface{}{
|
||||
"status": 0,
|
||||
"battid": "",
|
||||
"targets": []*pb.DBPracticeQiecuoInvite{},
|
||||
"member": []string{},
|
||||
})
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
32
modules/dcolor/module.go
Normal file
32
modules/dcolor/module.go
Normal file
@ -0,0 +1,32 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
/*
|
||||
模块名称:猜颜色
|
||||
*/
|
||||
type DColor struct {
|
||||
modules.ModuleBase
|
||||
service comm.IService
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
model *modelComp
|
||||
modelQiecuo *modelQiecuoComp
|
||||
rooms *roomsComp
|
||||
}
|
||||
|
||||
// 模块名
|
||||
func (this *DColor) GetType() core.M_Modules {
|
||||
return comm.ModuleDcolor
|
||||
}
|
||||
|
||||
// 模块初始化接口 注册用户创建角色事件
|
||||
func (this *DColor) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
service = this.service.(comm.IService)
|
||||
return
|
||||
}
|
116
modules/dcolor/room.go
Normal file
116
modules/dcolor/room.go
Normal file
@ -0,0 +1,116 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
type Room struct {
|
||||
module *DColor
|
||||
data *pb.DBDColorRoom
|
||||
sessions []comm.IUserSession
|
||||
currside int32
|
||||
currindex int32
|
||||
}
|
||||
|
||||
func (this *Room) GameStart() (err error) {
|
||||
if err = this.Broadcast("gameready", &pb.DColorGameReadyPush{
|
||||
ServicePath: fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()),
|
||||
Room: this.data,
|
||||
Countdown: 60,
|
||||
}); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Room) PlayerLoadEnd(uid string) (err error) {
|
||||
if uid == this.data.Red.Info.Uid {
|
||||
this.data.Red.Ready = true
|
||||
} else {
|
||||
this.data.Blue.Ready = true
|
||||
}
|
||||
|
||||
if this.data.Red.Ready && this.data.Blue.Ready { //两个人都准备了
|
||||
this.currside = 1
|
||||
if err = this.Broadcast("loadcompletenotice", &pb.DColorGameStartPush{
|
||||
Side: 1,
|
||||
}); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//玩家操作
|
||||
func (this *Room) PlayerHandle(uid string, handle *pb.DColorHandleReq) (err error) {
|
||||
|
||||
this.currindex++
|
||||
allright, halfpair := this.comparison(handle.Results)
|
||||
handleopt := &pb.DBDColorResult{
|
||||
Index: handle.Index,
|
||||
Uid: uid,
|
||||
Results: handle.Results,
|
||||
Allright: allright,
|
||||
Halfpair: halfpair,
|
||||
}
|
||||
this.data.Handles = append(this.data.Handles, handleopt)
|
||||
|
||||
if allright == int32(len(this.data.Results)) { //结束
|
||||
if err = this.Broadcast("gameover", &pb.DColorGameOverPush{
|
||||
Winside: this.currside,
|
||||
}); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
} else {
|
||||
if err = this.Broadcast("gamehandle", &pb.DColorGameHandlePush{
|
||||
Uid: uid,
|
||||
Handle: handleopt,
|
||||
}); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
if this.currside == 1 {
|
||||
this.currside = 2
|
||||
} else {
|
||||
this.currside = 1
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Room) comparison(results []pb.DBDColorColor) (allright, halfpair int32) {
|
||||
var (
|
||||
resultscolor []pb.DBDColorColor
|
||||
tempcolor []pb.DBDColorColor
|
||||
)
|
||||
for i, v := range this.data.Results {
|
||||
if results[i] == v {
|
||||
allright++
|
||||
} else {
|
||||
tempcolor = append(tempcolor, results[i])
|
||||
resultscolor = append(resultscolor, v)
|
||||
}
|
||||
}
|
||||
|
||||
for _, v1 := range tempcolor {
|
||||
for i, v2 := range resultscolor {
|
||||
if v1 == v2 {
|
||||
halfpair++
|
||||
resultscolor = append(resultscolor[0:i], resultscolor[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Room) Broadcast(stype string, msg proto.Message) (err error) {
|
||||
if err = this.module.SendMsgToSession(string(this.module.GetType()), stype, msg, this.sessions...); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
return
|
||||
}
|
41
modules/dcolor/rooms.go
Normal file
41
modules/dcolor/rooms.go
Normal file
@ -0,0 +1,41 @@
|
||||
package dcolor
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/core/cbase"
|
||||
"go_dreamfactory/pb"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type roomsComp struct {
|
||||
cbase.ModuleCompBase
|
||||
module *DColor
|
||||
lock sync.RWMutex
|
||||
rooms map[string]*Room
|
||||
}
|
||||
|
||||
func (this *roomsComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleCompBase.Init(service, module, comp, options)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *roomsComp) queryRoom(rid string) (room *Room, err error) {
|
||||
var (
|
||||
ok bool
|
||||
)
|
||||
this.lock.Lock()
|
||||
room, ok = this.rooms[rid]
|
||||
this.lock.Unlock()
|
||||
if !ok {
|
||||
err = fmt.Errorf("no found room:%s", rid)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *roomsComp) newRoom(data *pb.DBDColorRoom) (room *Room, err error) {
|
||||
|
||||
return
|
||||
}
|
@ -133,8 +133,8 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.PracticeAcceptReq
|
||||
&pb.PracticeQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 2}, req.Uid)
|
||||
_session, _ := this.module.GetUserSession(req.Uid)
|
||||
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(_session.Clone(), comm.GetBuriedParam(comm.Rtype183, 1))
|
||||
go this.module.AsynHandleSession(_session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype183, 1))
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
|
||||
for k, v := range this.module.gourmet.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
case comm.Reddot30100:
|
||||
case comm.Reddot27101, comm.Reddot30100:
|
||||
for k, v := range this.module.ModuleUser.Reddot(session, _rid) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ type DailytaskReceiveResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Award []*UserAssets `protobuf:"bytes,1,rep,name=award,proto3" json:"award"` //奖励
|
||||
Award []*UserAtno `protobuf:"bytes,1,rep,name=award,proto3" json:"award"` //奖励
|
||||
}
|
||||
|
||||
func (x *DailytaskReceiveResp) Reset() {
|
||||
@ -187,7 +187,7 @@ func (*DailytaskReceiveResp) Descriptor() ([]byte, []int) {
|
||||
return file_dailytask_dailytask_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DailytaskReceiveResp) GetAward() []*UserAssets {
|
||||
func (x *DailytaskReceiveResp) GetAward() []*UserAtno {
|
||||
if x != nil {
|
||||
return x.Award
|
||||
}
|
||||
@ -208,12 +208,12 @@ var file_dailytask_dailytask_msg_proto_rawDesc = []byte{
|
||||
0x32, 0x19, 0x2e, 0x44, 0x42, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72,
|
||||
0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x74, 0x61, 0x73,
|
||||
0x6b, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65,
|
||||
0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, 0x14, 0x44, 0x61, 0x69, 0x6c,
|
||||
0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, 0x14, 0x44, 0x61, 0x69, 0x6c,
|
||||
0x79, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77,
|
||||
0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72,
|
||||
0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -235,11 +235,11 @@ var file_dailytask_dailytask_msg_proto_goTypes = []interface{}{
|
||||
(*DailytaskReceiveReq)(nil), // 2: DailytaskReceiveReq
|
||||
(*DailytaskReceiveResp)(nil), // 3: DailytaskReceiveResp
|
||||
(*DBDailytaskGroupProgress)(nil), // 4: DBDailytaskGroupProgress
|
||||
(*UserAssets)(nil), // 5: UserAssets
|
||||
(*UserAtno)(nil), // 5: UserAtno
|
||||
}
|
||||
var file_dailytask_dailytask_msg_proto_depIdxs = []int32{
|
||||
4, // 0: DailytaskInfoResp.task:type_name -> DBDailytaskGroupProgress
|
||||
5, // 1: DailytaskReceiveResp.award:type_name -> UserAssets
|
||||
5, // 1: DailytaskReceiveResp.award:type_name -> UserAtno
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
|
723
pb/dcolor_db.pb.go
Normal file
723
pb/dcolor_db.pb.go
Normal file
@ -0,0 +1,723 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: dcolor/dcolor_db.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
//游戏难度
|
||||
type DBDColorDifficulty int32
|
||||
|
||||
const (
|
||||
DBDColorDifficulty_Simple DBDColorDifficulty = 0
|
||||
DBDColorDifficulty_Difficulty DBDColorDifficulty = 1
|
||||
DBDColorDifficulty_Hell DBDColorDifficulty = 2
|
||||
)
|
||||
|
||||
// Enum value maps for DBDColorDifficulty.
|
||||
var (
|
||||
DBDColorDifficulty_name = map[int32]string{
|
||||
0: "Simple",
|
||||
1: "Difficulty",
|
||||
2: "Hell",
|
||||
}
|
||||
DBDColorDifficulty_value = map[string]int32{
|
||||
"Simple": 0,
|
||||
"Difficulty": 1,
|
||||
"Hell": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x DBDColorDifficulty) Enum() *DBDColorDifficulty {
|
||||
p := new(DBDColorDifficulty)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x DBDColorDifficulty) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (DBDColorDifficulty) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_dcolor_dcolor_db_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (DBDColorDifficulty) Type() protoreflect.EnumType {
|
||||
return &file_dcolor_dcolor_db_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x DBDColorDifficulty) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBDColorDifficulty.Descriptor instead.
|
||||
func (DBDColorDifficulty) EnumDescriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type DBDColorColor int32
|
||||
|
||||
const (
|
||||
DBDColorColor_Color_0 DBDColorColor = 0
|
||||
DBDColorColor_Color_1 DBDColorColor = 1
|
||||
DBDColorColor_Color_2 DBDColorColor = 2
|
||||
DBDColorColor_Color_3 DBDColorColor = 3
|
||||
DBDColorColor_Color_4 DBDColorColor = 4
|
||||
DBDColorColor_Color_5 DBDColorColor = 5
|
||||
DBDColorColor_Color_6 DBDColorColor = 6
|
||||
DBDColorColor_Color_7 DBDColorColor = 7
|
||||
)
|
||||
|
||||
// Enum value maps for DBDColorColor.
|
||||
var (
|
||||
DBDColorColor_name = map[int32]string{
|
||||
0: "Color_0",
|
||||
1: "Color_1",
|
||||
2: "Color_2",
|
||||
3: "Color_3",
|
||||
4: "Color_4",
|
||||
5: "Color_5",
|
||||
6: "Color_6",
|
||||
7: "Color_7",
|
||||
}
|
||||
DBDColorColor_value = map[string]int32{
|
||||
"Color_0": 0,
|
||||
"Color_1": 1,
|
||||
"Color_2": 2,
|
||||
"Color_3": 3,
|
||||
"Color_4": 4,
|
||||
"Color_5": 5,
|
||||
"Color_6": 6,
|
||||
"Color_7": 7,
|
||||
}
|
||||
)
|
||||
|
||||
func (x DBDColorColor) Enum() *DBDColorColor {
|
||||
p := new(DBDColorColor)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x DBDColorColor) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (DBDColorColor) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_dcolor_dcolor_db_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (DBDColorColor) Type() protoreflect.EnumType {
|
||||
return &file_dcolor_dcolor_db_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x DBDColorColor) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBDColorColor.Descriptor instead.
|
||||
func (DBDColorColor) EnumDescriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type DBDColorQiecuoInvite struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
|
||||
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp"`
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoInvite) Reset() {
|
||||
*x = DBDColorQiecuoInvite{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoInvite) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBDColorQiecuoInvite) ProtoMessage() {}
|
||||
|
||||
func (x *DBDColorQiecuoInvite) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[0]
|
||||
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 DBDColorQiecuoInvite.ProtoReflect.Descriptor instead.
|
||||
func (*DBDColorQiecuoInvite) Descriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoInvite) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoInvite) GetTimestamp() int64 {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//切磋请求记录
|
||||
type DBDColorQiecuoRecord struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //id
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` //发起人id
|
||||
Targets []*DBDColorQiecuoInvite `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets"`
|
||||
Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status"` //0邀请中 1战斗中
|
||||
Battid string `protobuf:"bytes,5,opt,name=battid,proto3" json:"battid"`
|
||||
Difficulty DBDColorDifficulty `protobuf:"varint,6,opt,name=difficulty,proto3,enum=DBDColorDifficulty" json:"difficulty"`
|
||||
Repeat bool `protobuf:"varint,7,opt,name=Repeat,proto3" json:"Repeat"`
|
||||
Member []string `protobuf:"bytes,8,rep,name=member,proto3" json:"member"` //接受方id
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) Reset() {
|
||||
*x = DBDColorQiecuoRecord{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBDColorQiecuoRecord) ProtoMessage() {}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[1]
|
||||
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 DBDColorQiecuoRecord.ProtoReflect.Descriptor instead.
|
||||
func (*DBDColorQiecuoRecord) Descriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetTargets() []*DBDColorQiecuoInvite {
|
||||
if x != nil {
|
||||
return x.Targets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetBattid() string {
|
||||
if x != nil {
|
||||
return x.Battid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetDifficulty() DBDColorDifficulty {
|
||||
if x != nil {
|
||||
return x.Difficulty
|
||||
}
|
||||
return DBDColorDifficulty_Simple
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetRepeat() bool {
|
||||
if x != nil {
|
||||
return x.Repeat
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *DBDColorQiecuoRecord) GetMember() []string {
|
||||
if x != nil {
|
||||
return x.Member
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DBDColorRoomPlayer struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info *BaseUserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //发起者信息
|
||||
Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"`
|
||||
Ready bool `protobuf:"varint,3,opt,name=ready,proto3" json:"ready"`
|
||||
Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"`
|
||||
}
|
||||
|
||||
func (x *DBDColorRoomPlayer) Reset() {
|
||||
*x = DBDColorRoomPlayer{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBDColorRoomPlayer) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBDColorRoomPlayer) ProtoMessage() {}
|
||||
|
||||
func (x *DBDColorRoomPlayer) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[2]
|
||||
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 DBDColorRoomPlayer.ProtoReflect.Descriptor instead.
|
||||
func (*DBDColorRoomPlayer) Descriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DBDColorRoomPlayer) GetInfo() *BaseUserInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBDColorRoomPlayer) GetIsai() bool {
|
||||
if x != nil {
|
||||
return x.Isai
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *DBDColorRoomPlayer) GetReady() bool {
|
||||
if x != nil {
|
||||
return x.Ready
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *DBDColorRoomPlayer) GetScore() int32 {
|
||||
if x != nil {
|
||||
return x.Score
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DBDColorResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"`
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
|
||||
Results []DBDColorColor `protobuf:"varint,3,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"`
|
||||
Allright int32 `protobuf:"varint,4,opt,name=allright,proto3" json:"allright"`
|
||||
Halfpair int32 `protobuf:"varint,5,opt,name=halfpair,proto3" json:"halfpair"`
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) Reset() {
|
||||
*x = DBDColorResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBDColorResult) ProtoMessage() {}
|
||||
|
||||
func (x *DBDColorResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[3]
|
||||
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 DBDColorResult.ProtoReflect.Descriptor instead.
|
||||
func (*DBDColorResult) Descriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) GetIndex() int32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) GetResults() []DBDColorColor {
|
||||
if x != nil {
|
||||
return x.Results
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) GetAllright() int32 {
|
||||
if x != nil {
|
||||
return x.Allright
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBDColorResult) GetHalfpair() int32 {
|
||||
if x != nil {
|
||||
return x.Halfpair
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//猜颜色 房间
|
||||
type DBDColorRoom struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Rid string `protobuf:"bytes,1,opt,name=rid,proto3" json:"rid"`
|
||||
Results []DBDColorColor `protobuf:"varint,2,rep,packed,name=results,proto3,enum=DBDColorColor" json:"results"`
|
||||
Red *DBDColorRoomPlayer `protobuf:"bytes,3,opt,name=red,proto3" json:"red"`
|
||||
Blue *DBDColorRoomPlayer `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"`
|
||||
Handles []*DBDColorResult `protobuf:"bytes,5,rep,name=handles,proto3" json:"handles"`
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) Reset() {
|
||||
*x = DBDColorRoom{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBDColorRoom) ProtoMessage() {}
|
||||
|
||||
func (x *DBDColorRoom) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dcolor_dcolor_db_proto_msgTypes[4]
|
||||
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 DBDColorRoom.ProtoReflect.Descriptor instead.
|
||||
func (*DBDColorRoom) Descriptor() ([]byte, []int) {
|
||||
return file_dcolor_dcolor_db_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) GetRid() string {
|
||||
if x != nil {
|
||||
return x.Rid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) GetResults() []DBDColorColor {
|
||||
if x != nil {
|
||||
return x.Results
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) GetRed() *DBDColorRoomPlayer {
|
||||
if x != nil {
|
||||
return x.Red
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) GetBlue() *DBDColorRoomPlayer {
|
||||
if x != nil {
|
||||
return x.Blue
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBDColorRoom) GetHandles() []*DBDColorResult {
|
||||
if x != nil {
|
||||
return x.Handles
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_dcolor_dcolor_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_dcolor_dcolor_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x2f, 0x64, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x14, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72,
|
||||
0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xfe, 0x01, 0x0a,
|
||||
0x14, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f,
|
||||
0x6c, 0x6f, 0x72, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52,
|
||||
0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66,
|
||||
0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x44,
|
||||
0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74,
|
||||
0x79, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52,
|
||||
0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18,
|
||||
0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x77, 0x0a,
|
||||
0x12, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x61, 0x69, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65,
|
||||
0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x44, 0x43, 0x6f,
|
||||
0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
|
||||
0x64, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61,
|
||||
0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61,
|
||||
0x6c, 0x6c, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70,
|
||||
0x61, 0x69, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x61, 0x6c, 0x66, 0x70,
|
||||
0x61, 0x69, 0x72, 0x22, 0xc5, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72,
|
||||
0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73,
|
||||
0x12, 0x25, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
|
||||
0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79,
|
||||
0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72,
|
||||
0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65,
|
||||
0x12, 0x29, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75,
|
||||
0x6c, 0x74, 0x52, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2a, 0x3a, 0x0a, 0x12, 0x44,
|
||||
0x42, 0x44, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74,
|
||||
0x79, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a,
|
||||
0x0a, 0x44, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x10, 0x01, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x48, 0x65, 0x6c, 0x6c, 0x10, 0x02, 0x2a, 0x77, 0x0a, 0x0d, 0x44, 0x42, 0x44, 0x43, 0x6f,
|
||||
0x6c, 0x6f, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f,
|
||||
0x72, 0x5f, 0x30, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31,
|
||||
0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x10, 0x02, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x72, 0x5f, 0x35, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f,
|
||||
0x36, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x37, 0x10, 0x07,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_dcolor_dcolor_db_proto_rawDescOnce sync.Once
|
||||
file_dcolor_dcolor_db_proto_rawDescData = file_dcolor_dcolor_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_dcolor_dcolor_db_proto_rawDescGZIP() []byte {
|
||||
file_dcolor_dcolor_db_proto_rawDescOnce.Do(func() {
|
||||
file_dcolor_dcolor_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_dcolor_dcolor_db_proto_rawDescData)
|
||||
})
|
||||
return file_dcolor_dcolor_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_dcolor_dcolor_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_dcolor_dcolor_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_dcolor_dcolor_db_proto_goTypes = []interface{}{
|
||||
(DBDColorDifficulty)(0), // 0: DBDColorDifficulty
|
||||
(DBDColorColor)(0), // 1: DBDColorColor
|
||||
(*DBDColorQiecuoInvite)(nil), // 2: DBDColorQiecuoInvite
|
||||
(*DBDColorQiecuoRecord)(nil), // 3: DBDColorQiecuoRecord
|
||||
(*DBDColorRoomPlayer)(nil), // 4: DBDColorRoomPlayer
|
||||
(*DBDColorResult)(nil), // 5: DBDColorResult
|
||||
(*DBDColorRoom)(nil), // 6: DBDColorRoom
|
||||
(*BaseUserInfo)(nil), // 7: BaseUserInfo
|
||||
}
|
||||
var file_dcolor_dcolor_db_proto_depIdxs = []int32{
|
||||
2, // 0: DBDColorQiecuoRecord.targets:type_name -> DBDColorQiecuoInvite
|
||||
0, // 1: DBDColorQiecuoRecord.difficulty:type_name -> DBDColorDifficulty
|
||||
7, // 2: DBDColorRoomPlayer.info:type_name -> BaseUserInfo
|
||||
1, // 3: DBDColorResult.results:type_name -> DBDColorColor
|
||||
1, // 4: DBDColorRoom.results:type_name -> DBDColorColor
|
||||
4, // 5: DBDColorRoom.red:type_name -> DBDColorRoomPlayer
|
||||
4, // 6: DBDColorRoom.blue:type_name -> DBDColorRoomPlayer
|
||||
5, // 7: DBDColorRoom.handles:type_name -> DBDColorResult
|
||||
8, // [8:8] is the sub-list for method output_type
|
||||
8, // [8:8] is the sub-list for method input_type
|
||||
8, // [8:8] is the sub-list for extension type_name
|
||||
8, // [8:8] is the sub-list for extension extendee
|
||||
0, // [0:8] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_dcolor_dcolor_db_proto_init() }
|
||||
func file_dcolor_dcolor_db_proto_init() {
|
||||
if File_dcolor_dcolor_db_proto != nil {
|
||||
return
|
||||
}
|
||||
file_comm_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_dcolor_dcolor_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBDColorQiecuoInvite); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_dcolor_dcolor_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBDColorQiecuoRecord); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_dcolor_dcolor_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBDColorRoomPlayer); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_dcolor_dcolor_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBDColorResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_dcolor_dcolor_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBDColorRoom); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_dcolor_dcolor_db_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_dcolor_dcolor_db_proto_goTypes,
|
||||
DependencyIndexes: file_dcolor_dcolor_db_proto_depIdxs,
|
||||
EnumInfos: file_dcolor_dcolor_db_proto_enumTypes,
|
||||
MessageInfos: file_dcolor_dcolor_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_dcolor_dcolor_db_proto = out.File
|
||||
file_dcolor_dcolor_db_proto_rawDesc = nil
|
||||
file_dcolor_dcolor_db_proto_goTypes = nil
|
||||
file_dcolor_dcolor_db_proto_depIdxs = nil
|
||||
}
|
1171
pb/dcolor_msg.pb.go
Normal file
1171
pb/dcolor_msg.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -44,6 +44,7 @@ import (
|
||||
"go_dreamfactory/modules/notify"
|
||||
"go_dreamfactory/modules/oldtimes"
|
||||
"go_dreamfactory/modules/pagoda"
|
||||
"go_dreamfactory/modules/parkour"
|
||||
"go_dreamfactory/modules/passon"
|
||||
"go_dreamfactory/modules/pay"
|
||||
"go_dreamfactory/modules/practice"
|
||||
@ -135,7 +136,7 @@ func main() {
|
||||
dispatch.NewModule(),
|
||||
atlas.NewModule(),
|
||||
practice.NewModule(),
|
||||
// parkour.NewModule(),
|
||||
parkour.NewModule(),
|
||||
tools.NewModule(),
|
||||
reputation.NewModule(),
|
||||
oldtimes.NewModule(),
|
||||
|
Loading…
Reference in New Issue
Block a user