主线战斗
This commit is contained in:
parent
c77443c862
commit
b8e8b7a5df
@ -1,30 +0,0 @@
|
||||
package battle
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ResultCheck(session comm.IUserSession, req *pb.BattleResultReq) (code pb.ErrorCode) {
|
||||
if req.Id == "" {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///获取本服聊天消息记录
|
||||
func (this *apiComp) Result(session comm.IUserSession, req *pb.BattleResultReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var ()
|
||||
if code = this.ResultCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
this.module.modelBattle.Change(req.Id, map[string]interface{}{
|
||||
"state": pb.BBattleState_end,
|
||||
"result": pb.DBBattleComp_red,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), "result", &pb.BattleResultResp{Id: req.Id, Issucc: true})
|
||||
return
|
||||
}
|
@ -6,10 +6,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
MainlineGetListResp = "getlist"
|
||||
MainlineChallengeResp = "challenge"
|
||||
MainlineGetRewardResp = "getreward"
|
||||
MainlineNewChapterPush = "newchapter"
|
||||
MainlineGetListResp = "getlist"
|
||||
MainlineChallengeResp = "challenge"
|
||||
MainlineChallengeOverResp = "challengeover"
|
||||
MainlineGetRewardResp = "getreward"
|
||||
MainlineNewChapterPush = "newchapter"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
|
@ -4,9 +4,6 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@ -23,12 +20,8 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineC
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
curChapter *pb.DBMainline // 当前章节信息
|
||||
bBranch bool // 当前挑战关卡是不是分支
|
||||
bCheck bool
|
||||
res []*cfg.Gameatn // 小章节奖励
|
||||
)
|
||||
res = make([]*cfg.Gameatn, 0)
|
||||
bBranch = false
|
||||
|
||||
code = this.ChallengeCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
@ -40,101 +33,39 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
||||
return
|
||||
}
|
||||
|
||||
// 先校验是不是分支
|
||||
chaptConfig := this.module.configure.GetMainlineChapter(int32(curChapter.ChapterId)) // 根据配置文件找
|
||||
if chaptConfig == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
for _, v := range chaptConfig.Episode { // 校验是不是当前章节的关卡
|
||||
if v == int32(req.MainlineId) {
|
||||
bCheck = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !bCheck {
|
||||
code = pb.ErrorCode_ReqParameterError // 不是该章节的关卡
|
||||
return
|
||||
}
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), curChapter.Intensity)
|
||||
if node == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
|
||||
if node.Route == 1 {
|
||||
if node.Previoustage != curChapter.MainlineId {
|
||||
// 分支关卡也校验一下
|
||||
for _, v := range curChapter.BranchID {
|
||||
if v == node.Previoustage {
|
||||
break
|
||||
}
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
} else {
|
||||
for _, v := range curChapter.BranchID {
|
||||
if v == int32(req.MainlineId) { // 重复挑战
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
code = pb.ErrorCode_MainlinePreNotFound
|
||||
}
|
||||
} else if node.Route == 2 { //分支
|
||||
bBranch = true
|
||||
// 只需要校验小关ID 是不是大于当前ID就可以
|
||||
//if curChapter.MainlineId < int32(req.MainlineId) { //必须大于前置关卡才可以挑战
|
||||
// code = pb.ErrorCode_MainlineIDFailed
|
||||
// return
|
||||
//}
|
||||
}
|
||||
res = append(res, node.Award...)
|
||||
|
||||
// TODO 调用战斗逻辑
|
||||
// 挑战成功
|
||||
curChapter.MainlineId = int32(req.MainlineId)
|
||||
if bBranch {
|
||||
curChapter.BranchID = append(curChapter.BranchID, int32(req.MainlineId)) // 记录分支关卡
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"mainlineId": req.MainlineId,
|
||||
"ChapterId": curChapter.ChapterId,
|
||||
"branchID": curChapter.BranchID,
|
||||
}
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), curChapter.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
newChaptConfig := this.module.configure.GetMainlineNextConfigData(curChapter.Intensity, curChapter.ChapterId+1) // 查下一章节
|
||||
if newChaptConfig != nil && newChaptConfig.Previoustage == curChapter.MainlineId {
|
||||
// 如果本章节打完 则创建新的章节
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = curChapter.ChapterId + 1
|
||||
_data.MainlineId = 0 // 第二章数据默认0
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
// 推送新的章节
|
||||
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
|
||||
} else { // 切换下个难度
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId+1), curChapter.Intensity)
|
||||
if node == nil && curChapter.Intensity < comm.MaxMainlineIntensity { // 配置文件校验
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_data.Intensity = curChapter.Intensity + 1 // 难度+1
|
||||
_mData[_data.Id] = _data
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
|
||||
}
|
||||
}
|
||||
// 发奖 (奖励数据还没配置,后续补充)
|
||||
code = this.module.DispenseRes(session, res, true)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{Data: curChapter})
|
||||
|
||||
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_moonfantasy,
|
||||
Leadpos: req.Leadpos,
|
||||
Teamids: req.Teamids,
|
||||
Mformat: node.FormatList,
|
||||
})
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Btype: record.Btype,
|
||||
Ptype: record.Ptype,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
}})
|
||||
return
|
||||
}
|
||||
|
114
modules/mainline/api_challengeover.go
Normal file
114
modules/mainline/api_challengeover.go
Normal file
@ -0,0 +1,114 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.MainlineChallengeOverReq) (code pb.ErrorCode) {
|
||||
if req.MainlineId == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
curChapter *pb.DBMainline // 当前章节信息
|
||||
bBranch bool // 当前挑战关卡是不是分支
|
||||
res []*cfg.Gameatn // 小章节奖励
|
||||
)
|
||||
res = make([]*cfg.Gameatn, 0)
|
||||
|
||||
code = this.ChallengeOverCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
// 校验关卡存不存在
|
||||
curChapter = this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||
if curChapter == nil {
|
||||
code = pb.ErrorCode_MainlineNotFound
|
||||
return
|
||||
}
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), curChapter.Intensity)
|
||||
if node == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
if node.Route == 1 {
|
||||
if node.Previoustage != curChapter.MainlineId {
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
} else {
|
||||
for _, v := range curChapter.BranchID {
|
||||
if v == int32(req.MainlineId) { // 重复挑战
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res = append(res, node.Award...)
|
||||
|
||||
curChapter.MainlineId = int32(req.MainlineId)
|
||||
if bBranch {
|
||||
curChapter.BranchID = append(curChapter.BranchID, int32(req.MainlineId)) // 记录分支关卡
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"mainlineId": req.MainlineId,
|
||||
"ChapterId": curChapter.ChapterId,
|
||||
"branchID": curChapter.BranchID,
|
||||
}
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), curChapter.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
newChaptConfig := this.module.modelMainline.checkNewCapter(curChapter.ChapterId+1, curChapter.Intensity, curChapter.MainlineId)
|
||||
if newChaptConfig != nil {
|
||||
// 如果本章节打完 则创建新的章节
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = curChapter.ChapterId + 1
|
||||
_data.MainlineId = 0 // 第二章数据默认0
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
// 推送新的章节
|
||||
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
|
||||
} else { // 切换下个难度
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId+1), curChapter.Intensity)
|
||||
if node == nil && curChapter.Intensity < comm.MaxMainlineIntensity { // 配置文件校验
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_data.Intensity = curChapter.Intensity + 1 // 难度+1
|
||||
_mData[_data.Id] = _data
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
|
||||
}
|
||||
}
|
||||
// 发奖
|
||||
code = this.module.DispenseRes(session, res, true)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: curChapter})
|
||||
return
|
||||
}
|
@ -33,6 +33,8 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
this._mapMainline = make(map[int64]*cfg.GameMainlineData, 0)
|
||||
this._mapMainlineNextC = make(map[int64]*cfg.GameMainlineData, 0)
|
||||
configure.RegisterConfigure(game_mainline, cfg.NewGameMainline, this.GetMainline)
|
||||
|
||||
this.module.modelMainline.checkNewCapter(1, 1, 110)
|
||||
return
|
||||
}
|
||||
|
||||
@ -45,7 +47,9 @@ func (this *configureComp) GetMainline() {
|
||||
this._mapMainline[int64(value.Id<<16)+int64(value.Intensity)] = value
|
||||
}
|
||||
for _, value := range configure.GetDataList() {
|
||||
this._mapMainlineNextC[int64(value.Intensity<<16)+int64(value.Chapter)] = value
|
||||
if _, ok := this._mapMainlineNextC[int64(value.Intensity<<16)+int64(value.Chapter)]; !ok {
|
||||
this._mapMainlineNextC[int64(value.Intensity<<16)+int64(value.Chapter)] = value
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -61,8 +65,8 @@ func (this *configureComp) GetMainlineConfigData(id, intensity int32) *cfg.GameM
|
||||
}
|
||||
|
||||
// intensity + chapter
|
||||
func (this *configureComp) GetMainlineNextConfigData(intensity, chapter int32) *cfg.GameMainlineData {
|
||||
return this._mapMainline[int64(intensity<<16)+int64(chapter)]
|
||||
func (this *configureComp) GetMainlineChapterConfigData(intensity, chapter int32) *cfg.GameMainlineData {
|
||||
return this._mapMainlineNextC[int64(intensity<<16)+int64(chapter)]
|
||||
}
|
||||
|
||||
//读取配置数据
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
type ModelMainline struct {
|
||||
@ -41,6 +42,19 @@ func (this *ModelMainline) addNewChapter(uId string, data map[string]interface{}
|
||||
return nil
|
||||
}
|
||||
|
||||
// check NewCapter
|
||||
func (this *ModelMainline) checkNewCapter(chapter, intensity, id int32) *cfg.GameMainlineData {
|
||||
conf := this.module.configure.GetMainlineChapter(chapter + 1)
|
||||
if conf == nil {
|
||||
return nil
|
||||
}
|
||||
newChaptConfig := this.module.configure.GetMainlineChapterConfigData(intensity, chapter+1) // 查下一章节
|
||||
if newChaptConfig.Previoustage == id {
|
||||
return newChaptConfig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取指定章节数据
|
||||
func (this *ModelMainline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
||||
data := &pb.DBMainline{}
|
@ -2,6 +2,7 @@ package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
@ -11,8 +12,10 @@ import (
|
||||
type Mainline struct {
|
||||
modules.ModuleBase
|
||||
modelMainline *ModelMainline
|
||||
service base.IRPCXService
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
battle comm.IBattle
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -56,3 +59,14 @@ func (this *Mainline) GetUsermainLineData(uid string) (mainlineId int32) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Mainline) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleChat); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
this.battle = module.(comm.IBattle)
|
||||
return
|
||||
}
|
||||
|
@ -188,18 +188,15 @@ func (x *BattleInfo) GetBuleflist() []*DBBattleFormt {
|
||||
return nil
|
||||
}
|
||||
|
||||
//战斗结果请求
|
||||
type BattleResultReq struct {
|
||||
//战报数据
|
||||
type BattleReport struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id
|
||||
Iswin bool `protobuf:"varint,2,opt,name=iswin,proto3" json:"iswin"` //是否胜利
|
||||
}
|
||||
|
||||
func (x *BattleResultReq) Reset() {
|
||||
*x = BattleResultReq{}
|
||||
func (x *BattleReport) Reset() {
|
||||
*x = BattleReport{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -207,13 +204,13 @@ func (x *BattleResultReq) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BattleResultReq) String() string {
|
||||
func (x *BattleReport) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BattleResultReq) ProtoMessage() {}
|
||||
func (*BattleReport) ProtoMessage() {}
|
||||
|
||||
func (x *BattleResultReq) ProtoReflect() protoreflect.Message {
|
||||
func (x *BattleReport) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -225,81 +222,11 @@ func (x *BattleResultReq) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BattleResultReq.ProtoReflect.Descriptor instead.
|
||||
func (*BattleResultReq) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use BattleReport.ProtoReflect.Descriptor instead.
|
||||
func (*BattleReport) Descriptor() ([]byte, []int) {
|
||||
return file_battle_battle_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *BattleResultReq) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BattleResultReq) GetIswin() bool {
|
||||
if x != nil {
|
||||
return x.Iswin
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
//战斗结果请求
|
||||
type BattleResultResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id
|
||||
Issucc bool `protobuf:"varint,2,opt,name=issucc,proto3" json:"issucc"` //是否生效
|
||||
}
|
||||
|
||||
func (x *BattleResultResp) Reset() {
|
||||
*x = BattleResultResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BattleResultResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BattleResultResp) ProtoMessage() {}
|
||||
|
||||
func (x *BattleResultResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_battle_battle_msg_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 BattleResultResp.ProtoReflect.Descriptor instead.
|
||||
func (*BattleResultResp) Descriptor() ([]byte, []int) {
|
||||
return file_battle_battle_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *BattleResultResp) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BattleResultResp) GetIssucc() bool {
|
||||
if x != nil {
|
||||
return x.Issucc
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_battle_battle_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_battle_battle_msg_proto_rawDesc = []byte{
|
||||
@ -329,15 +256,9 @@ var file_battle_battle_msg_proto_rawDesc = []byte{
|
||||
0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a,
|
||||
0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74,
|
||||
0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x37, 0x0a, 0x0f, 0x42,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69,
|
||||
0x73, 0x77, 0x69, 0x6e, 0x22, 0x3a, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75,
|
||||
0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x42,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -352,22 +273,21 @@ func file_battle_battle_msg_proto_rawDescGZIP() []byte {
|
||||
return file_battle_battle_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_battle_battle_msg_proto_goTypes = []interface{}{
|
||||
(*BattlePVEReq)(nil), // 0: BattlePVEReq
|
||||
(*BattleInfo)(nil), // 1: BattleInfo
|
||||
(*BattleResultReq)(nil), // 2: BattleResultReq
|
||||
(*BattleResultResp)(nil), // 3: BattleResultResp
|
||||
(PlayType)(0), // 4: PlayType
|
||||
(BattleType)(0), // 5: BattleType
|
||||
(*DBBattleFormt)(nil), // 6: DBBattleFormt
|
||||
(*BattlePVEReq)(nil), // 0: BattlePVEReq
|
||||
(*BattleInfo)(nil), // 1: BattleInfo
|
||||
(*BattleReport)(nil), // 2: BattleReport
|
||||
(PlayType)(0), // 3: PlayType
|
||||
(BattleType)(0), // 4: BattleType
|
||||
(*DBBattleFormt)(nil), // 5: DBBattleFormt
|
||||
}
|
||||
var file_battle_battle_msg_proto_depIdxs = []int32{
|
||||
4, // 0: BattlePVEReq.ptype:type_name -> PlayType
|
||||
5, // 1: BattleInfo.btype:type_name -> BattleType
|
||||
4, // 2: BattleInfo.ptype:type_name -> PlayType
|
||||
6, // 3: BattleInfo.redflist:type_name -> DBBattleFormt
|
||||
6, // 4: BattleInfo.buleflist:type_name -> DBBattleFormt
|
||||
3, // 0: BattlePVEReq.ptype:type_name -> PlayType
|
||||
4, // 1: BattleInfo.btype:type_name -> BattleType
|
||||
3, // 2: BattleInfo.ptype:type_name -> PlayType
|
||||
5, // 3: BattleInfo.redflist:type_name -> DBBattleFormt
|
||||
5, // 4: BattleInfo.buleflist:type_name -> DBBattleFormt
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
@ -407,19 +327,7 @@ func file_battle_battle_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_battle_battle_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BattleResultReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_battle_battle_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BattleResultResp); i {
|
||||
switch v := v.(*BattleReport); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -437,7 +345,7 @@ func file_battle_battle_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_battle_battle_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -208,8 +208,10 @@ type MainlineChallengeReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ChapterObj string `protobuf:"bytes,1,opt,name=chapterObj,proto3" json:"chapterObj"` // 章节唯一对象id
|
||||
MainlineId uint32 `protobuf:"varint,2,opt,name=mainlineId,proto3" json:"mainlineId"` // 小关ID
|
||||
ChapterObj string `protobuf:"bytes,1,opt,name=chapterObj,proto3" json:"chapterObj"` // 章节唯一对象id
|
||||
MainlineId uint32 `protobuf:"varint,2,opt,name=mainlineId,proto3" json:"mainlineId"` // 小关ID
|
||||
Leadpos int32 `protobuf:"varint,3,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
|
||||
Teamids []string `protobuf:"bytes,4,rep,name=teamids,proto3" json:"teamids"` //阵容信息
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeReq) Reset() {
|
||||
@ -258,12 +260,26 @@ func (x *MainlineChallengeReq) GetMainlineId() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeReq) GetLeadpos() int32 {
|
||||
if x != nil {
|
||||
return x.Leadpos
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeReq) GetTeamids() []string {
|
||||
if x != nil {
|
||||
return x.Teamids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MainlineChallengeResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBMainline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||
Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeResp) Reset() {
|
||||
@ -298,7 +314,118 @@ func (*MainlineChallengeResp) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeResp) GetData() *DBMainline {
|
||||
func (x *MainlineChallengeResp) GetInfo() *BattleInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 客户端通知服务器打赢了
|
||||
type MainlineChallengeOverReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ChapterObj string `protobuf:"bytes,1,opt,name=chapterObj,proto3" json:"chapterObj"` // 章节唯一对象id
|
||||
MainlineId uint32 `protobuf:"varint,2,opt,name=mainlineId,proto3" json:"mainlineId"` // 小关ID
|
||||
Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverReq) Reset() {
|
||||
*x = MainlineChallengeOverReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MainlineChallengeOverReq) ProtoMessage() {}
|
||||
|
||||
func (x *MainlineChallengeOverReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[6]
|
||||
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 MainlineChallengeOverReq.ProtoReflect.Descriptor instead.
|
||||
func (*MainlineChallengeOverReq) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverReq) GetChapterObj() string {
|
||||
if x != nil {
|
||||
return x.ChapterObj
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverReq) GetMainlineId() uint32 {
|
||||
if x != nil {
|
||||
return x.MainlineId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverReq) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MainlineChallengeOverResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBMainline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverResp) Reset() {
|
||||
*x = MainlineChallengeOverResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MainlineChallengeOverResp) ProtoMessage() {}
|
||||
|
||||
func (x *MainlineChallengeOverResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[7]
|
||||
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 MainlineChallengeOverResp.ProtoReflect.Descriptor instead.
|
||||
func (*MainlineChallengeOverResp) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *MainlineChallengeOverResp) GetData() *DBMainline {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
@ -317,7 +444,7 @@ type MainlineNewChapterPush struct {
|
||||
func (x *MainlineNewChapterPush) Reset() {
|
||||
*x = MainlineNewChapterPush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[6]
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -330,7 +457,7 @@ func (x *MainlineNewChapterPush) String() string {
|
||||
func (*MainlineNewChapterPush) ProtoMessage() {}
|
||||
|
||||
func (x *MainlineNewChapterPush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[6]
|
||||
mi := &file_mainline_mainline_msg_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -343,7 +470,7 @@ func (x *MainlineNewChapterPush) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MainlineNewChapterPush.ProtoReflect.Descriptor instead.
|
||||
func (*MainlineNewChapterPush) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{6}
|
||||
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *MainlineNewChapterPush) GetData() *DBMainline {
|
||||
@ -359,26 +486,43 @@ var file_mainline_mainline_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22,
|
||||
0x36, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e,
|
||||
0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x36, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x22,
|
||||
0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65,
|
||||
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x14, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65,
|
||||
0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62,
|
||||
0x6a, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49,
|
||||
0x64, 0x22, 0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61,
|
||||
0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
|
||||
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65,
|
||||
0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
|
||||
0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x22, 0x36, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52,
|
||||
0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70,
|
||||
0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68,
|
||||
0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x22, 0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43,
|
||||
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63,
|
||||
0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x12, 0x1e, 0x0a, 0x0a, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6c,
|
||||
0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65,
|
||||
0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x22,
|
||||
0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x18, 0x4d, 0x61,
|
||||
0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f,
|
||||
0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65,
|
||||
0x72, 0x4f, 0x62, 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x70,
|
||||
0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69,
|
||||
0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x3c, 0x0a,
|
||||
0x19, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e,
|
||||
0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x16, 0x4d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x65, 0x77, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65,
|
||||
@ -400,27 +544,33 @@ func file_mainline_mainline_msg_proto_rawDescGZIP() []byte {
|
||||
return file_mainline_mainline_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mainline_mainline_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_mainline_mainline_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_mainline_mainline_msg_proto_goTypes = []interface{}{
|
||||
(*MainlineGetListReq)(nil), // 0: MainlineGetListReq
|
||||
(*MainlineGetListResp)(nil), // 1: MainlineGetListResp
|
||||
(*MainlineGetRewardReq)(nil), // 2: MainlineGetRewardReq
|
||||
(*MainlineGetRewardResp)(nil), // 3: MainlineGetRewardResp
|
||||
(*MainlineChallengeReq)(nil), // 4: MainlineChallengeReq
|
||||
(*MainlineChallengeResp)(nil), // 5: MainlineChallengeResp
|
||||
(*MainlineNewChapterPush)(nil), // 6: MainlineNewChapterPush
|
||||
(*DBMainline)(nil), // 7: DBMainline
|
||||
(*MainlineGetListReq)(nil), // 0: MainlineGetListReq
|
||||
(*MainlineGetListResp)(nil), // 1: MainlineGetListResp
|
||||
(*MainlineGetRewardReq)(nil), // 2: MainlineGetRewardReq
|
||||
(*MainlineGetRewardResp)(nil), // 3: MainlineGetRewardResp
|
||||
(*MainlineChallengeReq)(nil), // 4: MainlineChallengeReq
|
||||
(*MainlineChallengeResp)(nil), // 5: MainlineChallengeResp
|
||||
(*MainlineChallengeOverReq)(nil), // 6: MainlineChallengeOverReq
|
||||
(*MainlineChallengeOverResp)(nil), // 7: MainlineChallengeOverResp
|
||||
(*MainlineNewChapterPush)(nil), // 8: MainlineNewChapterPush
|
||||
(*DBMainline)(nil), // 9: DBMainline
|
||||
(*BattleInfo)(nil), // 10: BattleInfo
|
||||
(*BattleReport)(nil), // 11: BattleReport
|
||||
}
|
||||
var file_mainline_mainline_msg_proto_depIdxs = []int32{
|
||||
7, // 0: MainlineGetListResp.data:type_name -> DBMainline
|
||||
7, // 1: MainlineGetRewardResp.data:type_name -> DBMainline
|
||||
7, // 2: MainlineChallengeResp.data:type_name -> DBMainline
|
||||
7, // 3: MainlineNewChapterPush.data:type_name -> DBMainline
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
9, // 0: MainlineGetListResp.data:type_name -> DBMainline
|
||||
9, // 1: MainlineGetRewardResp.data:type_name -> DBMainline
|
||||
10, // 2: MainlineChallengeResp.info:type_name -> BattleInfo
|
||||
11, // 3: MainlineChallengeOverReq.report:type_name -> BattleReport
|
||||
9, // 4: MainlineChallengeOverResp.data:type_name -> DBMainline
|
||||
9, // 5: MainlineNewChapterPush.data:type_name -> DBMainline
|
||||
6, // [6:6] is the sub-list for method output_type
|
||||
6, // [6:6] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mainline_mainline_msg_proto_init() }
|
||||
@ -429,6 +579,7 @@ func file_mainline_mainline_msg_proto_init() {
|
||||
return
|
||||
}
|
||||
file_mainline_mainline_db_proto_init()
|
||||
file_battle_battle_msg_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_mainline_mainline_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainlineGetListReq); i {
|
||||
@ -503,6 +654,30 @@ func file_mainline_mainline_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_mainline_mainline_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainlineChallengeOverReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mainline_mainline_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainlineChallengeOverResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mainline_mainline_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MainlineNewChapterPush); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -521,7 +696,7 @@ func file_mainline_mainline_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_mainline_mainline_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -310,6 +310,7 @@ type VikingRankListReq struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BoosType int32 `protobuf:"varint,1,opt,name=boosType,proto3" json:"boosType"` // boss 类型
|
||||
Friend bool `protobuf:"varint,2,opt,name=friend,proto3" json:"friend"` // 是否是好友榜
|
||||
}
|
||||
|
||||
func (x *VikingRankListReq) Reset() {
|
||||
@ -351,6 +352,13 @@ func (x *VikingRankListReq) GetBoosType() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *VikingRankListReq) GetFriend() bool {
|
||||
if x != nil {
|
||||
return x.Friend
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type VikingRankListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -422,15 +430,16 @@ var file_viking_viking_msg_proto_rawDesc = []byte{
|
||||
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
|
||||
0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23,
|
||||
0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
|
||||
0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61,
|
||||
0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65,
|
||||
0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||
0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
Loading…
Reference in New Issue
Block a user