新主线
This commit is contained in:
parent
e1fab866ca
commit
5c0d1e3827
@ -212,6 +212,9 @@ const (
|
|||||||
|
|
||||||
// 自动战斗
|
// 自动战斗
|
||||||
TableAuto = "autoBattle"
|
TableAuto = "autoBattle"
|
||||||
|
|
||||||
|
///新主线数据表
|
||||||
|
TableMline = "mline"
|
||||||
)
|
)
|
||||||
|
|
||||||
//RPC服务接口定义处
|
//RPC服务接口定义处
|
||||||
|
@ -6,23 +6,22 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MainlineGetListResp = "getlist"
|
MlineGetListResp = "getlist"
|
||||||
MainlineChallengeResp = "challenge"
|
MlineChallengeResp = "challenge"
|
||||||
MainlineChallengeOverResp = "challengeover"
|
MlineChallengeOverResp = "challengeover"
|
||||||
MainlineGetRewardResp = "getreward"
|
MlineGetRewardResp = "getreward"
|
||||||
MainlineNewChapterPush = "newchapter"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiComp struct {
|
type apiComp struct {
|
||||||
modules.MCompGate
|
modules.MCompGate
|
||||||
service core.IService
|
service core.IService
|
||||||
module *Mainline
|
module *Mline
|
||||||
}
|
}
|
||||||
|
|
||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
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)
|
err = this.MCompGate.Init(service, module, comp, options)
|
||||||
this.module = module.(*Mainline)
|
this.module = module.(*Mline)
|
||||||
this.service = service
|
this.service = service
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -9,16 +9,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
|
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MlineChallengeReq) (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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
///挑战主线关卡
|
///挑战主线关卡
|
||||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
var (
|
var (
|
||||||
curChapter *pb.DBMainline // 当前章节信息
|
curChapter *pb.DBMainline // 当前章节信息
|
||||||
ps int32
|
ps int32
|
||||||
@ -30,27 +27,13 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
|||||||
return // 参数校验失败直接返回
|
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)
|
node := this.module.configure.GetMainStageConf(req.StageId)
|
||||||
if node == nil { // 配置文件校验
|
if node == nil { // 配置文件校验
|
||||||
code = pb.ErrorCode_MainlineNotFindChapter
|
code = pb.ErrorCode_MainlineNotFindChapter
|
||||||
return
|
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 curChapter.Ps != 0 {
|
||||||
if code = this.module.ConsumeRes(session, node.PsMg, true); code != pb.ErrorCode_Success { // 扣1点
|
if code = this.module.ConsumeRes(session, node.PsMg, true); code != pb.ErrorCode_Success { // 扣1点
|
||||||
return
|
return
|
||||||
@ -80,7 +63,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
|||||||
"ps": ps,
|
"ps": ps,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), curChapter.Id, update)
|
err := this.module.modelMline.modifyMlineData(session.GetUserId(), curChapter.Id, update)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
@ -88,21 +71,17 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
|
|||||||
}
|
}
|
||||||
|
|
||||||
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||||
Ptype: pb.PlayType_mainline,
|
Ptype: pb.PlayType_mainline,
|
||||||
Title: "",
|
Title: "",
|
||||||
Format: &pb.BattleFormation{
|
Format: req.Battle,
|
||||||
Leadpos: req.Leadpos,
|
|
||||||
Format: req.Teamids,
|
|
||||||
},
|
|
||||||
Mformat: node.FormatList,
|
Mformat: node.FormatList,
|
||||||
})
|
})
|
||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{
|
session.SendMsg(string(this.module.GetType()), MlineChallengeResp, &pb.MlineChallengeResp{
|
||||||
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},
|
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,
|
StageId: req.StageId,
|
||||||
MainlineId: req.GetMainlineId(),
|
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,12 @@ import (
|
|||||||
|
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.MainlineChallengeOverReq) (code pb.ErrorCode) {
|
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.MlineChallengeOverReq) (code pb.ErrorCode) {
|
||||||
if req.MainlineId == 0 {
|
if req.StageId == 0 {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -20,12 +19,11 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Mainl
|
|||||||
}
|
}
|
||||||
|
|
||||||
///挑战主线关卡
|
///挑战主线关卡
|
||||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
var (
|
var (
|
||||||
mainline *pb.DBMainline // 当前章节信息
|
mainline *pb.DBMline // 当前章节信息
|
||||||
res []*cfg.Gameatn // 小章节奖励
|
res []*cfg.Gameatn // 小章节奖励
|
||||||
isWin bool
|
isWin bool
|
||||||
user *pb.DBUser
|
|
||||||
hero []string //新的英雄
|
hero []string //新的英雄
|
||||||
newhero []string //新的英雄
|
newhero []string //新的英雄
|
||||||
)
|
)
|
||||||
@ -37,23 +35,18 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
|||||||
return // 参数校验失败直接返回
|
return // 参数校验失败直接返回
|
||||||
}
|
}
|
||||||
// 校验关卡存不存在
|
// 校验关卡存不存在
|
||||||
mainline = this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
// mainline = this.module.modelMline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||||
if mainline == nil {
|
// if mainline == nil {
|
||||||
code = pb.ErrorCode_MainlineNotFound
|
// code = pb.ErrorCode_MainlineNotFound
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), mainline.Intensity)
|
node := this.module.configure.GetMainStageConf(req.StageId)
|
||||||
if node == nil { // 配置文件校验
|
if node == nil { // 配置文件校验
|
||||||
code = pb.ErrorCode_MainlineNotFindChapter
|
code = pb.ErrorCode_MainlineNotFindChapter
|
||||||
return
|
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)
|
code, isWin = this.module.battle.CheckBattleReport(session, req.Report)
|
||||||
@ -63,8 +56,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
|||||||
|
|
||||||
if !isWin { // 战斗失败直接返回
|
if !isWin { // 战斗失败直接返回
|
||||||
// 返还
|
// 返还
|
||||||
mainline.Ps = 0
|
//mainline.Ps = 0
|
||||||
this.module.modelMainline.modifyMainlineData(session.GetUserId(), mainline.Id, map[string]interface{}{
|
this.module.modelMline.modifyMlineData(session.GetUserId(), mainline.Id, map[string]interface{}{
|
||||||
"ps": 0,
|
"ps": 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -75,8 +68,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
res = append(res, node.Award...)
|
res = append(res, node.Commonaward...)
|
||||||
for _, v := range node.Award {
|
for _, v := range node.Commonaward {
|
||||||
if v.A == comm.HeroType {
|
if v.A == comm.HeroType {
|
||||||
hero = append(hero, v.T)
|
hero = append(hero, v.T)
|
||||||
}
|
}
|
||||||
@ -89,47 +82,21 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
user = this.module.ModuleUser.GetUser(session.GetUserId())
|
mainline.StageId = req.StageId
|
||||||
mainline.MainlineId = int32(req.MainlineId)
|
//mainline.Ps = 0 // 重置预扣体力
|
||||||
mainline.BranchID = append(mainline.BranchID, int32(req.MainlineId))
|
|
||||||
mainline.Ps = 0 // 重置预扣体力
|
|
||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
"mainlineId": req.MainlineId,
|
"stageId": mainline.StageId,
|
||||||
"chapterId": mainline.ChapterId,
|
|
||||||
"branchID": mainline.BranchID,
|
|
||||||
"ps": 0,
|
|
||||||
}
|
}
|
||||||
if node.Episodetype == comm.MainLineBoss { // 打完boss 设置领奖状态
|
if node.Episodetype == comm.MainLineBoss { // 打完boss 设置领奖状态
|
||||||
update["awaredID"] = pb.AwaredType_TypeAvailable
|
update["awaredID"] = pb.AwaredType_TypeAvailable
|
||||||
mainline.AwaredID = pb.AwaredType_TypeAvailable
|
|
||||||
}
|
}
|
||||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), mainline.Id, update)
|
err := this.module.modelMline.modifyMlineData(session.GetUserId(), mainline.Id, update)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
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 {
|
if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
|
||||||
this.module.Debugf("DispenseRes err:+%v", res)
|
this.module.Debugf("DispenseRes err:+%v", res)
|
||||||
@ -145,9 +112,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline, Newheros: newhero, Olv: user.Lv})
|
session.SendMsg(string(this.module.GetType()), MlineChallengeOverResp, &pb.MlineChallengeOverResp{})
|
||||||
// 主线任务统计 Rtype60
|
// 主线任务统计 Rtype60
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
|
||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.MainlineId))
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -8,58 +8,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode) {
|
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MlineGetRewardReq) (code pb.ErrorCode) {
|
||||||
if req.ChapterObj == "" {
|
if req.CId == 0 || req.Star == 0 {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
///获取主线关卡信息
|
///获取主线关卡信息
|
||||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetRewardReq) (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
|
return
|
||||||
}
|
}
|
||||||
|
@ -4,44 +4,35 @@ import (
|
|||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode) {
|
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MlineGetListReq) (code pb.ErrorCode) {
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
///获取主线关卡信息
|
///获取主线关卡信息
|
||||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) GetList(session comm.IUserSession, req *pb.MlineGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
rsp := &pb.MainlineGetListResp{}
|
rsp := &pb.MlineGetListResp{}
|
||||||
|
|
||||||
code = this.GetListCheck(session, req)
|
code = this.GetListCheck(session, req)
|
||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return // 参数校验失败直接返回
|
return // 参数校验失败直接返回
|
||||||
}
|
}
|
||||||
|
|
||||||
list, err := this.module.modelMainline.getMainlineList(session.GetUserId())
|
list, err := this.module.modelMline.getMainlineList(session.GetUserId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(list) == 0 { // 如果数量为0 则默认创建一条数据
|
for _, v := range list {
|
||||||
_data := &pb.DBMainline{}
|
if v.CType == req.CType {
|
||||||
_data.Id = primitive.NewObjectID().Hex()
|
rsp.Data = append(rsp.Data, v)
|
||||||
_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})
|
session.SendMsg(string(this.module.GetType()), MlineGetListResp, rsp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package mline
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/log"
|
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
@ -10,83 +9,66 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
game_mainlinechapter = "game_mainlinechapter.json"
|
game_mainchapter = "game_mainchapter.json"
|
||||||
game_mainline = "game_mainline.json"
|
game_mainstage = "game_mainstage.json"
|
||||||
|
game_mainstarreward = "game_mainstarreward.json"
|
||||||
)
|
)
|
||||||
|
|
||||||
///配置管理基础组件
|
///配置管理基础组件
|
||||||
type configureComp struct {
|
type configureComp struct {
|
||||||
modules.MCompConfigure
|
modules.MCompConfigure
|
||||||
module *Mainline
|
module *Mline
|
||||||
hlock sync.RWMutex
|
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) {
|
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||||
this.module = module.(*Mainline)
|
this.module = module.(*Mline)
|
||||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||||
game_mainlinechapter: cfg.NewGameMainlineChapter,
|
game_mainchapter: cfg.NewGameMainChapter,
|
||||||
|
game_mainstage: cfg.NewGameMainStage,
|
||||||
|
game_mainstarreward: cfg.NewGameMainStarreward,
|
||||||
})
|
})
|
||||||
this._mapMainline = make(map[int64]*cfg.GameMainlineData, 0)
|
|
||||||
configure.RegisterConfigure(game_mainline, cfg.NewGameMainline, this.GetMainline)
|
|
||||||
|
|
||||||
return
|
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) {
|
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||||
return configure.GetConfigure(name)
|
return configure.GetConfigure(name)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.GameMainlineChapterData) {
|
func (this *configureComp) GetMainChapterConf(id int32) (data *cfg.GameMainChapterData) {
|
||||||
if v, err := this.GetConfigure(game_mainlinechapter); err != nil {
|
if v, err := this.GetConfigure(game_mainchapter); err == nil {
|
||||||
this.module.Errorf("get global conf err:%v", err)
|
if configure, ok := v.(*cfg.GameMainChapter); ok {
|
||||||
return
|
return configure.Get(id)
|
||||||
} 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
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
this.module.Errorf("GameMainChapterData conf not found key :%d", id)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
data = configure.Get(int(id - 1))
|
func (this *configureComp) GetMainStarRewardConf(boxId int32) (data []*cfg.GameMainStarrewardData) {
|
||||||
|
if v, err := this.GetConfigure(game_mainstarreward); err == nil {
|
||||||
|
if configure, ok := v.(*cfg.GameMainStarreward); ok {
|
||||||
|
for _, v1 := range configure.GetDataList() {
|
||||||
|
if v1.Boxid == boxId {
|
||||||
|
data = append(data, v1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取章节数量
|
func (this *configureComp) GetMainStageConf(id int32) (data *cfg.GameMainStageData) {
|
||||||
func (this *configureComp) GetMaxMainlineChapter() int32 {
|
if v, err := this.GetConfigure(game_mainstage); err == nil {
|
||||||
if v, err := this.GetConfigure(game_mainlinechapter); err == nil {
|
if configure, ok := v.(*cfg.GameMainStage); ok {
|
||||||
if configure, ok := v.(*cfg.GameMainlineChapter); ok {
|
return configure.Get(id)
|
||||||
return int32(len(configure.GetDataList()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
this.module.Errorf("GameMainStageData conf not found key :%d", id)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
@ -7,32 +7,32 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ModelMainline struct {
|
type ModelMline struct {
|
||||||
modules.MCompModel
|
modules.MCompModel
|
||||||
module *Mainline
|
module *Mline
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModelMainline) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *ModelMline) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
this.TableName = comm.TableMainline
|
this.TableName = comm.TableMline
|
||||||
err = this.MCompModel.Init(service, module, comp, options)
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
this.module = module.(*Mainline)
|
this.module = module.(*Mline)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取章节信息
|
// 获取章节信息
|
||||||
func (this *ModelMainline) getMainlineList(uid string) (storys []*pb.DBMainline, err error) {
|
func (this *ModelMline) getMainlineList(uid string) (mLine []*pb.DBMline, err error) {
|
||||||
storys = make([]*pb.DBMainline, 0)
|
mLine = make([]*pb.DBMline, 0)
|
||||||
err = this.GetList(uid, &storys)
|
err = this.GetList(uid, &mLine)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改章节信息
|
// 修改章节信息
|
||||||
func (this *ModelMainline) modifyMainlineData(uid string, objid string, data map[string]interface{}) error {
|
func (this *ModelMline) modifyMlineData(uid string, objId string, data map[string]interface{}) error {
|
||||||
return this.module.modelMainline.ChangeList(uid, objid, data)
|
return this.module.modelMline.ChangeList(uid, objId, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 增加新的章节数据
|
// 增加新的章节数据
|
||||||
func (this *ModelMainline) addNewChapter(uId string, data map[string]interface{}) (err error) {
|
func (this *ModelMline) addNewChapter(uId string, data map[string]interface{}) (err error) {
|
||||||
|
|
||||||
if err = this.AddLists(uId, data); err != nil {
|
if err = this.AddLists(uId, data); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
@ -42,9 +42,9 @@ func (this *ModelMainline) addNewChapter(uId string, data map[string]interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取指定章节数据
|
// 获取指定章节数据
|
||||||
func (this *ModelMainline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
func (this *ModelMline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
||||||
data := &pb.DBMainline{}
|
data := &pb.DBMainline{}
|
||||||
err := this.module.modelMainline.GetListObj(uid, obj, data)
|
err := this.module.modelMline.GetListObj(uid, obj, data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.module.Errorf("%v", err)
|
this.module.Errorf("%v", err)
|
||||||
return nil
|
return nil
|
||||||
@ -53,7 +53,7 @@ func (this *ModelMainline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 增加新的章节数据
|
// 增加新的章节数据
|
||||||
func (this *ModelMainline) cleanChapter(uId string) (err error) {
|
func (this *ModelMline) cleanChapter(uId string) (err error) {
|
||||||
|
|
||||||
if err = this.DelByUId(uId); err != nil {
|
if err = this.DelByUId(uId); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
|
@ -5,90 +5,50 @@ import (
|
|||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"sort"
|
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Mainline struct {
|
type Mline struct {
|
||||||
modules.ModuleBase
|
modules.ModuleBase
|
||||||
modelMainline *ModelMainline
|
modelMline *ModelMline
|
||||||
service core.IService
|
service core.IService
|
||||||
api *apiComp
|
api *apiComp
|
||||||
configure *configureComp
|
configure *configureComp
|
||||||
battle comm.IBattle
|
battle comm.IBattle
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewModule() core.IModule {
|
func NewModule() core.IModule {
|
||||||
return &Mainline{}
|
return &Mline{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Mainline) GetType() core.M_Modules {
|
func (this *Mline) GetType() core.M_Modules {
|
||||||
return comm.ModuleMainline
|
return comm.ModuleMainline
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Mainline) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
func (this *Mline) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||||
err = this.ModuleBase.Init(service, module, options)
|
err = this.ModuleBase.Init(service, module, options)
|
||||||
this.service = service
|
this.service = service
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Mainline) OnInstallComp() {
|
func (this *Mline) OnInstallComp() {
|
||||||
this.ModuleBase.OnInstallComp()
|
this.ModuleBase.OnInstallComp()
|
||||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||||
this.modelMainline = this.RegisterComp(new(ModelMainline)).(*ModelMainline)
|
this.modelMline = this.RegisterComp(new(ModelMline)).(*ModelMline)
|
||||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 接口信息 给其他模块调用 用来修改主线关卡信息
|
// 接口信息 给其他模块调用 用来修改主线关卡信息
|
||||||
func (this *Mainline) ModifyMainlineData(uid string, id int32) (code pb.ErrorCode) {
|
func (this *Mline) 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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Mainline) Start() (err error) {
|
func (this *Mline) GetUsermainLineData(uid string) (mainlineId int32) {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Mline) Start() (err error) {
|
||||||
err = this.ModuleBase.Start()
|
err = this.ModuleBase.Start()
|
||||||
var module core.IModule
|
var module core.IModule
|
||||||
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||||
@ -100,7 +60,7 @@ func (this *Mainline) Start() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//红点查询
|
//红点查询
|
||||||
func (this *Mainline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
func (this *Mline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
||||||
reddot = make(map[comm.ReddotType]bool)
|
reddot = make(map[comm.ReddotType]bool)
|
||||||
for _, v := range rid {
|
for _, v := range rid {
|
||||||
if v == comm.Reddot5 {
|
if v == comm.Reddot5 {
|
||||||
@ -112,90 +72,25 @@ func (this *Mainline) Reddot(session comm.IUserSession, rid ...comm.ReddotType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 红点检测
|
// 红点检测
|
||||||
func (this *Mainline) CheckPoint(uid string) bool {
|
func (this *Mline) CheckPoint(uid string) bool {
|
||||||
list, err := this.modelMainline.getMainlineList(uid)
|
// list, err := this.modelMainline.getMainlineList(uid)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
for _, v := range list {
|
// for _, v := range list {
|
||||||
conf := this.configure.GetMainlineChapter(v.ChapterId)
|
// conf := this.configure.GetMainlineChapter(v.ChapterId)
|
||||||
if conf == nil {
|
// if conf == nil {
|
||||||
continue
|
// continue
|
||||||
}
|
// }
|
||||||
if len(conf.Episode) != len(v.BranchID) {
|
// if len(conf.Episode) != len(v.BranchID) {
|
||||||
return true
|
// return true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 参数 难度 + 关卡id
|
// 参数 难度 + 关卡id
|
||||||
func (this *Mainline) ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode) {
|
func (this *Mline) 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
|
return
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,8 @@ type MlineGetRewardResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||||
|
Reward []*UserAssets `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"` // 奖励
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MlineGetRewardResp) Reset() {
|
func (x *MlineGetRewardResp) Reset() {
|
||||||
@ -219,6 +220,13 @@ func (x *MlineGetRewardResp) GetData() *DBMline {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *MlineGetRewardResp) GetReward() []*UserAssets {
|
||||||
|
if x != nil {
|
||||||
|
return x.Reward
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// 挑战关卡
|
// 挑战关卡
|
||||||
type MlineChallengeReq struct {
|
type MlineChallengeReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -391,7 +399,8 @@ type MlineChallengeOverResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
Data *DBMline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
|
||||||
|
Reward []*UserAssets `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"` // 奖励
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MlineChallengeOverResp) Reset() {
|
func (x *MlineChallengeOverResp) Reset() {
|
||||||
@ -433,6 +442,13 @@ func (x *MlineChallengeOverResp) GetData() *DBMline {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *MlineChallengeOverResp) GetReward() []*UserAssets {
|
||||||
|
if x != nil {
|
||||||
|
return x.Reward
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_mline_mline_msg_proto protoreflect.FileDescriptor
|
var File_mline_mline_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_mline_mline_msg_proto_rawDesc = []byte{
|
var file_mline_mline_msg_proto_rawDesc = []byte{
|
||||||
@ -440,40 +456,46 @@ var file_mline_mline_msg_proto_rawDesc = []byte{
|
|||||||
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d,
|
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,
|
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,
|
0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0f, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x79,
|
0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0f, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69,
|
||||||
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22,
|
0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01,
|
||||||
0x30, 0x0a, 0x10, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x10, 0x4d,
|
||||||
0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28,
|
0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||||
0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74,
|
0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
||||||
0x61, 0x22, 0x39, 0x0a, 0x11, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77,
|
0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a,
|
||||||
0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20,
|
0x11, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72,
|
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x22, 0x32, 0x0a, 0x12,
|
0x03, 0x63, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
|
0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x22, 0x57, 0x0a, 0x12, 0x4d, 0x6c, 0x69, 0x6e,
|
||||||
0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c,
|
||||||
0x32, 0x08, 0x2e, 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
|
||||||
0x22, 0x57, 0x0a, 0x11, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e,
|
|
||||||
0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64,
|
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12,
|
|
||||||
0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
|
||||||
0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x4f, 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, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
||||||
0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x15, 0x4d, 0x6c,
|
|
||||||
0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72,
|
|
||||||
0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01,
|
|
||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 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, 0x36, 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,
|
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,
|
0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x06,
|
||||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55,
|
||||||
|
0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72,
|
||||||
|
0x64, 0x22, 0x57, 0x0a, 0x11, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65,
|
||||||
|
0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49,
|
||||||
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64,
|
||||||
|
0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x4f, 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, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x15, 0x4d,
|
||||||
|
0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65,
|
||||||
|
0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18,
|
||||||
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 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, 0x5b, 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, 0x23, 0x0a,
|
||||||
|
0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
|
||||||
|
0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61,
|
||||||
|
0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -499,22 +521,25 @@ var file_mline_mline_msg_proto_goTypes = []interface{}{
|
|||||||
(*MlineChallengeOverReq)(nil), // 6: MlineChallengeOverReq
|
(*MlineChallengeOverReq)(nil), // 6: MlineChallengeOverReq
|
||||||
(*MlineChallengeOverResp)(nil), // 7: MlineChallengeOverResp
|
(*MlineChallengeOverResp)(nil), // 7: MlineChallengeOverResp
|
||||||
(*DBMline)(nil), // 8: DBMline
|
(*DBMline)(nil), // 8: DBMline
|
||||||
(*BattleFormation)(nil), // 9: BattleFormation
|
(*UserAssets)(nil), // 9: UserAssets
|
||||||
(*BattleInfo)(nil), // 10: BattleInfo
|
(*BattleFormation)(nil), // 10: BattleFormation
|
||||||
(*BattleReport)(nil), // 11: BattleReport
|
(*BattleInfo)(nil), // 11: BattleInfo
|
||||||
|
(*BattleReport)(nil), // 12: BattleReport
|
||||||
}
|
}
|
||||||
var file_mline_mline_msg_proto_depIdxs = []int32{
|
var file_mline_mline_msg_proto_depIdxs = []int32{
|
||||||
8, // 0: MlineGetListResp.data:type_name -> DBMline
|
8, // 0: MlineGetListResp.data:type_name -> DBMline
|
||||||
8, // 1: MlineGetRewardResp.data:type_name -> DBMline
|
8, // 1: MlineGetRewardResp.data:type_name -> DBMline
|
||||||
9, // 2: MlineChallengeReq.battle:type_name -> BattleFormation
|
9, // 2: MlineGetRewardResp.reward:type_name -> UserAssets
|
||||||
10, // 3: MlineChallengeResp.info:type_name -> BattleInfo
|
10, // 3: MlineChallengeReq.battle:type_name -> BattleFormation
|
||||||
11, // 4: MlineChallengeOverReq.report:type_name -> BattleReport
|
11, // 4: MlineChallengeResp.info:type_name -> BattleInfo
|
||||||
8, // 5: MlineChallengeOverResp.data:type_name -> DBMline
|
12, // 5: MlineChallengeOverReq.report:type_name -> BattleReport
|
||||||
6, // [6:6] is the sub-list for method output_type
|
8, // 6: MlineChallengeOverResp.data:type_name -> DBMline
|
||||||
6, // [6:6] is the sub-list for method input_type
|
9, // 7: MlineChallengeOverResp.reward:type_name -> UserAssets
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
8, // [8:8] is the sub-list for method output_type
|
||||||
6, // [6:6] is the sub-list for extension extendee
|
8, // [8:8] is the sub-list for method input_type
|
||||||
0, // [0:6] is the sub-list for field type_name
|
8, // [8:8] is the sub-list for extension type_name
|
||||||
|
8, // [8:8] is the sub-list for extension extendee
|
||||||
|
0, // [0:8] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_mline_mline_msg_proto_init() }
|
func init() { file_mline_mline_msg_proto_init() }
|
||||||
@ -524,6 +549,7 @@ func file_mline_mline_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
file_mline_mline_db_proto_init()
|
file_mline_mline_db_proto_init()
|
||||||
file_battle_battle_msg_proto_init()
|
file_battle_battle_msg_proto_init()
|
||||||
|
file_comm_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_mline_mline_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_mline_mline_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*MlineGetListReq); i {
|
switch v := v.(*MlineGetListReq); i {
|
||||||
|
@ -162,15 +162,13 @@ type DBShop struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //装备id
|
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
|
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //装备id
|
||||||
RefreshnumgoldShop int32 `protobuf:"varint,3,opt,name=refreshnumgoldShop,proto3" json:"refreshnumgoldShop" bson:"refresholdShop"` //刷新金币商店次数
|
GoldShop *UserShopData `protobuf:"bytes,3,opt,name=goldShop,proto3" json:"goldShop" bson:"goldShop"` //金币商店数据
|
||||||
RefreshtimegoldShop int64 `protobuf:"varint,4,opt,name=refreshtimegoldShop,proto3" json:"refreshtimegoldShop" bson:"refresholdShop"` //刷新金币商店的时间
|
DiamondShop *UserShopData `protobuf:"bytes,4,opt,name=diamondShop,proto3" json:"diamondShop" bson:"diamondShop"` //金币商店数据
|
||||||
GoldShop *UserShopData `protobuf:"bytes,5,opt,name=goldShop,proto3" json:"goldShop" bson:"goldShop"` //金币商店数据
|
PvpShop *UserShopData `protobuf:"bytes,5,opt,name=pvpShop,proto3" json:"pvpShop" bson:"pvpShop"` //金币商店数据
|
||||||
DiamondShop *UserShopData `protobuf:"bytes,6,opt,name=diamondShop,proto3" json:"diamondShop" bson:"diamondShop"` //金币商店数据
|
PveShop *UserShopData `protobuf:"bytes,6,opt,name=pveShop,proto3" json:"pveShop" bson:"pveShop"` //金币商店数据
|
||||||
PvpShop *UserShopData `protobuf:"bytes,7,opt,name=pvpShop,proto3" json:"pvpShop" bson:"pvpShop"` //金币商店数据
|
AllianceShop *UserShopData `protobuf:"bytes,7,opt,name=allianceShop,proto3" json:"allianceShop" bson:"allianceShop"` //金币商店数据
|
||||||
PveShop *UserShopData `protobuf:"bytes,8,opt,name=pveShop,proto3" json:"pveShop" bson:"pveShop"` //金币商店数据
|
|
||||||
AllianceShop *UserShopData `protobuf:"bytes,9,opt,name=allianceShop,proto3" json:"allianceShop" bson:"allianceShop"` //金币商店数据
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBShop) Reset() {
|
func (x *DBShop) Reset() {
|
||||||
@ -219,20 +217,6 @@ func (x *DBShop) GetUid() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBShop) GetRefreshnumgoldShop() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.RefreshnumgoldShop
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DBShop) GetRefreshtimegoldShop() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.RefreshtimegoldShop
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DBShop) GetGoldShop() *UserShopData {
|
func (x *DBShop) GetGoldShop() *UserShopData {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.GoldShop
|
return x.GoldShop
|
||||||
@ -296,37 +280,31 @@ var file_shop_shop_db_proto_rawDesc = []byte{
|
|||||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71,
|
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71,
|
||||||
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||||
0x38, 0x01, 0x22, 0xed, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e, 0x0a,
|
0x38, 0x01, 0x22, 0x8b, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e, 0x0a,
|
||||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 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,
|
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||||
0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c,
|
0x29, 0x0a, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65, 0x66,
|
|
||||||
0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12,
|
|
||||||
0x30, 0x0a, 0x13, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f,
|
|
||||||
0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x72, 0x65,
|
|
||||||
0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f,
|
|
||||||
0x70, 0x12, 0x29, 0x0a, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20,
|
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61,
|
|
||||||
0x74, 0x61, 0x52, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x0b,
|
|
||||||
0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28,
|
|
||||||
0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61,
|
0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61,
|
||||||
0x52, 0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a,
|
0x52, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x69,
|
||||||
0x07, 0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
|
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70,
|
0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b,
|
||||||
0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f,
|
0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70,
|
||||||
0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68,
|
0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55,
|
||||||
0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12,
|
0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x70,
|
||||||
0x31, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18,
|
0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18,
|
||||||
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70,
|
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70,
|
||||||
0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68,
|
0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x31, 0x0a,
|
||||||
0x6f, 0x70, 0x2a, 0x5f, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08,
|
0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20,
|
||||||
0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c, 0x64,
|
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61,
|
||||||
0x53, 0x68, 0x6f, 0x70, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
|
0x74, 0x61, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70,
|
||||||
0x64, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68,
|
0x2a, 0x5f, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04,
|
||||||
0x6f, 0x70, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x10,
|
0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68,
|
||||||
0x04, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f,
|
0x6f, 0x70, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53,
|
||||||
0x70, 0x10, 0x05, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
0x68, 0x6f, 0x70, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68, 0x6f, 0x70,
|
||||||
0x74, 0x6f, 0x33,
|
0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x04, 0x12,
|
||||||
|
0x10, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x10,
|
||||||
|
0x05, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user