新主线
This commit is contained in:
parent
4d0a507cec
commit
784669b4c3
@ -52,7 +52,6 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
||||
}
|
||||
}
|
||||
if curChapter.Ps != 0 {
|
||||
|
||||
if code = this.module.ConsumeRes(session, node.PsMg, true); code != pb.ErrorCode_Success { // 扣1点
|
||||
return
|
||||
}
|
||||
|
34
modules/mline/api.go
Normal file
34
modules/mline/api.go
Normal file
@ -0,0 +1,34 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
const (
|
||||
MainlineGetListResp = "getlist"
|
||||
MainlineChallengeResp = "challenge"
|
||||
MainlineChallengeOverResp = "challengeover"
|
||||
MainlineGetRewardResp = "getreward"
|
||||
MainlineNewChapterPush = "newchapter"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service core.IService
|
||||
module *Mainline
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*Mainline)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
|
||||
return
|
||||
}
|
108
modules/mline/api_challenge.go
Normal file
108
modules/mline/api_challenge.go
Normal file
@ -0,0 +1,108 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
|
||||
if req.MainlineId == 0 || req.ChapterObj == "" || req.Leadpos >= 5 || len(req.Teamids) != 5 || req.Leadpos < 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
curChapter *pb.DBMainline // 当前章节信息
|
||||
ps int32
|
||||
psAnt *cfg.Gameatn
|
||||
)
|
||||
|
||||
code = this.ChallengeCheck(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
|
||||
}
|
||||
|
||||
for _, v := range curChapter.BranchID {
|
||||
if v == int32(req.MainlineId) { // 重复挑战
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
if v == int32(req.MainlineId) {
|
||||
break
|
||||
}
|
||||
}
|
||||
if curChapter.Ps != 0 {
|
||||
if code = this.module.ConsumeRes(session, node.PsMg, true); code != pb.ErrorCode_Success { // 扣1点
|
||||
return
|
||||
}
|
||||
} else {
|
||||
for _, v := range node.PsConsume {
|
||||
if v.A == "attr" && v.T == "ps" {
|
||||
ps += v.N
|
||||
}
|
||||
}
|
||||
for _, v := range node.PsMg {
|
||||
if v.A == "attr" && v.T == "ps" {
|
||||
ps += v.N
|
||||
}
|
||||
}
|
||||
psAnt = &cfg.Gameatn{
|
||||
A: "attr",
|
||||
T: "ps",
|
||||
N: ps,
|
||||
}
|
||||
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{psAnt}, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
curChapter.Ps = ps
|
||||
update := map[string]interface{}{
|
||||
"ps": ps,
|
||||
}
|
||||
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), curChapter.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_mainline,
|
||||
Title: "",
|
||||
Format: &pb.BattleFormation{
|
||||
Leadpos: req.Leadpos,
|
||||
Format: req.Teamids,
|
||||
},
|
||||
Mformat: node.FormatList,
|
||||
})
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{
|
||||
Info: &pb.BattleInfo{Id: record.Id, Title: record.Title, Btype: record.Btype, Ptype: record.Ptype, RedCompId: record.RedCompId, Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist},
|
||||
ChapterObj: req.ChapterObj,
|
||||
MainlineId: req.GetMainlineId(),
|
||||
})
|
||||
return
|
||||
}
|
153
modules/mline/api_challengeover.go
Normal file
153
modules/mline/api_challengeover.go
Normal file
@ -0,0 +1,153 @@
|
||||
package mline
|
||||
|
||||
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 (
|
||||
mainline *pb.DBMainline // 当前章节信息
|
||||
res []*cfg.Gameatn // 小章节奖励
|
||||
isWin bool
|
||||
user *pb.DBUser
|
||||
hero []string //新的英雄
|
||||
newhero []string //新的英雄
|
||||
)
|
||||
res = make([]*cfg.Gameatn, 0)
|
||||
hero = make([]string, 0)
|
||||
newhero = make([]string, 0)
|
||||
code = this.ChallengeOverCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
// 校验关卡存不存在
|
||||
mainline = this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||
if mainline == nil {
|
||||
code = pb.ErrorCode_MainlineNotFound
|
||||
return
|
||||
}
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), mainline.Intensity)
|
||||
if node == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
for _, v := range mainline.BranchID {
|
||||
if v == int32(req.MainlineId) { // 重复挑战
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
}
|
||||
// 校验通过
|
||||
|
||||
code, isWin = this.module.battle.CheckBattleReport(session, req.Report)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
if !isWin { // 战斗失败直接返回
|
||||
// 返还
|
||||
mainline.Ps = 0
|
||||
this.module.modelMainline.modifyMainlineData(session.GetUserId(), mainline.Id, map[string]interface{}{
|
||||
"ps": 0,
|
||||
})
|
||||
|
||||
if code = this.module.DispenseRes(session, node.PsConsume, true); code != pb.ErrorCode_Success { // 返还预扣体力
|
||||
return
|
||||
}
|
||||
code = pb.ErrorCode_BattleNoWin
|
||||
return
|
||||
}
|
||||
|
||||
res = append(res, node.Award...)
|
||||
for _, v := range node.Award {
|
||||
if v.A == comm.HeroType {
|
||||
hero = append(hero, v.T)
|
||||
}
|
||||
}
|
||||
if len(hero) > 0 {
|
||||
ishave := this.module.ModuleUser.CheckTujianHero(session, hero)
|
||||
for i, v := range ishave {
|
||||
if !v {
|
||||
newhero = append(newhero, hero[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
user = this.module.ModuleUser.GetUser(session.GetUserId())
|
||||
mainline.MainlineId = int32(req.MainlineId)
|
||||
mainline.BranchID = append(mainline.BranchID, int32(req.MainlineId))
|
||||
mainline.Ps = 0 // 重置预扣体力
|
||||
update := map[string]interface{}{
|
||||
"mainlineId": req.MainlineId,
|
||||
"chapterId": mainline.ChapterId,
|
||||
"branchID": mainline.BranchID,
|
||||
"ps": 0,
|
||||
}
|
||||
if node.Episodetype == comm.MainLineBoss { // 打完boss 设置领奖状态
|
||||
update["awaredID"] = pb.AwaredType_TypeAvailable
|
||||
mainline.AwaredID = pb.AwaredType_TypeAvailable
|
||||
}
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), mainline.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
if node.Episodetype == comm.MainLineBoss { // 挑战完成 boss关
|
||||
_data := &pb.DBMainline{}
|
||||
conf := this.module.configure.GetMainlineChapter(mainline.ChapterId + 1)
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = mainline.ChapterId + 1
|
||||
_data.Intensity = mainline.Intensity
|
||||
if conf == nil { // 这里就是切换下一个难度了
|
||||
if mainline.Intensity < comm.MaxMainlineIntensity {
|
||||
_data.Intensity = mainline.Intensity + 1 // 难度+1
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
}
|
||||
}
|
||||
|
||||
_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}) // 推送新的章节
|
||||
|
||||
}
|
||||
// 发奖
|
||||
if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
|
||||
this.module.Debugf("DispenseRes err:+%v", res)
|
||||
}
|
||||
// 加经验
|
||||
if node.Episodetype != 5 && node.Episodetype != 7 {
|
||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
if node.Exp > 0 && !v.Ishelp { // 助战英雄不加经验
|
||||
this.module.ModuleHero.AddHeroExp(session, v.Oid, node.Exp)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline, Newheros: newhero, Olv: user.Lv})
|
||||
// 主线任务统计 Rtype60
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.MainlineId))
|
||||
return
|
||||
}
|
65
modules/mline/api_getReward.go
Normal file
65
modules/mline/api_getReward.go
Normal file
@ -0,0 +1,65 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode) {
|
||||
if req.ChapterObj == "" {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
rsp := &pb.MainlineGetRewardResp{}
|
||||
|
||||
code = this.GetRewardCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
_obj := this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||
if _obj == nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if _obj.AwaredID == pb.AwaredType_TypeReceived {
|
||||
code = pb.ErrorCode_MainlineRepeatReward // 重复领奖
|
||||
return
|
||||
}
|
||||
if _obj.AwaredID != pb.AwaredType_TypeAvailable {
|
||||
code = pb.ErrorCode_MainlineCompleteReward // 通关才能领奖
|
||||
return
|
||||
}
|
||||
// 校验是不是通关了
|
||||
chaptConfig := this.module.configure.GetMainlineChapter(int32(_obj.ChapterId)) // 根据配置文件找
|
||||
if chaptConfig == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
|
||||
_obj.AwaredID = pb.AwaredType_TypeReceived // 设置领奖标记
|
||||
update := map[string]interface{}{
|
||||
"awaredID": _obj.AwaredID,
|
||||
}
|
||||
// 发奖
|
||||
code = this.module.DispenseRes(session, chaptConfig.Award, true)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), _obj.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
rsp.Data = _obj
|
||||
session.SendMsg(string(this.module.GetType()), MainlineGetRewardResp, rsp)
|
||||
return
|
||||
}
|
47
modules/mline/api_getlist.go
Normal file
47
modules/mline/api_getlist.go
Normal file
@ -0,0 +1,47 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
rsp := &pb.MainlineGetListResp{}
|
||||
|
||||
code = this.GetListCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
list, err := this.module.modelMainline.getMainlineList(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if len(list) == 0 { // 如果数量为0 则默认创建一条数据
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_data.Intensity = 1 // 难度1
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
list = append(list, _data)
|
||||
}
|
||||
rsp.Data = list
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), MainlineGetListResp, &pb.MainlineGetListResp{Data: rsp.Data})
|
||||
return
|
||||
}
|
92
modules/mline/comp_configure.go
Normal file
92
modules/mline/comp_configure.go
Normal file
@ -0,0 +1,92 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const (
|
||||
game_mainlinechapter = "game_mainlinechapter.json"
|
||||
game_mainline = "game_mainline.json"
|
||||
)
|
||||
|
||||
///配置管理基础组件
|
||||
type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
module *Mainline
|
||||
hlock sync.RWMutex
|
||||
_mapMainline map[int64]*cfg.GameMainlineData
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
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)
|
||||
this.module = module.(*Mainline)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
game_mainlinechapter: cfg.NewGameMainlineChapter,
|
||||
})
|
||||
this._mapMainline = make(map[int64]*cfg.GameMainlineData, 0)
|
||||
configure.RegisterConfigure(game_mainline, cfg.NewGameMainline, this.GetMainline)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetMainline() {
|
||||
if v, err := this.GetConfigure(game_mainline); err == nil {
|
||||
if configure, ok := v.(*cfg.GameMainline); ok {
|
||||
this.hlock.Lock()
|
||||
defer this.hlock.Unlock()
|
||||
for _, value := range configure.GetDataList() {
|
||||
this._mapMainline[int64(value.Id<<16)+int64(value.Intensity)] = value
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
log.Errorf("get game_mainline conf err:%v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// id + intensity
|
||||
func (this *configureComp) GetMainlineConfigData(id, intensity int32) *cfg.GameMainlineData {
|
||||
return this._mapMainline[int64(id<<16)+int64(intensity)]
|
||||
}
|
||||
|
||||
//读取配置数据
|
||||
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||
return configure.GetConfigure(name)
|
||||
|
||||
}
|
||||
|
||||
func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.GameMainlineChapterData) {
|
||||
if v, err := this.GetConfigure(game_mainlinechapter); err != nil {
|
||||
this.module.Errorf("get global conf err:%v", err)
|
||||
return
|
||||
} else {
|
||||
var (
|
||||
configure *cfg.GameMainlineChapter
|
||||
ok bool
|
||||
)
|
||||
if configure, ok = v.(*cfg.GameMainlineChapter); !ok {
|
||||
this.module.Errorf("%T no is *cfg.Game_MainlineChapterData", v)
|
||||
return
|
||||
}
|
||||
|
||||
data = configure.Get(int(id - 1))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取章节数量
|
||||
func (this *configureComp) GetMaxMainlineChapter() int32 {
|
||||
if v, err := this.GetConfigure(game_mainlinechapter); err == nil {
|
||||
if configure, ok := v.(*cfg.GameMainlineChapter); ok {
|
||||
return int32(len(configure.GetDataList()))
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
63
modules/mline/model_mainline.go
Normal file
63
modules/mline/model_mainline.go
Normal file
@ -0,0 +1,63 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
type ModelMainline struct {
|
||||
modules.MCompModel
|
||||
module *Mainline
|
||||
}
|
||||
|
||||
func (this *ModelMainline) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.TableName = comm.TableMainline
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.module = module.(*Mainline)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取章节信息
|
||||
func (this *ModelMainline) getMainlineList(uid string) (storys []*pb.DBMainline, err error) {
|
||||
storys = make([]*pb.DBMainline, 0)
|
||||
err = this.GetList(uid, &storys)
|
||||
return
|
||||
}
|
||||
|
||||
// 修改章节信息
|
||||
func (this *ModelMainline) modifyMainlineData(uid string, objid string, data map[string]interface{}) error {
|
||||
return this.module.modelMainline.ChangeList(uid, objid, data)
|
||||
}
|
||||
|
||||
// 增加新的章节数据
|
||||
func (this *ModelMainline) addNewChapter(uId string, data map[string]interface{}) (err error) {
|
||||
|
||||
if err = this.AddLists(uId, data); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取指定章节数据
|
||||
func (this *ModelMainline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
||||
data := &pb.DBMainline{}
|
||||
err := this.module.modelMainline.GetListObj(uid, obj, data)
|
||||
if err != nil {
|
||||
this.module.Errorf("%v", err)
|
||||
return nil
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// 增加新的章节数据
|
||||
func (this *ModelMainline) cleanChapter(uId string) (err error) {
|
||||
|
||||
if err = this.DelByUId(uId); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}
|
201
modules/mline/module.go
Normal file
201
modules/mline/module.go
Normal file
@ -0,0 +1,201 @@
|
||||
package mline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"sort"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
type Mainline struct {
|
||||
modules.ModuleBase
|
||||
modelMainline *ModelMainline
|
||||
service core.IService
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
battle comm.IBattle
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
return &Mainline{}
|
||||
}
|
||||
|
||||
func (this *Mainline) GetType() core.M_Modules {
|
||||
return comm.ModuleMainline
|
||||
}
|
||||
|
||||
func (this *Mainline) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Mainline) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.modelMainline = this.RegisterComp(new(ModelMainline)).(*ModelMainline)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
||||
|
||||
// 接口信息 给其他模块调用 用来修改主线关卡信息
|
||||
func (this *Mainline) ModifyMainlineData(uid string, id int32) (code pb.ErrorCode) {
|
||||
|
||||
conf := this.configure.GetMainlineConfigData(id, 1)
|
||||
list, err := this.modelMainline.getMainlineList(uid)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
for _, v := range list {
|
||||
if v.ChapterId == conf.Chapter {
|
||||
data := make(map[string]interface{}, 0)
|
||||
data["mainlineId"] = id
|
||||
data["chapterId"] = v.ChapterId
|
||||
this.modelMainline.modifyMainlineData(uid, v.Id, data)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
//add
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = conf.Chapter
|
||||
_data.MainlineId = conf.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = 1 // 难度1
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Mainline) GetUsermainLineData(uid string) (mainlineId int32) {
|
||||
|
||||
_szData, err := this.modelMainline.getMainlineList(uid)
|
||||
if err == nil {
|
||||
sort.SliceStable(_szData, func(i, j int) bool { // 排序
|
||||
return _szData[i].ChapterId > _szData[j].ChapterId
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Mainline) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
this.battle = module.(comm.IBattle)
|
||||
return
|
||||
}
|
||||
|
||||
//红点查询
|
||||
func (this *Mainline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
||||
reddot = make(map[comm.ReddotType]bool)
|
||||
for _, v := range rid {
|
||||
if v == comm.Reddot5 {
|
||||
reddot[comm.Reddot5] = this.CheckPoint(session.GetUserId())
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 红点检测
|
||||
func (this *Mainline) CheckPoint(uid string) bool {
|
||||
list, err := this.modelMainline.getMainlineList(uid)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
for _, v := range list {
|
||||
conf := this.configure.GetMainlineChapter(v.ChapterId)
|
||||
if conf == nil {
|
||||
continue
|
||||
}
|
||||
if len(conf.Episode) != len(v.BranchID) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 参数 难度 + 关卡id
|
||||
func (this *Mainline) ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode) {
|
||||
|
||||
conf := this.configure.GetMainlineConfigData(id, nandu)
|
||||
if conf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound // 找不到配置
|
||||
return
|
||||
}
|
||||
// 已现在设置的为准 删除之前的所有数据
|
||||
this.modelMainline.cleanChapter(uid)
|
||||
// 获取当前的章节数据
|
||||
jumpCap := conf.Chapter
|
||||
// 先加所有难度小于1 的章节
|
||||
for ndIndex := 1; ndIndex <= int(nandu)-1; ndIndex++ {
|
||||
max := this.configure.GetMaxMainlineChapter()
|
||||
for i := 1; i <= int(max); i++ {
|
||||
confCap := this.configure.GetMainlineChapter(int32(i))
|
||||
//_conf := this.configure.GetMainlineConfigData(int32(i), int32(ndIndex))
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = int32(i)
|
||||
_data.MainlineId = confCap.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = int32(ndIndex) // 难度1
|
||||
|
||||
for _, v := range confCap.Episode {
|
||||
_data.BranchID = append(_data.BranchID, v)
|
||||
}
|
||||
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
}
|
||||
}
|
||||
// 加当前难度 的章节数据
|
||||
for i := 1; i <= int(jumpCap-1); i++ {
|
||||
confCap := this.configure.GetMainlineChapter(int32(i))
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = int32(i)
|
||||
_data.MainlineId = confCap.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = int32(nandu) // 难度1
|
||||
for _, v := range confCap.Episode {
|
||||
_data.BranchID = append(_data.BranchID, v)
|
||||
}
|
||||
_mData[_data.Id] = _data
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
}
|
||||
// 加当前难度 当前章节的前置关卡数据
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = conf.Chapter
|
||||
_data.MainlineId = conf.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = int32(nandu) // 难度1
|
||||
confCap := this.configure.GetMainlineChapter(int32(conf.Chapter))
|
||||
for _, v := range confCap.Episode {
|
||||
if v <= id {
|
||||
_data.BranchID = append(_data.BranchID, v)
|
||||
}
|
||||
}
|
||||
_mData[_data.Id] = _data
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
|
||||
return
|
||||
}
|
208
pb/mline_db.pb.go
Normal file
208
pb/mline_db.pb.go
Normal file
@ -0,0 +1,208 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: mline/mline_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 DBMline 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" bson:"uid"` //用户ID
|
||||
ChapterId int32 `protobuf:"varint,3,opt,name=chapterId,proto3" json:"chapterId" bson:"chapterId"` //章节ID
|
||||
MainlineId int32 `protobuf:"varint,4,opt,name=mainlineId,proto3" json:"mainlineId" bson:"mainlineId"` //主线关卡ID
|
||||
AwaredID int32 `protobuf:"varint,5,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //是否领奖(设置int是考虑后续扩展有多个宝箱情况)
|
||||
BranchID []int32 `protobuf:"varint,6,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录所有通关的关卡数据
|
||||
Intensity int32 `protobuf:"varint,7,opt,name=intensity,proto3" json:"intensity"` // 难度
|
||||
Ps int32 `protobuf:"varint,8,opt,name=ps,proto3" json:"ps"` // 预扣的体力
|
||||
}
|
||||
|
||||
func (x *DBMline) Reset() {
|
||||
*x = DBMline{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBMline) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBMline) ProtoMessage() {}
|
||||
|
||||
func (x *DBMline) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_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 DBMline.ProtoReflect.Descriptor instead.
|
||||
func (*DBMline) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBMline) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBMline) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBMline) GetChapterId() int32 {
|
||||
if x != nil {
|
||||
return x.ChapterId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBMline) GetMainlineId() int32 {
|
||||
if x != nil {
|
||||
return x.MainlineId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBMline) GetAwaredID() int32 {
|
||||
if x != nil {
|
||||
return x.AwaredID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBMline) GetBranchID() []int32 {
|
||||
if x != nil {
|
||||
return x.BranchID
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBMline) GetIntensity() int32 {
|
||||
if x != nil {
|
||||
return x.Intensity
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBMline) GetPs() int32 {
|
||||
if x != nil {
|
||||
return x.Ps
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_mline_mline_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mline_mline_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x62,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x07, 0x44, 0x42, 0x4d, 0x6c, 0x69,
|
||||
0x6e, 0x65, 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, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49,
|
||||
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72,
|
||||
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05,
|
||||
0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e,
|
||||
0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x73, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x70, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_mline_mline_db_proto_rawDescOnce sync.Once
|
||||
file_mline_mline_db_proto_rawDescData = file_mline_mline_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_mline_mline_db_proto_rawDescGZIP() []byte {
|
||||
file_mline_mline_db_proto_rawDescOnce.Do(func() {
|
||||
file_mline_mline_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_mline_mline_db_proto_rawDescData)
|
||||
})
|
||||
return file_mline_mline_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mline_mline_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_mline_mline_db_proto_goTypes = []interface{}{
|
||||
(*DBMline)(nil), // 0: DBMline
|
||||
}
|
||||
var file_mline_mline_db_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mline_mline_db_proto_init() }
|
||||
func file_mline_mline_db_proto_init() {
|
||||
if File_mline_mline_db_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_mline_mline_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBMline); 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_mline_mline_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_mline_mline_db_proto_goTypes,
|
||||
DependencyIndexes: file_mline_mline_db_proto_depIdxs,
|
||||
MessageInfos: file_mline_mline_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mline_mline_db_proto = out.File
|
||||
file_mline_mline_db_proto_rawDesc = nil
|
||||
file_mline_mline_db_proto_goTypes = nil
|
||||
file_mline_mline_db_proto_depIdxs = nil
|
||||
}
|
746
pb/mline_msg.pb.go
Normal file
746
pb/mline_msg.pb.go
Normal file
@ -0,0 +1,746 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: mline/mline_msg.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 MlineGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *MlineGetListReq) Reset() {
|
||||
*x = MlineGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineGetListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *MlineGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_msg_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 MlineGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*MlineGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// 返回进度信息
|
||||
type MlineGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*DBMline `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *MlineGetListResp) Reset() {
|
||||
*x = MlineGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineGetListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *MlineGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_msg_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 MlineGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*MlineGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *MlineGetListResp) GetData() []*DBMline {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 领取关卡宝箱
|
||||
type MlineGetRewardReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ChapterObj string `protobuf:"bytes,1,opt,name=chapterObj,proto3" json:"chapterObj"` // 章节唯一对象id
|
||||
}
|
||||
|
||||
func (x *MlineGetRewardReq) Reset() {
|
||||
*x = MlineGetRewardReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineGetRewardReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineGetRewardReq) ProtoMessage() {}
|
||||
|
||||
func (x *MlineGetRewardReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_msg_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 MlineGetRewardReq.ProtoReflect.Descriptor instead.
|
||||
func (*MlineGetRewardReq) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *MlineGetRewardReq) GetChapterObj() string {
|
||||
if x != nil {
|
||||
return x.ChapterObj
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MlineGetRewardResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||
}
|
||||
|
||||
func (x *MlineGetRewardResp) Reset() {
|
||||
*x = MlineGetRewardResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineGetRewardResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineGetRewardResp) ProtoMessage() {}
|
||||
|
||||
func (x *MlineGetRewardResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_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 MlineGetRewardResp.ProtoReflect.Descriptor instead.
|
||||
func (*MlineGetRewardResp) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *MlineGetRewardResp) GetData() *DBMline {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 挑战关卡
|
||||
type MlineChallengeReq 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
|
||||
Leadpos int32 `protobuf:"varint,3,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
|
||||
Teamids []string `protobuf:"bytes,4,rep,name=teamids,proto3" json:"teamids"` //阵容信息
|
||||
}
|
||||
|
||||
func (x *MlineChallengeReq) Reset() {
|
||||
*x = MlineChallengeReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineChallengeReq) ProtoMessage() {}
|
||||
|
||||
func (x *MlineChallengeReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_msg_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 MlineChallengeReq.ProtoReflect.Descriptor instead.
|
||||
func (*MlineChallengeReq) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeReq) GetChapterObj() string {
|
||||
if x != nil {
|
||||
return x.ChapterObj
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MlineChallengeReq) GetMainlineId() uint32 {
|
||||
if x != nil {
|
||||
return x.MainlineId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MlineChallengeReq) GetLeadpos() int32 {
|
||||
if x != nil {
|
||||
return x.Leadpos
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MlineChallengeReq) GetTeamids() []string {
|
||||
if x != nil {
|
||||
return x.Teamids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MlineChallengeResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
|
||||
ChapterObj string `protobuf:"bytes,2,opt,name=chapterObj,proto3" json:"chapterObj"` // 章节唯一对象id
|
||||
MainlineId uint32 `protobuf:"varint,3,opt,name=mainlineId,proto3" json:"mainlineId"` // 小关ID
|
||||
}
|
||||
|
||||
func (x *MlineChallengeResp) Reset() {
|
||||
*x = MlineChallengeResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineChallengeResp) ProtoMessage() {}
|
||||
|
||||
func (x *MlineChallengeResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[5]
|
||||
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 MlineChallengeResp.ProtoReflect.Descriptor instead.
|
||||
func (*MlineChallengeResp) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeResp) GetInfo() *BattleInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MlineChallengeResp) GetChapterObj() string {
|
||||
if x != nil {
|
||||
return x.ChapterObj
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MlineChallengeResp) GetMainlineId() uint32 {
|
||||
if x != nil {
|
||||
return x.MainlineId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 客户端通知服务器打赢了
|
||||
type MlineChallengeOverReq 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 *MlineChallengeOverReq) Reset() {
|
||||
*x = MlineChallengeOverReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineChallengeOverReq) ProtoMessage() {}
|
||||
|
||||
func (x *MlineChallengeOverReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_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 MlineChallengeOverReq.ProtoReflect.Descriptor instead.
|
||||
func (*MlineChallengeOverReq) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverReq) GetChapterObj() string {
|
||||
if x != nil {
|
||||
return x.ChapterObj
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverReq) GetMainlineId() uint32 {
|
||||
if x != nil {
|
||||
return x.MainlineId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverReq) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MlineChallengeOverResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||
Newheros []string `protobuf:"bytes,2,rep,name=newheros,proto3" json:"newheros"` //获得的新英雄
|
||||
Olv int32 `protobuf:"varint,3,opt,name=olv,proto3" json:"olv"` //以前的等级
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverResp) Reset() {
|
||||
*x = MlineChallengeOverResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineChallengeOverResp) ProtoMessage() {}
|
||||
|
||||
func (x *MlineChallengeOverResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_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 MlineChallengeOverResp.ProtoReflect.Descriptor instead.
|
||||
func (*MlineChallengeOverResp) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverResp) GetData() *DBMline {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverResp) GetNewheros() []string {
|
||||
if x != nil {
|
||||
return x.Newheros
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MlineChallengeOverResp) GetOlv() int32 {
|
||||
if x != nil {
|
||||
return x.Olv
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 推送新章节
|
||||
type MlineNewChapterPush struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *MlineNewChapterPush) Reset() {
|
||||
*x = MlineNewChapterPush{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineNewChapterPush) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineNewChapterPush) ProtoMessage() {}
|
||||
|
||||
func (x *MlineNewChapterPush) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mline_mline_msg_proto_msgTypes[8]
|
||||
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 MlineNewChapterPush.ProtoReflect.Descriptor instead.
|
||||
func (*MlineNewChapterPush) Descriptor() ([]byte, []int) {
|
||||
return file_mline_mline_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *MlineNewChapterPush) GetData() *DBMline {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_mline_mline_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mline_mline_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x15, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x73,
|
||||
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d,
|
||||
0x6c, 0x69, 0x6e, 0x65, 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, 0x11, 0x0a, 0x0f, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47,
|
||||
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x30, 0x0a, 0x10, 0x4d, 0x6c, 0x69,
|
||||
0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42,
|
||||
0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x33, 0x0a, 0x11, 0x4d,
|
||||
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, 0x32, 0x0a, 0x12, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61,
|
||||
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x4d, 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, 0x75,
|
||||
0x0a, 0x12, 0x4d, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72,
|
||||
0x4f, 0x62, 0x6a, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x7e, 0x0a, 0x15, 0x4d, 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, 0x64, 0x0a, 0x16, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68,
|
||||
0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
||||
0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x6c, 0x76,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x6c, 0x76, 0x22, 0x33, 0x0a, 0x13, 0x4d,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x65, 0x77, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x50, 0x75,
|
||||
0x73, 0x68, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x08, 0x2e, 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_mline_mline_msg_proto_rawDescOnce sync.Once
|
||||
file_mline_mline_msg_proto_rawDescData = file_mline_mline_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_mline_mline_msg_proto_rawDescGZIP() []byte {
|
||||
file_mline_mline_msg_proto_rawDescOnce.Do(func() {
|
||||
file_mline_mline_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_mline_mline_msg_proto_rawDescData)
|
||||
})
|
||||
return file_mline_mline_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mline_mline_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_mline_mline_msg_proto_goTypes = []interface{}{
|
||||
(*MlineGetListReq)(nil), // 0: MlineGetListReq
|
||||
(*MlineGetListResp)(nil), // 1: MlineGetListResp
|
||||
(*MlineGetRewardReq)(nil), // 2: MlineGetRewardReq
|
||||
(*MlineGetRewardResp)(nil), // 3: MlineGetRewardResp
|
||||
(*MlineChallengeReq)(nil), // 4: MlineChallengeReq
|
||||
(*MlineChallengeResp)(nil), // 5: MlineChallengeResp
|
||||
(*MlineChallengeOverReq)(nil), // 6: MlineChallengeOverReq
|
||||
(*MlineChallengeOverResp)(nil), // 7: MlineChallengeOverResp
|
||||
(*MlineNewChapterPush)(nil), // 8: MlineNewChapterPush
|
||||
(*DBMline)(nil), // 9: DBMline
|
||||
(*BattleInfo)(nil), // 10: BattleInfo
|
||||
(*BattleReport)(nil), // 11: BattleReport
|
||||
}
|
||||
var file_mline_mline_msg_proto_depIdxs = []int32{
|
||||
9, // 0: MlineGetListResp.data:type_name -> DBMline
|
||||
9, // 1: MlineGetRewardResp.data:type_name -> DBMline
|
||||
10, // 2: MlineChallengeResp.info:type_name -> BattleInfo
|
||||
11, // 3: MlineChallengeOverReq.report:type_name -> BattleReport
|
||||
9, // 4: MlineChallengeOverResp.data:type_name -> DBMline
|
||||
9, // 5: MlineNewChapterPush.data:type_name -> DBMline
|
||||
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_mline_mline_msg_proto_init() }
|
||||
func file_mline_mline_msg_proto_init() {
|
||||
if File_mline_mline_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_mline_mline_db_proto_init()
|
||||
file_battle_battle_msg_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_mline_mline_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineGetRewardReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineGetRewardResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineChallengeReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineChallengeResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineChallengeOverReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineChallengeOverResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mline_mline_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineNewChapterPush); 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_mline_mline_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_mline_mline_msg_proto_goTypes,
|
||||
DependencyIndexes: file_mline_mline_msg_proto_depIdxs,
|
||||
MessageInfos: file_mline_mline_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mline_mline_msg_proto = out.File
|
||||
file_mline_mline_msg_proto_rawDesc = nil
|
||||
file_mline_mline_msg_proto_goTypes = nil
|
||||
file_mline_mline_msg_proto_depIdxs = nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user