From 6bd3a031390b774dbaa5e727ebbdaa7b0cebf2bc Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Wed, 9 Aug 2023 15:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E4=BB=A4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 22 -- modules/activity/module.go | 8 +- modules/addrecharge/module.go | 2 +- modules/dreamwarorder/api.go | 20 -- modules/dreamwarorder/api_Info.go | 90 ----- modules/dreamwarorder/api_buylv.go | 33 -- modules/dreamwarorder/api_receive.go | 106 ------ modules/dreamwarorder/configure.go | 88 ----- modules/dreamwarorder/model.go | 95 ------ modules/dreamwarorder/module.go | 64 ---- modules/herotask/module.go | 12 +- modules/shopcenter/module.go | 15 +- modules/warorder/api_buylv.go | 93 +++++ modules/warorder/api_completetask.go | 156 +++++++++ modules/warorder/api_info.go | 91 ++++- modules/warorder/api_receive.go | 100 ++++-- modules/warorder/configure.go | 126 ++++++- modules/warorder/modelWarorder.go | 56 ++- modules/warorder/module.go | 29 +- pb/dreamwarorder_msg.pb.go | 490 --------------------------- pb/warorder_db.pb.go | 256 ++++++++++++-- pb/warorder_msg.pb.go | 415 +++++++++++++++++++++-- 22 files changed, 1201 insertions(+), 1166 deletions(-) delete mode 100644 modules/dreamwarorder/api.go delete mode 100644 modules/dreamwarorder/api_Info.go delete mode 100644 modules/dreamwarorder/api_buylv.go delete mode 100644 modules/dreamwarorder/api_receive.go delete mode 100644 modules/dreamwarorder/configure.go delete mode 100644 modules/dreamwarorder/model.go delete mode 100644 modules/dreamwarorder/module.go create mode 100644 modules/warorder/api_buylv.go create mode 100644 modules/warorder/api_completetask.go delete mode 100644 pb/dreamwarorder_msg.pb.go diff --git a/comm/const.go b/comm/const.go index b856d445f..ffd1531ac 100644 --- a/comm/const.go +++ b/comm/const.go @@ -101,7 +101,6 @@ const ( ModuleShopCenter core.M_Modules = "shopcenter" //购物中心 ModuleAddrecharge core.M_Modules = "addrecharge" //累充系统 ModuleStoryLine core.M_Modules = "storyline" //剧情活动 - ModuleDreamwarorder core.M_Modules = "dreamwarorder" //如梦战令 ModulePushgiftbag core.M_Modules = "pushgiftbag" //推送礼包 ModulePuzzle core.M_Modules = "uigame" //小游戏 ) @@ -337,10 +336,6 @@ const ( //购物中心 TableShopCenter = "shopcenter" - - //如梦战令 - TablekfDreamwarorder = "dreamwarorder" - //推送礼包 TablekfPushGiftbag = "pushgiftbag" @@ -1003,20 +998,3 @@ const ( SmithyToolsSkill4 = 4 // 每日顾客数量提升至{0}人 SmithyToolsSkill5 = 5 // 顾客购买装备数量上限提高至{0}件 ) - -const ( - HdTypeWarorder = 1 //圣桃战令类型 - HdTypePay = 2 //圣桃充值礼包 - KFSevenTask = 3 //开服任务 - XSFundPhysical = 4 //现时活动 体力基金 - XSFundRecruit = 5 //现时活动 招募基金 - XSFundExp = 6 //现时活动 经验基金 - HdLevel = 7 //开服等级活动 - HdTypeSign = 8 //七日签到 - - AddUpRecharge = 10 //累计充值 - - // 特殊类型活动 只受活动开启限制 具体玩法 走excel 配置 - HdTypeTurntable = 1001 //大转盘 - HdCelebration = 1002 // 庆典活动 -) diff --git a/modules/activity/module.go b/modules/activity/module.go index 1eeeda8e7..005d1b0ab 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -218,7 +218,7 @@ func (this *Activity) Turntable(drawIndex int32, reward []int32) (item *cfg.Game // 统计庆典活动完成情况 func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32, bosstype int32) bool { bDouble := false // 是否开启双倍奖励 - if activity := this.modelhdList.getHdInfoByType(comm.HdCelebration); activity != nil { + if activity := this.modelhdList.getHdInfoByType(pb.HdType_HdCelebration); activity != nil { // for _, v := range activity { if configure.Now().Unix() > activity.Stime && configure.Now().Unix() < activity.Etime { // 活动范围内 update := make(map[string]interface{}) @@ -336,7 +336,7 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul } } list, _ = this.modelhdData.getHddataByOid(session.GetUserId(), id) - if activity.Itype == comm.HdTypeSign && !utils.IsToday(list.Lasttime) { + if activity.Itype == pb.HdType_HdTypeSign && !utils.IsToday(list.Lasttime) { list.Lasttime = curTime list.Val += 1 update := make(map[string]interface{}) @@ -346,7 +346,7 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul } // 开服等级活动 - if activity.Itype == comm.HdLevel { + if activity.Itype == pb.HdType_HdLevel { if user := this.ModuleUser.GetUser(session.GetUserId()); user != nil { if list.Val != user.Lv { list.Val = user.Lv @@ -360,7 +360,7 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul } // 获取开服庆典活动 - if activity.Itype == comm.HdCelebration { + if activity.Itype == pb.HdType_HdCelebration { // key := fmt.Sprintf("%s-%s", session.GetUserId(), id) if list, err = this.modelhdData.getHddataByOid(session.GetUserId(), id); err == nil { diff --git a/modules/addrecharge/module.go b/modules/addrecharge/module.go index 3af97f99c..7ce8bf7a4 100644 --- a/modules/addrecharge/module.go +++ b/modules/addrecharge/module.go @@ -48,7 +48,7 @@ func (this *AddRecharge) OnInstallComp() { // 活动开启 func (this *AddRecharge) ActivityOpenNotice(hdlist *pb.DBHuodong) { switch hdlist.Itype { - case comm.AddUpRecharge: + case pb.HdType_AddUpRecharge: break } diff --git a/modules/dreamwarorder/api.go b/modules/dreamwarorder/api.go deleted file mode 100644 index afff6209b..000000000 --- a/modules/dreamwarorder/api.go +++ /dev/null @@ -1,20 +0,0 @@ -package dreamwarorder - -import ( - "go_dreamfactory/lego/base" - "go_dreamfactory/lego/core" - "go_dreamfactory/modules" -) - -type apiComp struct { - modules.MCompGate - service base.IRPCXService - module *DreamWarorder -} - -func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - _ = this.MCompGate.Init(service, module, comp, options) - this.service = service.(base.IRPCXService) - this.module = module.(*DreamWarorder) - return -} diff --git a/modules/dreamwarorder/api_Info.go b/modules/dreamwarorder/api_Info.go deleted file mode 100644 index cc4a46f92..000000000 --- a/modules/dreamwarorder/api_Info.go +++ /dev/null @@ -1,90 +0,0 @@ -package dreamwarorder - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - cfg "go_dreamfactory/sys/configure/structs" - "go_dreamfactory/utils" -) - -// 参数校验 -func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.DreamWarorderInfoReq) (errdata *pb.ErrorData) { - - return -} - -// /获取自己的排行榜信息 -func (this *apiComp) Info(session comm.IUserSession, req *pb.DreamWarorderInfoReq) (errdata *pb.ErrorData) { - var ( - confs []*cfg.GamePassCheckTaskData - info *pb.DBDreamWarorder - condiIds []int32 - progress []*pb.ConIProgress - update map[string]interface{} = make(map[string]interface{}) - err error - ) - if errdata = this.InfoCheck(session, req); errdata != nil { - return - } - - if confs, err = this.module.configure.getGamePassCheckTask(); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), - } - return - } - - if info, err = this.module.model.getUserDreamwarorder(session.GetUserId()); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - - if utils.IsToday(info.Daytime) { - daynum := this.module.ModuleTools.GetGlobalConf().Passcheck4DayNum - this.module.model.refreshDayTask(info, confs, daynum) - update["daytime"] = info.Daytime - update["daytasks"] = info.Daytasks - } - if utils.IsSameWeek(info.Weektime) { - weeknum := this.module.ModuleTools.GetGlobalConf().Passcheck4WeekNum - this.module.model.refreshDayTask(info, confs, weeknum) - update["weektime"] = info.Weektime - update["weektasks"] = info.Weektasks - } - condiIds = make([]int32, 0) - for _, v := range info.Daytasks { - condiIds = append(condiIds, v) - } - for _, v := range info.Weektasks { - condiIds = append(condiIds, v) - } - - for _, v := range confs { - if v.Page == 3 { - condiIds = append(condiIds, v.Parameter) - } - } - - if progress, err = this.module.ModuleBuried.CheckCondition(session.GetUserId(), condiIds...); err != nil { - return - } - - if len(update) > 0 { - if err = this.module.model.Change(session.GetUserId(), update); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - } - } - - session.SendMsg(string(this.module.GetType()), "info", &pb.DreamWarorderInfoResp{Conlds: progress, Info: info}) - return -} diff --git a/modules/dreamwarorder/api_buylv.go b/modules/dreamwarorder/api_buylv.go deleted file mode 100644 index ed4fbce1b..000000000 --- a/modules/dreamwarorder/api_buylv.go +++ /dev/null @@ -1,33 +0,0 @@ -package dreamwarorder - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" -) - -// 参数校验 -func (this *apiComp) BuyLvCheck(session comm.IUserSession, req *pb.DreamWarorderBuyLvReq) (errdata *pb.ErrorData) { - - return -} - -// /获取自己的排行榜信息 -func (this *apiComp) BuyLv(session comm.IUserSession, req *pb.DreamWarorderBuyLvReq) (errdata *pb.ErrorData) { - var ( - info *pb.DBDreamWarorder - err error - ) - if errdata = this.BuyLvCheck(session, req); errdata != nil { - return - } - if info, err = this.module.model.getUserDreamwarorder(session.GetUserId()); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - return - } - session.SendMsg(string(this.module.GetType()), "info", &pb.DreamWarorderBuyLvResp{Info: info}) - return -} diff --git a/modules/dreamwarorder/api_receive.go b/modules/dreamwarorder/api_receive.go deleted file mode 100644 index 30f5a8599..000000000 --- a/modules/dreamwarorder/api_receive.go +++ /dev/null @@ -1,106 +0,0 @@ -package dreamwarorder - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - cfg "go_dreamfactory/sys/configure/structs" - "go_dreamfactory/utils" -) - -// 参数校验 -func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.DreamWarorderReceiveReq) (errdata *pb.ErrorData) { - - return -} - -// /获取自己的排行榜信息 -func (this *apiComp) Receive(session comm.IUserSession, req *pb.DreamWarorderReceiveReq) (errdata *pb.ErrorData) { - var ( - // info *pb.DBDreamWarorder - conf *cfg.GameVenturegiftsTaskData - user *pb.DBUser - progress []*pb.ConIProgress - award []*pb.UserAssets - err error - ) - if errdata = this.ReceiveCheck(session, req); errdata != nil { - return - } - - // if conf, err = this.module.configure.getGameVenturegiftsTask(req.Id); err != nil { - // errdata = &pb.ErrorData{ - // Code: pb.ErrorCode_DBError, - // Title: pb.ErrorCode_DBError.ToString(), - // Message: err.Error(), - // } - // return - // } - // if info, err = this.module.model.getUserDreamwarorder(session.GetUserId()); err != nil { - // errdata = &pb.ErrorData{ - // Code: pb.ErrorCode_DBError, - // Title: pb.ErrorCode_DBError.ToString(), - // Message: err.Error(), - // } - // return - // } - - // if dtask.Tasks[req.Id] == 1 { - // errdata = &pb.ErrorData{ - // Code: pb.ErrorCode_ReqParameterError, - // Title: pb.ErrorCode_ReqParameterError.ToString(), - // Message: fmt.Sprintf("%d received", req.Id), - // } - // return - // } - if user = this.module.ModuleUser.GetUser(session.GetUserId()); user == nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: "no found user!", - } - return - } - days := utils.DiffDays(user.Ctime, configure.Now().Unix()) - if days < int(conf.Openday) { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: "no open", - } - return - } - - if progress, err = this.module.ModuleBuried.CheckCondition(session.GetUserId(), conf.Venturetask); err != nil { - return - } - - for _, v := range progress { - if v.State == pb.BuriedItemFinishState_buried_unfinish { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - Message: "task no finish", - } - return - } - } - - if errdata = this.module.DispenseRes(session, conf.Venturereward, true); errdata != nil { - return - } - award = make([]*pb.UserAssets, 0) - for _, v := range conf.Venturereward { - award = append(award, &pb.UserAssets{ - A: v.A, - T: v.T, - N: v.N, - }) - } - // dtask.Tasks[req.Id] = 1 - // this.module.model.Change(session.GetUserId(), map[string]interface{}{ - // "tasks": dtask.Tasks, - // }) - session.SendMsg(string(this.module.GetType()), "receive", &pb.DreamWarorderReceiveResp{Id: req.Id, Award: award}) - return -} diff --git a/modules/dreamwarorder/configure.go b/modules/dreamwarorder/configure.go deleted file mode 100644 index e4ee930de..000000000 --- a/modules/dreamwarorder/configure.go +++ /dev/null @@ -1,88 +0,0 @@ -package dreamwarorder - -import ( - "fmt" - "go_dreamfactory/lego/core" - "go_dreamfactory/modules" - "go_dreamfactory/sys/configure" - cfg "go_dreamfactory/sys/configure/structs" - "sync" -) - -const ( - game_passcheck = "game_passcheck.json" - game_passcheckexp = "game_passcheckexp.json" - game_passchecktask = "game_passchecktask.json" -) - -type configureComp struct { - modules.MCompConfigure - module *DreamWarorder - lock sync.RWMutex - order []*cfg.GamePassCheckData //战令 -} - -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.(*DreamWarorder) - this.order = make([]*cfg.GamePassCheckData, 0) - err = this.LoadConfigure(game_passcheckexp, cfg.NewGamePassCheckExp) - err = this.LoadConfigure(game_passchecktask, cfg.NewGamePassCheckTask) - configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.updateconfigure) - return -} - -func (this *configureComp) getorder() (results []*cfg.GamePassCheckData) { - this.lock.RLock() - defer this.lock.RUnlock() - return this.order -} - -// 读取任务配置表 -func (this *configureComp) getPassCheckCfg() (data *cfg.GamePassCheck, err error) { - var ( - v interface{} - ok bool - ) - if v, err = this.GetConfigure(game_passcheck); err != nil { - return - } else { - if data, ok = v.(*cfg.GamePassCheck); !ok { - err = fmt.Errorf("%T is *cfg.GameWorldTask", v) - return - } - } - return -} - -// 更新任务配置表 -func (this *configureComp) updateconfigure() { - gwt, err := this.getPassCheckCfg() - if err != nil { - this.module.Error("世界任务配置表异常!") - return - } - orderConf := make([]*cfg.GamePassCheckData, 0) - for _, v := range gwt.GetDataList() { - if v.PasscheckType == 4 { - orderConf = append(orderConf, v) - } - } - - this.lock.Lock() - this.order = orderConf - this.lock.Unlock() -} - -// 读取任务配置表 -func (this *configureComp) getGamePassCheckTask() (confs []*cfg.GamePassCheckTaskData, err error) { - var ( - v interface{} - ) - if v, err = this.GetConfigure(game_passchecktask); err != nil { - return - } else { - confs = v.(*cfg.GamePassCheckTask).GetDataList() - } - return -} diff --git a/modules/dreamwarorder/model.go b/modules/dreamwarorder/model.go deleted file mode 100644 index 678250a8b..000000000 --- a/modules/dreamwarorder/model.go +++ /dev/null @@ -1,95 +0,0 @@ -package dreamwarorder - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" - "go_dreamfactory/modules" - "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - cfg "go_dreamfactory/sys/configure/structs" - - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/x/bsonx" -) - -type ModelDreamWarorder struct { - modules.MCompModel - module *DreamWarorder -} - -func (this *ModelDreamWarorder) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - err = this.MCompModel.Init(service, module, comp, options) - this.TableName = comm.TablekfDreamwarorder - this.module = module.(*DreamWarorder) - this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ - Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, - }) - return -} - -// 获取用户全部的埋点数据 -func (this *ModelDreamWarorder) getUserDreamwarorder(uid string) (results *pb.DBDreamWarorder, err error) { - results = &pb.DBDreamWarorder{} - if err = this.Get(uid, results); err != nil && err != mgo.MongodbNil { - this.module.Errorln(err) - return - } - if err == mgo.MongodbNil { - results = &pb.DBDreamWarorder{ - Id: primitive.NewObjectID().Hex(), - Uid: uid, - Daytasks: make([]int32, 0), - Weektasks: make([]int32, 0), - Completetasks: make([]int32, 0), - } - - err = this.Add(uid, results) - } - return -} - -//刷新日常任务 -func (this *ModelDreamWarorder) refreshDayTask(info *pb.DBDreamWarorder, confs []*cfg.GamePassCheckTaskData, num int32) { - var ( - tasks []*cfg.GamePassCheckTaskData = make([]*cfg.GamePassCheckTaskData, 0) - weight []int32 = make([]int32, 0) - indexs []int = make([]int, 0) - ) - for _, v := range confs { - if v.Page == 1 { - tasks = append(tasks, v) - weight = append(weight, v.Pro) - } - } - - indexs = comm.GetRandWs(weight, num) - - for _, i := range indexs { - info.Daytasks = append(info.Daytasks, tasks[i].Id) - } - info.Daytime = configure.Now().Unix() -} - -//刷新日常任务 -func (this *ModelDreamWarorder) refreshWeekTask(info *pb.DBDreamWarorder, confs []*cfg.GamePassCheckTaskData, num int32) { - var ( - tasks []*cfg.GamePassCheckTaskData = make([]*cfg.GamePassCheckTaskData, 0) - weight []int32 = make([]int32, 0) - indexs []int = make([]int, 0) - ) - for _, v := range confs { - if v.Page == 2 { - tasks = append(tasks, v) - weight = append(weight, v.Pro) - } - } - - indexs = comm.GetRandWs(weight, num) - - for _, i := range indexs { - info.Weektasks = append(info.Daytasks, tasks[i].Id) - } - info.Weektime = configure.Now().Unix() -} diff --git a/modules/dreamwarorder/module.go b/modules/dreamwarorder/module.go deleted file mode 100644 index f57590b14..000000000 --- a/modules/dreamwarorder/module.go +++ /dev/null @@ -1,64 +0,0 @@ -package dreamwarorder - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/modules" - "go_dreamfactory/pb" -) - -type DreamWarorder struct { - modules.ModuleBase - service core.IService - api *apiComp - configure *configureComp - model *ModelDreamWarorder - open bool -} - -func NewModule() core.IModule { - return &DreamWarorder{} -} - -func (this *DreamWarorder) GetType() core.M_Modules { - return comm.ModuleDreamwarorder -} - -func (this *DreamWarorder) 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 *DreamWarorder) Start() (err error) { - err = this.ModuleBase.Start() - - return -} - -func (this *DreamWarorder) OnInstallComp() { - this.ModuleBase.OnInstallComp() - this.api = this.RegisterComp(new(apiComp)).(*apiComp) - this.model = this.RegisterComp(new(ModelDreamWarorder)).(*ModelDreamWarorder) - this.configure = this.RegisterComp(new(configureComp)).(*configureComp) -} - -// 活动开启 -func (this *DreamWarorder) ActivityOpenNotice(hdlist *pb.DBHuodong) { - switch hdlist.Itype { - case comm.KFSevenTask: - this.open = true - break - } -} - -// 活动关闭 -func (this *DreamWarorder) ActivityCloseNotice(hdlist *pb.DBHuodong) { - -} - -// 发货 -func (this *DreamWarorder) Delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) { - - return -} diff --git a/modules/herotask/module.go b/modules/herotask/module.go index c57d633ca..6bf624541 100644 --- a/modules/herotask/module.go +++ b/modules/herotask/module.go @@ -44,10 +44,18 @@ func (this *HeroTask) OnInstallComp() { } // 活动开启 -func (this *HeroTask) ActivityNotice(hdlist *pb.DBHuodong) { +func (this *HeroTask) ActivityOpenNotice(hdlist *pb.DBHuodong) { switch hdlist.Itype { - case comm.KFSevenTask: + case pb.HdType_KFSevenTask: this.open = true break } } + +func (this *HeroTask) ActivityCloseNotice(hdlist *pb.DBHuodong) { + switch hdlist.Itype { + case pb.HdType_KFSevenTask: + this.open = false + break + } +} diff --git a/modules/shopcenter/module.go b/modules/shopcenter/module.go index 039d62596..d10cb79ec 100644 --- a/modules/shopcenter/module.go +++ b/modules/shopcenter/module.go @@ -54,14 +54,17 @@ func (this *ShopCenter) OnInstallComp() { // 活动开启 func (this *ShopCenter) ActivityOpenNotice(hdlist *pb.DBHuodong) { switch hdlist.Itype { - case comm.XSFundPhysical: - this.modelshop.addactivity(comm.XSFundPhysical, hdlist) + case pb.HdType_XSFundPhysical: + this.modelshop.addactivity(pb.HdType_XSFundPhysical, hdlist) break - case comm.XSFundRecruit: - this.modelshop.addactivity(comm.XSFundRecruit, hdlist) + case pb.HdType_XSFundRecruit: + this.modelshop.addactivity(pb.HdType_XSFundRecruit, hdlist) break - case comm.XSFundExp: - this.modelshop.addactivity(comm.XSFundExp, hdlist) + case pb.HdType_XSFundExp: + this.modelshop.addactivity(pb.HdType_XSFundExp, hdlist) + break + case pb.HdType_ShopCenterPayPakcge: + this.modelshop.addactivity(pb.HdType_ShopCenterPayPakcge, hdlist) break } } diff --git a/modules/warorder/api_buylv.go b/modules/warorder/api_buylv.go new file mode 100644 index 000000000..97acd23fe --- /dev/null +++ b/modules/warorder/api_buylv.go @@ -0,0 +1,93 @@ +package warorder + +import ( + "fmt" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) BuyLvCheck(session comm.IUserSession, req *pb.WarorderBuyLvReq) (errdata *pb.ErrorData) { + + return +} + +// /获取系统公告 +func (this *apiComp) BuyLv(session comm.IUserSession, req *pb.WarorderBuyLvReq) (errdata *pb.ErrorData) { + var ( + expconf *cfg.GamePassCheckExpData + info *pb.DBWarorders + dwarorder *pb.DreamWarorder + err error + ok bool + ) + if errdata = this.BuyLvCheck(session, req); errdata != nil { + return + } + if info, err = this.module.model.getUserWarorders(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + if _, ok = this.module.model.getopentime(req.Rtype); !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_WarorderNoOpen, + Title: pb.ErrorCode_WarorderNoOpen.ToString(), + Message: fmt.Sprintf("Activity:%d no open", req.Rtype), + } + return + } + + if req.Rtype != 4 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "no rtype", + } + return + } + + if dwarorder, ok = info.Dreamwarorder[req.Rtype]; !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "no activity", + } + return + } + + if dwarorder.Lv >= req.Lv { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "lv to achieve", + } + return + } + + if expconf, err = this.module.configure.getWarorderLvp(req.Lv, req.Rtype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + dwarorder.Exp = expconf.Parameter + dwarorder.Lv = expconf.Id + if err = this.module.model.updateUserWarorders(session.GetUserId(), info); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "buylv", &pb.WarorderBuyLvResp{Rtype: req.Rtype, Lv: req.Lv, Info: dwarorder}) + return +} diff --git a/modules/warorder/api_completetask.go b/modules/warorder/api_completetask.go new file mode 100644 index 000000000..567b0126b --- /dev/null +++ b/modules/warorder/api_completetask.go @@ -0,0 +1,156 @@ +package warorder + +import ( + "fmt" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) CompleteTaskCheck(session comm.IUserSession, req *pb.WarorderCompleteTaskReq) (errdata *pb.ErrorData) { + + return +} + +// /获取系统公告 +func (this *apiComp) CompleteTask(session comm.IUserSession, req *pb.WarorderCompleteTaskReq) (errdata *pb.ErrorData) { + var ( + conf *cfg.GamePassCheckTaskData + expconf *cfg.GamePassCheckExpData + info *pb.DBWarorders + dwarorder *pb.DreamWarorder + condis []*pb.ConIProgress + err error + ok bool + ) + if errdata = this.CompleteTaskCheck(session, req); errdata != nil { + return + } + if info, err = this.module.model.getUserWarorders(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + if _, ok = this.module.model.getopentime(req.Rtype); !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_WarorderNoOpen, + Title: pb.ErrorCode_WarorderNoOpen.ToString(), + Message: fmt.Sprintf("Activity:%d no open", req.Rtype), + } + return + } + + if req.Rtype != 4 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "no rtype", + } + return + } + + if dwarorder, ok = info.Dreamwarorder[req.Rtype]; !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "no activity", + } + } + + for _, v := range dwarorder.Completetasks { + if v == req.Tid { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "task completed", + } + return + } + } + + if conf, err = this.module.configure.getGamePassCheckTaskById(req.Tid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + + if conf.Page == 1 { + ok = false + for _, v := range dwarorder.Daytasks { + if v == req.Tid { + ok = true + break + } + } + if !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("task:%d no in Daytasks", req.Tid), + } + return + } + } + if conf.Page == 2 { + ok = false + for _, v := range dwarorder.Weektasks { + if v == req.Tid { + ok = true + break + } + } + if !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("task:%d no in Daytasks", req.Tid), + } + return + } + } + + if condis, err = this.module.ModuleBuried.CheckCondition(session.GetUserId(), conf.Parameter); err != nil { + return + } + + for _, v := range condis { + if v.State != pb.BuriedItemFinishState_buried_unfinish { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("task:%d unfinish", req.Tid), + } + return + } + } + dwarorder.Completetasks = append(dwarorder.Completetasks, conf.Id) + dwarorder.Exp += conf.Score + + if expconf, err = this.module.configure.getWarorderLvByExp(dwarorder.Exp, req.Rtype); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + dwarorder.Lv = expconf.Id + if err = this.module.model.updateUserWarorders(session.GetUserId(), info); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "completetask", &pb.WarorderCompleteTaskResp{Rtype: req.Rtype, Tid: req.Tid, Exp: dwarorder.Exp}) + return +} diff --git a/modules/warorder/api_info.go b/modules/warorder/api_info.go index e7fc23acf..0ea0be8c2 100644 --- a/modules/warorder/api_info.go +++ b/modules/warorder/api_info.go @@ -4,6 +4,8 @@ import ( "fmt" "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "go_dreamfactory/utils" ) // 参数校验 @@ -15,16 +17,20 @@ func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.WarorderInfoRe // /获取系统公告 func (this *apiComp) Info(session comm.IUserSession, req *pb.WarorderInfoReq) (errdata *pb.ErrorData) { var ( - warorders *pb.DBWarorders - info *pb.Warorder + confs []*cfg.GamePassCheckTaskData + info *pb.DBWarorders + warorder *pb.Warorder + dwarorder *pb.DreamWarorder activity *pb.DBHuodong + condiIds []int32 + progress []*pb.ConIProgress err error ok bool ) if errdata = this.InfoCheck(session, req); errdata != nil { return } - if warorders, err = this.module.modelWarorder.getUserWarorders(session.GetUserId()); err != nil { + if info, err = this.module.model.getUserWarorders(session.GetUserId()); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), @@ -33,7 +39,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.WarorderInfoReq) (e return } - if activity, ok = this.module.modelWarorder.getopentime(req.Rtype); !ok { + if activity, ok = this.module.model.getopentime(req.Rtype); !ok { errdata = &pb.ErrorData{ Code: pb.ErrorCode_WarorderNoOpen, Title: pb.ErrorCode_WarorderNoOpen.ToString(), @@ -42,26 +48,75 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.WarorderInfoReq) (e return } - if info, ok = warorders.Items[req.Rtype]; !ok { - info = &pb.Warorder{} - warorders.Items[req.Rtype] = info - } + switch req.Rtype { + case 1, 2, 3: + if warorder, ok = info.Warorder[req.Rtype]; !ok { + warorder = &pb.Warorder{} + info.Warorder[req.Rtype] = warorder + } + if warorder.Opentime != activity.Stime { + warorder.Opentime = activity.Stime + warorder.Endtime = activity.Etime + warorder.Freeprogress = 0 + warorder.Payprogress = 0 + } + case 4: - if info.Opentime != activity.Stime { - info.Opentime = activity.Stime - info.Endtime = activity.Etime - info.Freeprogress = 0 - info.Payprogress = 0 - if err = this.module.modelWarorder.updateUserWarorders(session.GetUserId(), warorders); err != nil { + if confs, err = this.module.configure.getGamePassCheckTask(); err != nil { errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), Message: err.Error(), } return } - } - session.SendMsg(string(this.module.GetType()), "info", &pb.WarorderInfoResp{Info: info}) + if dwarorder, ok = info.Dreamwarorder[req.Rtype]; !ok { + dwarorder = &pb.DreamWarorder{} + info.Dreamwarorder[req.Rtype] = dwarorder + } + if dwarorder.Opentime != activity.Stime { + dwarorder.Opentime = activity.Stime + dwarorder.Endtime = activity.Etime + warorder.Payprogress = 0 + } + + if utils.IsToday(dwarorder.Daytime) { + daynum := this.module.ModuleTools.GetGlobalConf().Passcheck4DayNum + this.module.model.refreshDayTask(dwarorder, confs, daynum) + + } + if utils.IsSameWeek(dwarorder.Weektime) { + weeknum := this.module.ModuleTools.GetGlobalConf().Passcheck4WeekNum + this.module.model.refreshDayTask(dwarorder, confs, weeknum) + } + + condiIds = make([]int32, 0) + for _, v := range dwarorder.Daytasks { + condiIds = append(condiIds, v) + } + for _, v := range dwarorder.Weektasks { + condiIds = append(condiIds, v) + } + + for _, v := range confs { + if v.Page == 3 { + condiIds = append(condiIds, v.Parameter) + } + } + + if progress, err = this.module.ModuleBuried.CheckCondition(session.GetUserId(), condiIds...); err != nil { + return + } + } + if err = this.module.model.updateUserWarorders(session.GetUserId(), info); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "info", &pb.WarorderInfoResp{Warorder: warorder, Dwarorder: dwarorder, Conlds: progress}) return } diff --git a/modules/warorder/api_receive.go b/modules/warorder/api_receive.go index a537ef175..25ec4ab24 100644 --- a/modules/warorder/api_receive.go +++ b/modules/warorder/api_receive.go @@ -18,8 +18,9 @@ func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.WarorderRec // /获取系统公告 func (this *apiComp) Receive(session comm.IUserSession, req *pb.WarorderReceiveReq) (errdata *pb.ErrorData) { var ( - warorders *pb.DBWarorders - info *pb.Warorder + info *pb.DBWarorders + warorder *pb.Warorder + dwarorder *pb.DreamWarorder confs []*cfg.GamePassCheckData awards []*cfg.Gameatn ads []*pb.UserAssets = make([]*pb.UserAssets, 0) @@ -30,7 +31,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.WarorderReceiveR if errdata = this.ReceiveCheck(session, req); errdata != nil { return } - if warorders, err = this.module.modelWarorder.getUserWarorders(session.GetUserId()); err != nil { + if info, err = this.module.model.getUserWarorders(session.GetUserId()); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), @@ -46,29 +47,66 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.WarorderReceiveR } return } - if info, ok = warorders.Items[req.Rtype]; !ok { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_WarorderNoOpen, - Title: pb.ErrorCode_WarorderNoOpen.ToString(), - Message: fmt.Sprintf("Activity:%d no open", req.Rtype), - } - return - } - - days = int32(utils.DiffDays(configure.Now().Unix(), info.Opentime)) + 1 - awards = make([]*cfg.Gameatn, 0) - for _, v := range confs { - if v.Parameter <= days { - if info.Freeprogress < v.Parameter { - awards = append(awards, v.FreeReward) - ads = append(ads, &pb.UserAssets{ - A: v.FreeReward.A, - T: v.FreeReward.T, - N: v.FreeReward.N, - }) + switch req.Rtype { + case 1, 2, 3: + if warorder, ok = info.Warorder[req.Rtype]; !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_WarorderNoOpen, + Title: pb.ErrorCode_WarorderNoOpen.ToString(), + Message: fmt.Sprintf("Activity:%d no open", req.Rtype), } - if info.Vip { - if info.Payprogress < v.Parameter { + return + } + + days = int32(utils.DiffDays(configure.Now().Unix(), warorder.Opentime)) + 1 + awards = make([]*cfg.Gameatn, 0) + for _, v := range confs { + if v.Parameter <= days { + if warorder.Freeprogress < v.Parameter { + awards = append(awards, v.FreeReward) + ads = append(ads, &pb.UserAssets{ + A: v.FreeReward.A, + T: v.FreeReward.T, + N: v.FreeReward.N, + }) + } + if warorder.Vip { + if warorder.Payprogress < v.Parameter { + awards = append(awards, v.PayReward) + ads = append(ads, &pb.UserAssets{ + A: v.PayReward.A, + T: v.PayReward.T, + N: v.PayReward.N, + }) + } + } + } + } + warorder.Freeprogress = days + if warorder.Vip { + warorder.Payprogress = days + } + case 4: + if dwarorder, ok = info.Dreamwarorder[req.Rtype]; !ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_WarorderNoOpen, + Title: pb.ErrorCode_WarorderNoOpen.ToString(), + Message: fmt.Sprintf("Activity:%d no open", req.Rtype), + } + return + } + if dwarorder.Vip == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: "no vip", + } + return + } + awards = make([]*cfg.Gameatn, 0) + for _, v := range confs { + if v.Parameter <= dwarorder.Lv { + if warorder.Payprogress < v.Parameter { awards = append(awards, v.PayReward) ads = append(ads, &pb.UserAssets{ A: v.PayReward.A, @@ -78,24 +116,22 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.WarorderReceiveR } } } + warorder.Payprogress = dwarorder.Lv } - info.Freeprogress = days - if info.Vip { - info.Payprogress = days - } + if errdata = this.module.DispenseRes(session, awards, true); errdata != nil { return } - if err = this.module.modelWarorder.updateUserWarorders(session.GetUserId(), warorders); err != nil { + if err = this.module.model.updateUserWarorders(session.GetUserId(), info); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), - Message: fmt.Sprintf("Activity:%d no open", req.Rtype), + Message: err.Error(), } return } - session.SendMsg(string(this.module.GetType()), "receive", &pb.WarorderReceiveResp{Rtype: req.Rtype, Info: info, Award: ads}) + session.SendMsg(string(this.module.GetType()), "receive", &pb.WarorderReceiveResp{Rtype: req.Rtype, Info: warorder, Award: ads}) return } diff --git a/modules/warorder/configure.go b/modules/warorder/configure.go index 4e7be8be8..6c4a2360e 100644 --- a/modules/warorder/configure.go +++ b/modules/warorder/configure.go @@ -2,6 +2,7 @@ package warorder import ( "fmt" + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/sys/configure" @@ -10,21 +11,26 @@ import ( ) const ( - game_passcheck = "game_passcheck.json" + game_passcheck = "game_passcheck.json" + game_passcheckexp = "game_passcheckexp.json" + game_passchecktask = "game_passchecktask.json" ) type configureComp struct { modules.MCompConfigure module *Warorder lock sync.RWMutex - product map[string]int32 //商品id - order map[int32][]*cfg.GamePassCheckData //战令 + product map[string]int32 //商品id + order map[int32][]*cfg.GamePassCheckData //战令 + exps map[int32][]*cfg.GamePassCheckExpData //战令 } 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.(*Warorder) - configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.updateconfigure) + err = this.LoadConfigure(game_passchecktask, cfg.NewGamePassCheckTask) + configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.updatePassCheck) + configure.RegisterConfigure(game_passcheckexp, cfg.NewGamePassCheckExp, this.updatePassCheckExp) return } @@ -43,6 +49,16 @@ func (this *configureComp) getorder(wtype int32) (results []*cfg.GamePassCheckDa return } +func (this *configureComp) getexp(wtype int32) (results []*cfg.GamePassCheckExpData, err error) { + this.lock.RLock() + defer this.lock.RUnlock() + var ok bool + if results, ok = this.exps[wtype]; !ok { + err = fmt.Errorf("no found wtype:%d", wtype) + } + return +} + // 读取任务配置表 func (this *configureComp) getPassCheckCfg() (data *cfg.GamePassCheck, err error) { var ( @@ -61,7 +77,7 @@ func (this *configureComp) getPassCheckCfg() (data *cfg.GamePassCheck, err error } // 更新任务配置表 -func (this *configureComp) updateconfigure() { +func (this *configureComp) updatePassCheck() { gwt, err := this.getPassCheckCfg() if err != nil { this.module.Error("世界任务配置表异常!") @@ -84,3 +100,103 @@ func (this *configureComp) updateconfigure() { this.order = orderConf this.lock.Unlock() } + +// 更新任务配置表 +func (this *configureComp) updatePassCheckExp() { + var ( + v interface{} + conf *cfg.GamePassCheckExp + err error + ok bool + ) + if v, err = this.GetConfigure(game_passcheck); err != nil { + return + } else { + if conf, ok = v.(*cfg.GamePassCheckExp); !ok { + err = fmt.Errorf("%T is *cfg.GamePassCheckExp", v) + return + } + } + + exps := make(map[int32][]*cfg.GamePassCheckExpData) + for _, v := range conf.GetDataList() { + if _, ok := exps[v.PasscheckType]; !ok { + exps[v.PasscheckType] = make([]*cfg.GamePassCheckExpData, 0) + } + exps[v.PasscheckType] = append(exps[v.PasscheckType], v) + } + + this.lock.Lock() + this.exps = exps + this.lock.Unlock() +} + +// 读取任务配置表 +func (this *configureComp) getGamePassCheckTask() (confs []*cfg.GamePassCheckTaskData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_passchecktask); err != nil { + return + } else { + confs = v.(*cfg.GamePassCheckTask).GetDataList() + } + return +} + +// 读取任务配置表 +func (this *configureComp) getGamePassCheckTaskById(id int32) (conf *cfg.GamePassCheckTaskData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_passchecktask); err != nil { + return + } else { + if conf, ok = v.(*cfg.GamePassCheckTask).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_passchecktask, id) + this.module.Errorln(err) + return + } + } + return +} + +func (this *configureComp) getWarorderLvByExp(exp int32, wtype int32) (conf *cfg.GamePassCheckExpData, err error) { + var ( + exps []*cfg.GamePassCheckExpData + ) + + if exps, err = this.getexp(wtype); err != nil { + this.module.Errorln(err) + return + } + + for _, v := range exps { + if exp < v.Parameter { + conf = v + return + } + } + return +} + +func (this *configureComp) getWarorderLvp(lv int32, wtype int32) (conf *cfg.GamePassCheckExpData, err error) { + var ( + exps []*cfg.GamePassCheckExpData + ) + + if exps, err = this.getexp(wtype); err != nil { + this.module.Errorln(err) + return + } + + for _, v := range exps { + if lv == v.Id { + conf = v + return + } + } + err = fmt.Errorf("lv:%d no conf !", lv) + return +} diff --git a/modules/warorder/modelWarorder.go b/modules/warorder/modelWarorder.go index 4e32678f8..25e68c41a 100644 --- a/modules/warorder/modelWarorder.go +++ b/modules/warorder/modelWarorder.go @@ -7,6 +7,8 @@ import ( "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" "sync" "go.mongodb.org/mongo-driver/bson/primitive" @@ -58,9 +60,10 @@ func (this *modelWarorder) getUserWarorders(uid string) (results *pb.DBWarorders if err == mgo.MongodbNil { err = nil results = &pb.DBWarorders{ - Id: primitive.NewObjectID().Hex(), - Uid: uid, - Items: make(map[int32]*pb.Warorder), + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Warorder: make(map[int32]*pb.Warorder), + Dreamwarorder: make(map[int32]*pb.DreamWarorder), } err = this.Add(uid, results) } @@ -69,10 +72,55 @@ func (this *modelWarorder) getUserWarorders(uid string) (results *pb.DBWarorders func (this *modelWarorder) updateUserWarorders(uid string, data *pb.DBWarorders) (err error) { if err = this.Change(uid, map[string]interface{}{ - "items": data.Items, + "warorder": data.Warorder, + "dreamwarorder": data.Dreamwarorder, }); err != nil { this.module.Error("更新用户任务数据 错误!", log.Field{Key: "err", Value: err.Error()}) return } return } + +//刷新日常任务 +func (this *modelWarorder) refreshDayTask(info *pb.DreamWarorder, confs []*cfg.GamePassCheckTaskData, num int32) { + var ( + tasks []*cfg.GamePassCheckTaskData = make([]*cfg.GamePassCheckTaskData, 0) + weight []int32 = make([]int32, 0) + indexs []int = make([]int, 0) + ) + for _, v := range confs { + if v.Page == 1 { + tasks = append(tasks, v) + weight = append(weight, v.Pro) + } + } + + indexs = comm.GetRandWs(weight, num) + + for _, i := range indexs { + info.Daytasks = append(info.Daytasks, tasks[i].Id) + } + info.Daytime = configure.Now().Unix() +} + +//刷新日常任务 +func (this *modelWarorder) refreshWeekTask(info *pb.DreamWarorder, confs []*cfg.GamePassCheckTaskData, num int32) { + var ( + tasks []*cfg.GamePassCheckTaskData = make([]*cfg.GamePassCheckTaskData, 0) + weight []int32 = make([]int32, 0) + indexs []int = make([]int, 0) + ) + for _, v := range confs { + if v.Page == 2 { + tasks = append(tasks, v) + weight = append(weight, v.Pro) + } + } + + indexs = comm.GetRandWs(weight, num) + + for _, i := range indexs { + info.Weektasks = append(info.Daytasks, tasks[i].Id) + } + info.Weektime = configure.Now().Unix() +} diff --git a/modules/warorder/module.go b/modules/warorder/module.go index 00165a056..e10b554a5 100644 --- a/modules/warorder/module.go +++ b/modules/warorder/module.go @@ -12,10 +12,10 @@ const modulename = "战令" type Warorder struct { modules.ModuleBase - service core.IService - api *apiComp - configure *configureComp - modelWarorder *modelWarorder + service core.IService + api *apiComp + configure *configureComp + model *modelWarorder } func NewModule() core.IModule { @@ -41,7 +41,7 @@ func (this *Warorder) Start() (err error) { func (this *Warorder) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) - this.modelWarorder = this.RegisterComp(new(modelWarorder)).(*modelWarorder) + this.model = this.RegisterComp(new(modelWarorder)).(*modelWarorder) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } @@ -56,7 +56,6 @@ func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata * ok bool ) product = this.configure.getproduct() - if _, ok = product[pid]; !ok { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, @@ -66,7 +65,7 @@ func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata * return } wtype = product[pid] - if warorders, err = this.modelWarorder.getUserWarorders(session.GetUserId()); err != nil { + if warorders, err = this.model.getUserWarorders(session.GetUserId()); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_DBError, Title: pb.ErrorCode_DBError.ToString(), @@ -75,22 +74,28 @@ func (this *Warorder) Delivery(session comm.IUserSession, pid string) (errdata * return } - if info, ok = warorders.Items[wtype]; !ok { + if info, ok = warorders.Warorder[wtype]; !ok { info = &pb.Warorder{ Vip: true, } - warorders.Items[wtype] = info + warorders.Warorder[wtype] = info } info.Vip = true - this.modelWarorder.updateUserWarorders(session.GetUserId(), warorders) + this.model.updateUserWarorders(session.GetUserId(), warorders) return } // 活动开启 func (this *Warorder) ActivityOpenNotice(hdlist *pb.DBHuodong) { switch hdlist.Itype { - case comm.HdTypeWarorder: - this.modelWarorder.setopentime(2, hdlist) + case pb.HdType_HdTypeWarorder: + this.model.setopentime(2, hdlist) + break + case pb.HdType_SupplyWarOrder: + this.model.setopentime(3, hdlist) + break + case pb.HdType_MoondreamWarOrder: + this.model.setopentime(4, hdlist) break } } diff --git a/pb/dreamwarorder_msg.pb.go b/pb/dreamwarorder_msg.pb.go deleted file mode 100644 index 17bb716a9..000000000 --- a/pb/dreamwarorder_msg.pb.go +++ /dev/null @@ -1,490 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.20.0 -// source: dreamwarorder/dreamwarorder_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 DreamWarorderInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DreamWarorderInfoReq) Reset() { - *x = DreamWarorderInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DreamWarorderInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DreamWarorderInfoReq) ProtoMessage() {} - -func (x *DreamWarorderInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_dreamwarorder_dreamwarorder_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 DreamWarorderInfoReq.ProtoReflect.Descriptor instead. -func (*DreamWarorderInfoReq) Descriptor() ([]byte, []int) { - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP(), []int{0} -} - -//如梦战令 回应 -type DreamWarorderInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conlds []*ConIProgress `protobuf:"bytes,1,rep,name=conlds,proto3" json:"conlds"` //子任务进度数据 - Info *DBDreamWarorder `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` -} - -func (x *DreamWarorderInfoResp) Reset() { - *x = DreamWarorderInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DreamWarorderInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DreamWarorderInfoResp) ProtoMessage() {} - -func (x *DreamWarorderInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_dreamwarorder_dreamwarorder_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 DreamWarorderInfoResp.ProtoReflect.Descriptor instead. -func (*DreamWarorderInfoResp) Descriptor() ([]byte, []int) { - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP(), []int{1} -} - -func (x *DreamWarorderInfoResp) GetConlds() []*ConIProgress { - if x != nil { - return x.Conlds - } - return nil -} - -func (x *DreamWarorderInfoResp) GetInfo() *DBDreamWarorder { - if x != nil { - return x.Info - } - return nil -} - -//如梦战令 购买等级 -type DreamWarorderBuyLvReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Lv int32 `protobuf:"varint,1,opt,name=lv,proto3" json:"lv"` -} - -func (x *DreamWarorderBuyLvReq) Reset() { - *x = DreamWarorderBuyLvReq{} - if protoimpl.UnsafeEnabled { - mi := &file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DreamWarorderBuyLvReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DreamWarorderBuyLvReq) ProtoMessage() {} - -func (x *DreamWarorderBuyLvReq) ProtoReflect() protoreflect.Message { - mi := &file_dreamwarorder_dreamwarorder_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 DreamWarorderBuyLvReq.ProtoReflect.Descriptor instead. -func (*DreamWarorderBuyLvReq) Descriptor() ([]byte, []int) { - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP(), []int{2} -} - -func (x *DreamWarorderBuyLvReq) GetLv() int32 { - if x != nil { - return x.Lv - } - return 0 -} - -//如梦战令 购买等级 回应 -type DreamWarorderBuyLvResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Info *DBDreamWarorder `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` -} - -func (x *DreamWarorderBuyLvResp) Reset() { - *x = DreamWarorderBuyLvResp{} - if protoimpl.UnsafeEnabled { - mi := &file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DreamWarorderBuyLvResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DreamWarorderBuyLvResp) ProtoMessage() {} - -func (x *DreamWarorderBuyLvResp) ProtoReflect() protoreflect.Message { - mi := &file_dreamwarorder_dreamwarorder_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 DreamWarorderBuyLvResp.ProtoReflect.Descriptor instead. -func (*DreamWarorderBuyLvResp) Descriptor() ([]byte, []int) { - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP(), []int{3} -} - -func (x *DreamWarorderBuyLvResp) GetInfo() *DBDreamWarorder { - if x != nil { - return x.Info - } - return nil -} - -//如梦战令 请求 -type DreamWarorderReceiveReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` -} - -func (x *DreamWarorderReceiveReq) Reset() { - *x = DreamWarorderReceiveReq{} - if protoimpl.UnsafeEnabled { - mi := &file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DreamWarorderReceiveReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DreamWarorderReceiveReq) ProtoMessage() {} - -func (x *DreamWarorderReceiveReq) ProtoReflect() protoreflect.Message { - mi := &file_dreamwarorder_dreamwarorder_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 DreamWarorderReceiveReq.ProtoReflect.Descriptor instead. -func (*DreamWarorderReceiveReq) Descriptor() ([]byte, []int) { - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP(), []int{4} -} - -func (x *DreamWarorderReceiveReq) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -//如梦战令 请求 回应 -type DreamWarorderReceiveResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` - Award []*UserAssets `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 -} - -func (x *DreamWarorderReceiveResp) Reset() { - *x = DreamWarorderReceiveResp{} - if protoimpl.UnsafeEnabled { - mi := &file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DreamWarorderReceiveResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DreamWarorderReceiveResp) ProtoMessage() {} - -func (x *DreamWarorderReceiveResp) ProtoReflect() protoreflect.Message { - mi := &file_dreamwarorder_dreamwarorder_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 DreamWarorderReceiveResp.ProtoReflect.Descriptor instead. -func (*DreamWarorderReceiveResp) Descriptor() ([]byte, []int) { - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP(), []int{5} -} - -func (x *DreamWarorderReceiveResp) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *DreamWarorderReceiveResp) GetAward() []*UserAssets { - if x != nil { - return x.Award - } - return nil -} - -var File_dreamwarorder_dreamwarorder_msg_proto protoreflect.FileDescriptor - -var file_dreamwarorder_dreamwarorder_msg_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, - 0x64, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x73, - 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x61, - 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x61, 0x72, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, - 0x75, 0x72, 0x69, 0x65, 0x64, 0x2f, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x64, 0x0a, 0x15, 0x44, 0x72, 0x65, - 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x44, 0x72, 0x65, 0x61, - 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, - 0x27, 0x0a, 0x15, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x42, 0x75, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x3e, 0x0a, 0x16, 0x44, 0x72, 0x65, 0x61, - 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4c, 0x76, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x44, 0x42, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x72, 0x65, 0x61, - 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x18, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, - 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_dreamwarorder_dreamwarorder_msg_proto_rawDescOnce sync.Once - file_dreamwarorder_dreamwarorder_msg_proto_rawDescData = file_dreamwarorder_dreamwarorder_msg_proto_rawDesc -) - -func file_dreamwarorder_dreamwarorder_msg_proto_rawDescGZIP() []byte { - file_dreamwarorder_dreamwarorder_msg_proto_rawDescOnce.Do(func() { - file_dreamwarorder_dreamwarorder_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_dreamwarorder_dreamwarorder_msg_proto_rawDescData) - }) - return file_dreamwarorder_dreamwarorder_msg_proto_rawDescData -} - -var file_dreamwarorder_dreamwarorder_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_dreamwarorder_dreamwarorder_msg_proto_goTypes = []interface{}{ - (*DreamWarorderInfoReq)(nil), // 0: DreamWarorderInfoReq - (*DreamWarorderInfoResp)(nil), // 1: DreamWarorderInfoResp - (*DreamWarorderBuyLvReq)(nil), // 2: DreamWarorderBuyLvReq - (*DreamWarorderBuyLvResp)(nil), // 3: DreamWarorderBuyLvResp - (*DreamWarorderReceiveReq)(nil), // 4: DreamWarorderReceiveReq - (*DreamWarorderReceiveResp)(nil), // 5: DreamWarorderReceiveResp - (*ConIProgress)(nil), // 6: ConIProgress - (*DBDreamWarorder)(nil), // 7: DBDreamWarorder - (*UserAssets)(nil), // 8: UserAssets -} -var file_dreamwarorder_dreamwarorder_msg_proto_depIdxs = []int32{ - 6, // 0: DreamWarorderInfoResp.conlds:type_name -> ConIProgress - 7, // 1: DreamWarorderInfoResp.info:type_name -> DBDreamWarorder - 7, // 2: DreamWarorderBuyLvResp.info:type_name -> DBDreamWarorder - 8, // 3: DreamWarorderReceiveResp.award:type_name -> UserAssets - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_dreamwarorder_dreamwarorder_msg_proto_init() } -func file_dreamwarorder_dreamwarorder_msg_proto_init() { - if File_dreamwarorder_dreamwarorder_msg_proto != nil { - return - } - file_dreamwarorder_dreamwarorder_db_proto_init() - file_buried_buried_db_proto_init() - file_comm_proto_init() - if !protoimpl.UnsafeEnabled { - file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DreamWarorderInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DreamWarorderInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DreamWarorderBuyLvReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DreamWarorderBuyLvResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DreamWarorderReceiveReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dreamwarorder_dreamwarorder_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DreamWarorderReceiveResp); 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_dreamwarorder_dreamwarorder_msg_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_dreamwarorder_dreamwarorder_msg_proto_goTypes, - DependencyIndexes: file_dreamwarorder_dreamwarorder_msg_proto_depIdxs, - MessageInfos: file_dreamwarorder_dreamwarorder_msg_proto_msgTypes, - }.Build() - File_dreamwarorder_dreamwarorder_msg_proto = out.File - file_dreamwarorder_dreamwarorder_msg_proto_rawDesc = nil - file_dreamwarorder_dreamwarorder_msg_proto_goTypes = nil - file_dreamwarorder_dreamwarorder_msg_proto_depIdxs = nil -} diff --git a/pb/warorder_db.pb.go b/pb/warorder_db.pb.go index b006b8e78..c6ddd062b 100644 --- a/pb/warorder_db.pb.go +++ b/pb/warorder_db.pb.go @@ -26,9 +26,10 @@ type DBWarorders struct { 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 - Items map[int32]*Warorder `protobuf:"bytes,3,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //战令数据 + 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 + Warorder map[int32]*Warorder `protobuf:"bytes,3,rep,name=warorder,proto3" json:"warorder" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //普通战令 + Dreamwarorder map[int32]*DreamWarorder `protobuf:"bytes,4,rep,name=dreamwarorder,proto3" json:"dreamwarorder" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //月梦战令 } func (x *DBWarorders) Reset() { @@ -77,9 +78,16 @@ func (x *DBWarorders) GetUid() string { return "" } -func (x *DBWarorders) GetItems() map[int32]*Warorder { +func (x *DBWarorders) GetWarorder() map[int32]*Warorder { if x != nil { - return x.Items + return x.Warorder + } + return nil +} + +func (x *DBWarorders) GetDreamwarorder() map[int32]*DreamWarorder { + if x != nil { + return x.Dreamwarorder } return nil } @@ -164,32 +172,190 @@ func (x *Warorder) GetVip() bool { return false } +//如梦战令 +type DreamWarorder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opentime int64 `protobuf:"varint,1,opt,name=opentime,proto3" json:"opentime"` + Endtime int64 `protobuf:"varint,2,opt,name=endtime,proto3" json:"endtime"` + Vip int32 `protobuf:"varint,3,opt,name=vip,proto3" json:"vip"` + Exp int32 `protobuf:"varint,4,opt,name=exp,proto3" json:"exp"` + Lv int32 `protobuf:"varint,5,opt,name=lv,proto3" json:"lv"` + Daytime int64 `protobuf:"varint,6,opt,name=daytime,proto3" json:"daytime"` + Daytasks []int32 `protobuf:"varint,7,rep,packed,name=daytasks,proto3" json:"daytasks"` + Weektime int64 `protobuf:"varint,8,opt,name=weektime,proto3" json:"weektime"` + Weektasks []int32 `protobuf:"varint,9,rep,packed,name=weektasks,proto3" json:"weektasks"` + Completetasks []int32 `protobuf:"varint,10,rep,packed,name=completetasks,proto3" json:"completetasks"` + Payprogress int32 `protobuf:"varint,11,opt,name=payprogress,proto3" json:"payprogress"` +} + +func (x *DreamWarorder) Reset() { + *x = DreamWarorder{} + if protoimpl.UnsafeEnabled { + mi := &file_warorder_warorder_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DreamWarorder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DreamWarorder) ProtoMessage() {} + +func (x *DreamWarorder) ProtoReflect() protoreflect.Message { + mi := &file_warorder_warorder_db_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DreamWarorder.ProtoReflect.Descriptor instead. +func (*DreamWarorder) Descriptor() ([]byte, []int) { + return file_warorder_warorder_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DreamWarorder) GetOpentime() int64 { + if x != nil { + return x.Opentime + } + return 0 +} + +func (x *DreamWarorder) GetEndtime() int64 { + if x != nil { + return x.Endtime + } + return 0 +} + +func (x *DreamWarorder) GetVip() int32 { + if x != nil { + return x.Vip + } + return 0 +} + +func (x *DreamWarorder) GetExp() int32 { + if x != nil { + return x.Exp + } + return 0 +} + +func (x *DreamWarorder) GetLv() int32 { + if x != nil { + return x.Lv + } + return 0 +} + +func (x *DreamWarorder) GetDaytime() int64 { + if x != nil { + return x.Daytime + } + return 0 +} + +func (x *DreamWarorder) GetDaytasks() []int32 { + if x != nil { + return x.Daytasks + } + return nil +} + +func (x *DreamWarorder) GetWeektime() int64 { + if x != nil { + return x.Weektime + } + return 0 +} + +func (x *DreamWarorder) GetWeektasks() []int32 { + if x != nil { + return x.Weektasks + } + return nil +} + +func (x *DreamWarorder) GetCompletetasks() []int32 { + if x != nil { + return x.Completetasks + } + return nil +} + +func (x *DreamWarorder) GetPayprogress() int32 { + if x != nil { + return x.Payprogress + } + return 0 +} + var File_warorder_warorder_db_proto protoreflect.FileDescriptor var file_warorder_warorder_db_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x61, 0x72, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a, + 0x64, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 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, 0x2d, - 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x44, 0x42, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x43, 0x0a, - 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x57, - 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x98, 0x01, 0x0a, 0x08, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, - 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, - 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, - 0x64, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x72, 0x65, - 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, - 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x76, - 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x69, 0x70, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x36, + 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x57, + 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x77, 0x61, + 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0d, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x77, + 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x44, 0x42, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x44, 0x72, 0x65, 0x61, + 0x6d, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, + 0x64, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x46, 0x0a, + 0x0d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x50, 0x0a, 0x12, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x61, + 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, + 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x98, 0x01, 0x0a, 0x08, 0x57, 0x61, 0x72, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, + 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, + 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, + 0x69, 0x70, 0x22, 0xb1, 0x02, 0x0a, 0x0d, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, + 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x78, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, + 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, + 0x0a, 0x07, 0x64, 0x61, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x64, 0x61, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x79, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x64, 0x61, 0x79, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x65, 0x65, 0x6b, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x77, 0x65, 0x65, 0x6b, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x65, 0x65, 0x6b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x09, 0x77, 0x65, 0x65, 0x6b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x24, + 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, + 0x0a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -204,20 +370,24 @@ func file_warorder_warorder_db_proto_rawDescGZIP() []byte { return file_warorder_warorder_db_proto_rawDescData } -var file_warorder_warorder_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_warorder_warorder_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_warorder_warorder_db_proto_goTypes = []interface{}{ - (*DBWarorders)(nil), // 0: DBWarorders - (*Warorder)(nil), // 1: Warorder - nil, // 2: DBWarorders.ItemsEntry + (*DBWarorders)(nil), // 0: DBWarorders + (*Warorder)(nil), // 1: Warorder + (*DreamWarorder)(nil), // 2: DreamWarorder + nil, // 3: DBWarorders.WarorderEntry + nil, // 4: DBWarorders.DreamwarorderEntry } var file_warorder_warorder_db_proto_depIdxs = []int32{ - 2, // 0: DBWarorders.items:type_name -> DBWarorders.ItemsEntry - 1, // 1: DBWarorders.ItemsEntry.value:type_name -> Warorder - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 0: DBWarorders.warorder:type_name -> DBWarorders.WarorderEntry + 4, // 1: DBWarorders.dreamwarorder:type_name -> DBWarorders.DreamwarorderEntry + 1, // 2: DBWarorders.WarorderEntry.value:type_name -> Warorder + 2, // 3: DBWarorders.DreamwarorderEntry.value:type_name -> DreamWarorder + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_warorder_warorder_db_proto_init() } @@ -250,6 +420,18 @@ func file_warorder_warorder_db_proto_init() { return nil } } + file_warorder_warorder_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DreamWarorder); 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{ @@ -257,7 +439,7 @@ func file_warorder_warorder_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_warorder_warorder_db_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/warorder_msg.pb.go b/pb/warorder_msg.pb.go index 11b446ef2..b106e7b2f 100644 --- a/pb/warorder_msg.pb.go +++ b/pb/warorder_msg.pb.go @@ -73,7 +73,9 @@ type WarorderInfoResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Info *Warorder `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` + Warorder *Warorder `protobuf:"bytes,1,opt,name=Warorder,proto3" json:"Warorder"` + Dwarorder *DreamWarorder `protobuf:"bytes,2,opt,name=dwarorder,proto3" json:"dwarorder"` + Conlds []*ConIProgress `protobuf:"bytes,3,rep,name=conlds,proto3" json:"conlds"` //子任务进度数据 } func (x *WarorderInfoResp) Reset() { @@ -108,9 +110,23 @@ func (*WarorderInfoResp) Descriptor() ([]byte, []int) { return file_warorder_warorder_msg_proto_rawDescGZIP(), []int{1} } -func (x *WarorderInfoResp) GetInfo() *Warorder { +func (x *WarorderInfoResp) GetWarorder() *Warorder { if x != nil { - return x.Info + return x.Warorder + } + return nil +} + +func (x *WarorderInfoResp) GetDwarorder() *DreamWarorder { + if x != nil { + return x.Dwarorder + } + return nil +} + +func (x *WarorderInfoResp) GetConlds() []*ConIProgress { + if x != nil { + return x.Conlds } return nil } @@ -226,30 +242,297 @@ func (x *WarorderReceiveResp) GetAward() []*UserAssets { return nil } +//如梦战令 购买等级 +type WarorderBuyLvReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"` + Lv int32 `protobuf:"varint,2,opt,name=lv,proto3" json:"lv"` +} + +func (x *WarorderBuyLvReq) Reset() { + *x = WarorderBuyLvReq{} + if protoimpl.UnsafeEnabled { + mi := &file_warorder_warorder_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WarorderBuyLvReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WarorderBuyLvReq) ProtoMessage() {} + +func (x *WarorderBuyLvReq) ProtoReflect() protoreflect.Message { + mi := &file_warorder_warorder_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 WarorderBuyLvReq.ProtoReflect.Descriptor instead. +func (*WarorderBuyLvReq) Descriptor() ([]byte, []int) { + return file_warorder_warorder_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *WarorderBuyLvReq) GetRtype() int32 { + if x != nil { + return x.Rtype + } + return 0 +} + +func (x *WarorderBuyLvReq) GetLv() int32 { + if x != nil { + return x.Lv + } + return 0 +} + +//如梦战令 购买等级 回应 +type WarorderBuyLvResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"` + Lv int32 `protobuf:"varint,2,opt,name=lv,proto3" json:"lv"` + Info *DreamWarorder `protobuf:"bytes,3,opt,name=info,proto3" json:"info"` +} + +func (x *WarorderBuyLvResp) Reset() { + *x = WarorderBuyLvResp{} + if protoimpl.UnsafeEnabled { + mi := &file_warorder_warorder_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WarorderBuyLvResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WarorderBuyLvResp) ProtoMessage() {} + +func (x *WarorderBuyLvResp) ProtoReflect() protoreflect.Message { + mi := &file_warorder_warorder_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 WarorderBuyLvResp.ProtoReflect.Descriptor instead. +func (*WarorderBuyLvResp) Descriptor() ([]byte, []int) { + return file_warorder_warorder_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *WarorderBuyLvResp) GetRtype() int32 { + if x != nil { + return x.Rtype + } + return 0 +} + +func (x *WarorderBuyLvResp) GetLv() int32 { + if x != nil { + return x.Lv + } + return 0 +} + +func (x *WarorderBuyLvResp) GetInfo() *DreamWarorder { + if x != nil { + return x.Info + } + return nil +} + +//如梦战令 完成任务 +type WarorderCompleteTaskReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"` + Tid int32 `protobuf:"varint,2,opt,name=tid,proto3" json:"tid"` +} + +func (x *WarorderCompleteTaskReq) Reset() { + *x = WarorderCompleteTaskReq{} + if protoimpl.UnsafeEnabled { + mi := &file_warorder_warorder_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WarorderCompleteTaskReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WarorderCompleteTaskReq) ProtoMessage() {} + +func (x *WarorderCompleteTaskReq) ProtoReflect() protoreflect.Message { + mi := &file_warorder_warorder_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 WarorderCompleteTaskReq.ProtoReflect.Descriptor instead. +func (*WarorderCompleteTaskReq) Descriptor() ([]byte, []int) { + return file_warorder_warorder_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *WarorderCompleteTaskReq) GetRtype() int32 { + if x != nil { + return x.Rtype + } + return 0 +} + +func (x *WarorderCompleteTaskReq) GetTid() int32 { + if x != nil { + return x.Tid + } + return 0 +} + +//如梦战令 完成任务 回应 +type WarorderCompleteTaskResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"` + Tid int32 `protobuf:"varint,2,opt,name=tid,proto3" json:"tid"` + Exp int32 `protobuf:"varint,3,opt,name=exp,proto3" json:"exp"` +} + +func (x *WarorderCompleteTaskResp) Reset() { + *x = WarorderCompleteTaskResp{} + if protoimpl.UnsafeEnabled { + mi := &file_warorder_warorder_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WarorderCompleteTaskResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WarorderCompleteTaskResp) ProtoMessage() {} + +func (x *WarorderCompleteTaskResp) ProtoReflect() protoreflect.Message { + mi := &file_warorder_warorder_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 WarorderCompleteTaskResp.ProtoReflect.Descriptor instead. +func (*WarorderCompleteTaskResp) Descriptor() ([]byte, []int) { + return file_warorder_warorder_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *WarorderCompleteTaskResp) GetRtype() int32 { + if x != nil { + return x.Rtype + } + return 0 +} + +func (x *WarorderCompleteTaskResp) GetTid() int32 { + if x != nil { + return x.Tid + } + return 0 +} + +func (x *WarorderCompleteTaskResp) GetExp() int32 { + if x != nil { + return x.Exp + } + return 0 +} + var File_warorder_warorder_msg_proto protoreflect.FileDescriptor var file_warorder_warorder_msg_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2f, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0f, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x22, 0x31, - 0x0a, 0x10, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x09, 0x2e, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x22, 0x2a, 0x0a, 0x12, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x22, 0x6d, 0x0a, - 0x13, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x57, 0x61, 0x72, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, - 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x75, 0x72, 0x69, 0x65, + 0x64, 0x2f, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, + 0x0f, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x10, 0x57, 0x61, 0x72, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x08, 0x57, + 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x08, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x09, 0x64, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x09, 0x64, 0x77, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x22, 0x2a, 0x0a, 0x12, 0x57, 0x61, 0x72, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, + 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x6d, 0x0a, 0x13, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, + 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, + 0x72, 0x64, 0x22, 0x38, 0x0a, 0x10, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x75, + 0x79, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x5d, 0x0a, 0x11, + 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x22, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x72, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x41, 0x0a, 0x17, 0x57, + 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x54, + 0x0a, 0x18, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x65, 0x78, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -264,24 +547,33 @@ func file_warorder_warorder_msg_proto_rawDescGZIP() []byte { return file_warorder_warorder_msg_proto_rawDescData } -var file_warorder_warorder_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_warorder_warorder_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_warorder_warorder_msg_proto_goTypes = []interface{}{ - (*WarorderInfoReq)(nil), // 0: WarorderInfoReq - (*WarorderInfoResp)(nil), // 1: WarorderInfoResp - (*WarorderReceiveReq)(nil), // 2: WarorderReceiveReq - (*WarorderReceiveResp)(nil), // 3: WarorderReceiveResp - (*Warorder)(nil), // 4: Warorder - (*UserAssets)(nil), // 5: UserAssets + (*WarorderInfoReq)(nil), // 0: WarorderInfoReq + (*WarorderInfoResp)(nil), // 1: WarorderInfoResp + (*WarorderReceiveReq)(nil), // 2: WarorderReceiveReq + (*WarorderReceiveResp)(nil), // 3: WarorderReceiveResp + (*WarorderBuyLvReq)(nil), // 4: WarorderBuyLvReq + (*WarorderBuyLvResp)(nil), // 5: WarorderBuyLvResp + (*WarorderCompleteTaskReq)(nil), // 6: WarorderCompleteTaskReq + (*WarorderCompleteTaskResp)(nil), // 7: WarorderCompleteTaskResp + (*Warorder)(nil), // 8: Warorder + (*DreamWarorder)(nil), // 9: DreamWarorder + (*ConIProgress)(nil), // 10: ConIProgress + (*UserAssets)(nil), // 11: UserAssets } var file_warorder_warorder_msg_proto_depIdxs = []int32{ - 4, // 0: WarorderInfoResp.info:type_name -> Warorder - 4, // 1: WarorderReceiveResp.info:type_name -> Warorder - 5, // 2: WarorderReceiveResp.award:type_name -> UserAssets - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 8, // 0: WarorderInfoResp.Warorder:type_name -> Warorder + 9, // 1: WarorderInfoResp.dwarorder:type_name -> DreamWarorder + 10, // 2: WarorderInfoResp.conlds:type_name -> ConIProgress + 8, // 3: WarorderReceiveResp.info:type_name -> Warorder + 11, // 4: WarorderReceiveResp.award:type_name -> UserAssets + 9, // 5: WarorderBuyLvResp.info:type_name -> DreamWarorder + 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_warorder_warorder_msg_proto_init() } @@ -290,6 +582,7 @@ func file_warorder_warorder_msg_proto_init() { return } file_warorder_warorder_db_proto_init() + file_buried_buried_db_proto_init() file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_warorder_warorder_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -340,6 +633,54 @@ func file_warorder_warorder_msg_proto_init() { return nil } } + file_warorder_warorder_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WarorderBuyLvReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_warorder_warorder_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WarorderBuyLvResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_warorder_warorder_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WarorderCompleteTaskReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_warorder_warorder_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WarorderCompleteTaskResp); 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{ @@ -347,7 +688,7 @@ func file_warorder_warorder_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_warorder_warorder_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 8, NumExtensions: 0, NumServices: 0, },