diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 596a157e8..ec1120ee4 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -141,7 +141,7 @@ ], "getafter_event": [ 2, - 10004 + 10005 ], "completetask": 0, "auto_accept": 1, diff --git a/cmd/v2/ui/protocol.go b/cmd/v2/ui/protocol.go index 4dbf9509d..952eae2ca 100644 --- a/cmd/v2/ui/protocol.go +++ b/cmd/v2/ui/protocol.go @@ -41,6 +41,8 @@ var ( viewRegister = map[string]MyCaseView{ // gm ff(comm.ModuleGM, "cmd"): &formview.BingoView{}, + // reddot + ff(comm.ModuleReddot, "get"): &formview.ReddotView{}, //sys ff(comm.ModuleSys, "funclist"): &formview.SysFuncListView{}, //user @@ -150,11 +152,13 @@ var ( string(comm.ModuleTroll), string(comm.ModuleGrowtask), string(comm.ModuleWorldtask), + string(comm.ModuleReddot), }, "gm": {ff(comm.ModuleGM, "cmd")}, "sys": { ff(comm.ModuleSys, "funclist"), }, + "reddot": {ff(comm.ModuleReddot, "get")}, "user": { ff(comm.ModuleUser, user.UserSubTypeModifyAvatar), ff(comm.ModuleUser, user.UserSubTypeModifyName), @@ -273,6 +277,18 @@ var ( Rsp: &pb.GMCmdResp{}, Enabled: true, }, + "reddot": { + NavLabel: "红点", + MainType: string(comm.ModuleReddot), + Enabled: true, + }, + ff(comm.ModuleReddot, "get"): { + Desc: "红点", + NavLabel: "红点", + MainType: string(comm.ModuleReddot), + SubType: "get", + Enabled: true, + }, "sys": { NavLabel: "系统", MainType: string(comm.ModuleSys), diff --git a/cmd/v2/ui/views/bingoview.go b/cmd/v2/ui/views/bingoview.go index 079ed1aa2..0d71d1fd7 100644 --- a/cmd/v2/ui/views/bingoview.go +++ b/cmd/v2/ui/views/bingoview.go @@ -46,7 +46,7 @@ func (this *BingoView) CreateView(t *model.TestCase) fyne.CanvasObject { aSel = &widget.Select{} gridContainer = container.NewGridWithColumns(3, aSel, tEntry, nEntry) - aSel.Options = []string{"选择", "attr", "item", "hero", "equi", "mapid", "pataid", "rtask"} + aSel.Options = []string{"选择", "attr", "item", "hero", "equi", "mapid", "pataid", "worldtask"} aSel.SetSelected("选择") aSel.OnChanged = func(s string) { if s == "attr" { diff --git a/cmd/v2/ui/views/reddot.go b/cmd/v2/ui/views/reddot.go new file mode 100644 index 000000000..45b84cdc5 --- /dev/null +++ b/cmd/v2/ui/views/reddot.go @@ -0,0 +1,37 @@ +package formview + +import ( + "go_dreamfactory/cmd/v2/model" + "go_dreamfactory/cmd/v2/service" + "go_dreamfactory/pb" + "strings" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/widget" + "github.com/sirupsen/logrus" + "github.com/spf13/cast" +) + +type ReddotView struct { + BaseformView +} + +func (this *ReddotView) CreateView(t *model.TestCase) fyne.CanvasObject { + reddotTypeEntry := widget.NewEntry() + + this.form.AppendItem(widget.NewFormItem("红点类型", reddotTypeEntry)) + this.form.OnSubmit = func() { + typesStr := strings.Split(reddotTypeEntry.Text, ",") + var rids []int32 + for _, s := range typesStr { + rids = append(rids, cast.ToInt32(s)) + } + if err := service.GetPttService().SendToClient(t.MainType, "get", + &pb.ReddotGetReq{ + Rids: rids, + }); err != nil { + logrus.Error(err) + } + } + return this.form +} diff --git a/cmd/v2/ui/views/worldtask_mine.go b/cmd/v2/ui/views/worldtask_mine.go index 105c5fde9..81963bce8 100644 --- a/cmd/v2/ui/views/worldtask_mine.go +++ b/cmd/v2/ui/views/worldtask_mine.go @@ -72,7 +72,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject { logrus.Error(err) } dconf.Hide() - // this.mineReq() + this.mineReq() } form.SubmitText = "确定" dconf.Resize(fyne.NewSize(400, 200)) diff --git a/comm/const.go b/comm/const.go index e8e448768..0a68df268 100644 --- a/comm/const.go +++ b/comm/const.go @@ -228,10 +228,15 @@ const ( //Rpc Rpc_ModuleArenaRaceSettlement core.Rpc_Key = "Rpc_ModuleArenaRaceSettlement" //竞技场比赛结算信息 // 充值发货 - Rpc_ModulePayDelivery core.Rpc_Key = "Rpc_ModuleArenaRaceSettlement" //充值发货 + Rpc_ModulePayDelivery core.Rpc_Key = "Rpc_ModulePayDelivery" //充值发货 // 羁绊信息 Rpc_ModuleFetter core.Rpc_Key = "Rpc_ModuleFetter" + + // 赛季塔计算邮件奖励 + Rpc_ModuleSeasonPagodaReward core.Rpc_Key = "Rpc_ModuleSeasonPagodaReward" + // 公会信息 + Rpc_ModuleSociaty core.Rpc_Key = "Rpc_ModuleSociaty" ) //事件类型定义处 diff --git a/comm/imodule.go b/comm/imodule.go index 24be2b0da..ee9343475 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -137,6 +137,8 @@ type ( GetTaskById(uid string, taskId int32) *pb.DBTask // 获取已完成的任务列表 GetTaskFinished(uid string, taskType TaskTag) []*pb.DBTask + // 红点 + Reddot(uid string, rid ...ReddotType) map[ReddotType]bool } // 随机任务 @@ -230,6 +232,8 @@ type ( MembersByUid(uid string) (list []*pb.SociatyMemberInfo) // 获取公会成员 MembersBySociatyId(sociatyId string) (list []*pb.SociatyMemberInfo) + //红点 + Reddot(uid string, rid ...ReddotType) map[ReddotType]bool } //星座图 IHoroscope interface { diff --git a/modules/battle/module.go b/modules/battle/module.go index cc0d6dea7..746fab713 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -178,4 +178,5 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt this.moonfantasy.Trigger(session, report) return pb.ErrorCode_Success, true + } diff --git a/modules/gm/module.go b/modules/gm/module.go index 8f35875ee..0dbe02a6f 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -125,11 +125,17 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC } } this.Debugf("使用bingo命令", log.Field{"uid", session.GetUserId()}, datas[0], res) - } else if len(datas) == 3 && (datas[0] == "rtask") { - err := this.ModuleRtask.BingoRtask(session, utils.ToInt32(datas[1]), utils.ToInt32(datas[2])) + } else if len(datas) == 3 && (datas[0] == "worldtask") { + module, err := this.service.GetModule(comm.ModuleWorldtask) if err != nil { - this.Errorf("bingo rdTask Failed ,Parameter :%s,%s %v", datas[1], datas[2], err) + return } + if wt, ok := module.(comm.IWorldtask); ok { + if err = wt.BingoJumpTask(session, utils.ToInt32(datas[1]), utils.ToInt32(datas[2])); err != nil { + this.Errorf("bingo worldTask Failed ,Parameter :%s,%s %v", datas[1], datas[2], err) + } + } + } } diff --git a/modules/hero/api_talentreset.go b/modules/hero/api_talentreset.go index 2d716ddf0..d00c12d5e 100644 --- a/modules/hero/api_talentreset.go +++ b/modules/hero/api_talentreset.go @@ -3,6 +3,7 @@ package hero import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "google.golang.org/protobuf/proto" ) @@ -17,8 +18,9 @@ func (this *apiComp) TalentResetCheck(session comm.IUserSession, req *pb.HeroTal func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentResetReq) (code pb.ErrorCode, data proto.Message) { var ( - heroList []*pb.DBHero - chanegCard []*pb.DBHero // 推送属性变化 + heroList []*pb.DBHero + chanegCard []*pb.DBHero // 推送属性变化 + talentPoint int32 // 已经消耗的天赋点数 ) if code = this.TalentResetCheck(session, req); code != pb.ErrorCode_Success { return @@ -41,6 +43,22 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe return } + for k := range _talent.Talent { + if conf := this.module.configure.GetHeroTalent(k); conf != nil { + talentPoint += conf.Point // 获取当前英雄的天赋点数 + } + } + if t := this.module.configure.GetHeroTalentBoxItem(_talent.HeroId); t != "" { + res := &cfg.Gameatn{ + A: "item", + T: t, + N: talentPoint, + } + if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success { + this.module.Errorf("DispenseRes err,uid:%s,item:%v", session.GetUserId(), res) + } // 返还升级的天赋点数 + } + if len(_talent.Talent) > 0 { update := make(map[string]interface{}, 0) szTalent := map[int32]int32{} diff --git a/modules/pagoda/api_ranklist.go b/modules/pagoda/api_ranklist.go index 534b1509d..3f6eb0b3b 100644 --- a/modules/pagoda/api_ranklist.go +++ b/modules/pagoda/api_ranklist.go @@ -45,8 +45,6 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.PagodaRankListR return } _data3 := rd.Val() - _data, err2 := rd.Result() - this.module.Errorln(_data, err2, _data3) for _, v := range _data3 { conn_, err := db.Cross() dbModel := db.NewDBModel(comm.TableSeasonRecord, time.Hour, conn_) diff --git a/modules/pagoda/comp_configure.go b/modules/pagoda/comp_configure.go index 2aa86a989..91a426b12 100644 --- a/modules/pagoda/comp_configure.go +++ b/modules/pagoda/comp_configure.go @@ -1,6 +1,7 @@ package pagoda import ( + "fmt" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" @@ -63,6 +64,9 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp log.Errorf("get game_pagoda conf err:%v", err) return }) + + _data := this.GetPagodaSeasonReward() + fmt.Printf("%v", _data) return } @@ -163,3 +167,21 @@ func (this *configureComp) GetPassCheckByID(id int32) *cfg.GamePassCheckData { } return nil } + +// 获取 +func (this *configureComp) GetPagodaSeasonReward() [][]int32 { + rank := make([][]int32, 0) + if v, err := this.GetConfigure(game_pagodaseasonreward); err == nil { + var ( + configure *cfg.GamePagodaSeasonReward + ok bool + ) + if configure, ok = v.(*cfg.GamePagodaSeasonReward); ok { + for _, v := range configure.GetDataList() { + rank = append(rank, v.Ranking) + } + return rank + } + } + return nil +} diff --git a/modules/pagoda/model_rank.go b/modules/pagoda/model_rank.go index 5f47a2ae9..676a46d80 100644 --- a/modules/pagoda/model_rank.go +++ b/modules/pagoda/model_rank.go @@ -241,3 +241,44 @@ func (this *ModelRank) SetNormalPagodaRankList(tableName string, score int32, ui } } + +func (this *ModelRank) seasonSettlement() { + + list := this.modulePagoda.configure.GetPagodaSeasonReward() + if list == nil { + return + } + if !db.IsCross() { + if conn, err := db.Cross(); err == nil { + var ( + pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO()) + //Items []*pb.UserAssets + ) + + rd := pipe.ZRange("pagodaSeasonRank0", 0, 50) + + if _, err = pipe.Exec(); err != nil { + this.modulePagoda.Errorln(err) + return + } + uids := rd.Val() + + if len(uids) > 0 { + //Items = make([]*pb.UserAssets, 0) //TO 排名配置 + // for i, v := range v.RankReward { + // Items[i] = &pb.UserAssets{ + // A: v.A, + // T: v.T, + // N: v.N, + // } + // } + //发邮件 + // this.modulePagoda.mail.SendNewMail(&pb.DBMailData{ + // CreateTime: uint64(configure.Now().Unix()), + // Items: Items, + // }, uids...) + } + } + } + +} diff --git a/modules/pagoda/module.go b/modules/pagoda/module.go index 629469b8a..5a24f6001 100644 --- a/modules/pagoda/module.go +++ b/modules/pagoda/module.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "go_dreamfactory/comm" + "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/redis/pipe" @@ -22,7 +23,8 @@ type Pagoda struct { modulerank *ModelRank configure *configureComp battle comm.IBattle - service core.IService + service base.IRPCXService + //mail comm.Imail } func NewModule() core.IModule { @@ -35,7 +37,7 @@ func (this *Pagoda) GetType() core.M_Modules { func (this *Pagoda) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) - this.service = service + this.service = service.(base.IRPCXService) return } @@ -71,8 +73,12 @@ func (this *Pagoda) Start() (err error) { if module, err = this.service.GetModule(comm.ModuleBattle); err != nil { return } - + // if module, err = this.service.GetModule(comm.ModuleMail); err != nil { + // return + // } + //this.mail = module.(comm.Imail) this.battle = module.(comm.IBattle) + this.service.RegisterFunctionName(string(comm.Rpc_ModuleSeasonPagodaReward), this.Rpc_ModuleSeasonPagodaReward) return } @@ -169,3 +175,7 @@ func (this *Pagoda) CheckPoint(uid string) bool { } return true } +func (this *Pagoda) Rpc_ModuleSeasonPagodaReward(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) { + this.Debug("Rpc_ModuleSeasonPagodaReward", log.Field{Key: "args", Value: args.String()}) + this.modulerank.seasonSettlement() +} diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index 490103ab5..120989827 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -21,8 +21,27 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (code if code = this.GetCheck(session, req); code != pb.ErrorCode_Success { return } - for _, v := range req.Rids { - reddot[v] = false + for _, rid := range req.Rids { + // reddot[v] = false + switch rid { + case int32(comm.Reddot1): + for k, v := range this.module.ModuleTask.Reddot(session.GetUserId(), comm.Reddot1) { + reddot[int32(k)] = v + } + case int32(comm.Reddot2): + for k, v := range this.module.ModuleTask.Reddot(session.GetUserId(), comm.Reddot2) { + reddot[int32(k)] = v + } + case int32(comm.Reddot3): + for k, v := range this.module.ModuleSociaty.Reddot(session.GetUserId(), comm.Reddot3) { + reddot[int32(k)] = v + } + case int32(comm.Reddot4): + for k, v := range this.module.ModuleTask.Reddot(session.GetUserId(), comm.Reddot2) { + reddot[int32(k)] = v + } + } + } // for k, v := range this.module.martialhall.Reddot(session.GetUserId(), comm.Reddot1) { // reddot[int32(k)] = v diff --git a/modules/rtask/model_record.go b/modules/rtask/model_record.go index 1317c3eb9..b7787a3fd 100644 --- a/modules/rtask/model_record.go +++ b/modules/rtask/model_record.go @@ -53,17 +53,17 @@ func (this *ModelRtaskRecord) getRecord(uid string) *pb.DBRtaskRecord { // 玩家登录时调用 func (this *ModelRtaskRecord) initCondiData(uid string) error { dr := this.getRecord(uid) - // 获取rdtask_condi配置表数据 - grc, err := this.moduleRtask.configure.getRtaskCondiCfg() - if err != nil { - return err - } - if grc == nil { - return errors.New("配置空[rdtaskcondi] err") - } - // 判断是否有记录 if dr.Vals == nil || len(dr.Vals) == 0 { + // 获取rdtask_condi配置表数据 + grc, err := this.moduleRtask.configure.getRtaskCondiCfg() + if err != nil { + return err + } + if grc == nil { + return errors.New("配置空[rdtaskcondi] err") + } + record := &pb.DBRtaskRecord{Uid: uid} record.Id = primitive.NewObjectID().Hex() record.Vals = make(map[int32]*pb.RtaskData) diff --git a/modules/rtask/updateHandle.go b/modules/rtask/updateHandle.go index 59ecb374f..daefae308 100644 --- a/modules/rtask/updateHandle.go +++ b/modules/rtask/updateHandle.go @@ -9,7 +9,6 @@ import ( cfg "go_dreamfactory/sys/configure/structs" "github.com/pkg/errors" - "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" ) @@ -30,42 +29,29 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond } if record.Vals == nil { + record.Vals = make(map[int32]*pb.RtaskData) + } + + if v, ok := record.Vals[cfg.Id]; ok { + m := hasUpdateData(paramLen, v, vals...) + if len(m) > 0 { + update := map[string]interface{}{ + "vals": m, + } + err = this.Change(uid, update) + } + } else { data := &pb.RtaskData{ Rtype: cfg.Type, Data: toMap(vals...), Timestamp: configure.Now().Unix(), } - record.Vals = map[int32]*pb.RtaskData{ - cfg.Id: data, - } - record.Id = primitive.NewObjectID().Hex() - record.Uid = uid + record.Vals[cfg.Id] = data - if err := this.Add(uid, record); err != nil { - return errors.Wrapf(err, "添加玩家任务记录 err: %v rtype[%v]", uid, cfg.Id) - } - } else { - if v, ok := record.Vals[cfg.Id]; ok { - m := hasUpdateData(paramLen, v, vals...) - if len(m) > 0 { - update := map[string]interface{}{ - "vals": m, - } - err = this.Change(uid, update) - } - } else { - data := &pb.RtaskData{ - Rtype: cfg.Type, - Data: toMap(vals...), - Timestamp: configure.Now().Unix(), - } - record.Vals[cfg.Id] = data - - update := map[string]interface{}{ - "vals": record.Vals, - } - err = this.Change(uid, update) + update := map[string]interface{}{ + "vals": record.Vals, } + err = this.Change(uid, update) } this.listenTask(uid, cfg.Id) @@ -74,10 +60,6 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond // 累计更新 - 招募等 func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData, vals ...int32) (err error) { - // t := configure.Now() - // defer func() { - // log.Debugf("add update耗时:%v", time.Since(t)) - // }() record := &pb.DBRtaskRecord{Uid: uid} err = this.Get(uid, record) if err != nil { @@ -87,44 +69,32 @@ func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData } if record.Vals == nil { - record.Id = primitive.NewObjectID().Hex() - data := &pb.RtaskData{ + record.Vals = make(map[int32]*pb.RtaskData) + } + //查找任务数据 + if v, ok := record.Vals[cfg.Id]; ok { + newCount := make([]int32, len(vals)) + srcCount := v.Data[0] + newCount[0] = srcCount + vals[0] + v.Data = toMap(newCount...) + v.Timestamp = configure.Now().Unix() + + update := map[string]interface{}{ + "vals": record.Vals, + } + err = this.Change(uid, update) + } else { + record.Vals[cfg.Id] = &pb.RtaskData{ Data: toMap(vals...), Rtype: cfg.Type, Timestamp: configure.Now().Unix(), } - - record.Vals = map[int32]*pb.RtaskData{ - cfg.Id: data, - } - if err := this.Add(uid, record); err != nil { - return errors.Wrapf(err, "添加玩家任务记录 err: %v rtype[%v]", uid, cfg.Id) - } - } else { - //查找任务数据 - if v, ok := record.Vals[cfg.Id]; ok { - newCount := make([]int32, len(vals)) - srcCount := v.Data[0] - newCount[0] = srcCount + vals[0] - v.Data = toMap(newCount...) - v.Timestamp = configure.Now().Unix() - - update := map[string]interface{}{ - "vals": record.Vals, - } - err = this.Change(uid, update) - } else { - record.Vals[cfg.Id] = &pb.RtaskData{ - Data: toMap(vals...), - Rtype: cfg.Type, - Timestamp: configure.Now().Unix(), - } - update := map[string]interface{}{ - "vals": record.Vals, - } - err = this.Change(uid, update) + update := map[string]interface{}{ + "vals": record.Vals, } + err = this.Change(uid, update) } + this.listenTask(uid, cfg.Id) return } diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go index 1357d1376..d5e472734 100644 --- a/modules/sociaty/model_sociaty.go +++ b/modules/sociaty/model_sociaty.go @@ -191,19 +191,45 @@ func (this *ModelSociaty) isDismiss(sociaty *pb.DBSociaty) bool { // 获取玩家所在的公会 func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) { - userEx, err := this.moduleSociaty.ModuleUser.GetRemoteUserExpand(uid) - if err != nil { - return - } - if userEx.SociatyId != "" { - sociaty = this.getSociaty(userEx.SociatyId) - if sociaty.Id != "" { - //验证是否解散 - if this.isDismiss(sociaty) { - sociaty.Id = "" + var ( + userEx *pb.DBUserExpand + err error + ) + if this.moduleSociaty.IsCross() { + userEx, err = this.moduleSociaty.ModuleUser.GetRemoteUserExpand(uid) + if err != nil { + log.Errorf("GetUserExpand uid:%v err:%v", uid, err) + return + } + if userEx.SociatyId != "" { + sociaty = this.getSociaty(userEx.SociatyId) + if sociaty.Id != "" { + //验证是否解散 + if this.isDismiss(sociaty) { + sociaty.Id = "" + } + } + } + } else { + userEx, err = this.moduleSociaty.ModuleUser.GetUserExpand(uid) + if err != nil { + log.Errorf("GetUserExpand uid:%v err:%v", uid, err) + return + } + if userEx.SociatyId != "" { + sociaty = &pb.DBSociaty{} + if err = this.moduleSociaty.service.AcrossClusterRpcCall( + context.Background(), + this.moduleSociaty.GetCrossTag(), + comm.Service_Worker, + string(comm.Rpc_ModuleSociaty), + pb.RPCGeneralReqA1{Param1: userEx.SociatyId}, + sociaty); err != nil { + this.moduleSociaty.Errorln(err) } } } + return } diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go index a22082c8a..a7712a9fe 100644 --- a/modules/sociaty/module.go +++ b/modules/sociaty/module.go @@ -1,9 +1,11 @@ package sociaty import ( + "context" "go_dreamfactory/comm" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" @@ -27,6 +29,7 @@ func NewModule() core.IModule { func (this *Sociaty) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) + this.service = service.(base.IRPCXService) return } @@ -45,10 +48,12 @@ func (this *Sociaty) OnInstallComp() { func (this *Sociaty) Start() (err error) { err = this.ModuleBase.Start() + this.service.RegisterFunctionName(string(comm.Rpc_ModuleSociaty), this.RpcGetSociaty) return } // 会长弹劾处理 +// Deprecated func (this *Sociaty) ProcessAccuse(uid, sociatyId string) { ggd := this.configure.GetGlobalConf() t := ggd.GuildImpeachmentCountDown @@ -86,3 +91,30 @@ func (this *Sociaty) MembersBySociatyId(sociatyId string) (list []*pb.SociatyMem sociaty := this.modelSociaty.getSociaty(sociatyId) return this.modelSociaty.members(sociaty) } + +//公会 +func (this *Sociaty) Reddot(uid string, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) { + reddot = make(map[comm.ReddotType]bool) + sociaty := this.modelSociaty.getUserSociaty(uid) + if sociaty == nil || sociaty.Id == "" { + reddot[comm.Reddot3] = false + return + } + for _, v := range rid { + switch v { + case comm.Reddot3: + if ok := this.modelSociaty.IsSign(uid, sociaty); !ok { + reddot[comm.Reddot3] = true + } + } + } + return +} + +// 跨服获取公会 +func (this *Sociaty) RpcGetSociaty(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.DBSociaty) error { + this.Debug("Rpc_ModuleSociaty", log.Field{Key: "req", Value: req}) + sociaty := this.modelSociaty.getSociaty(req.Param1) + *reply = *sociaty + return nil +} diff --git a/modules/task/model_task.go b/modules/task/model_task.go index fce8500de..196452434 100644 --- a/modules/task/model_task.go +++ b/modules/task/model_task.go @@ -29,6 +29,21 @@ func (this *ModelTask) Init(service core.IService, module core.IModule, comp cor return } +// 查询完成的且未领取的任务 发现未领取返回true +func (this *ModelTask) noReceiveTask(uid string, taskTag comm.TaskTag) (bool, error) { + list := []*pb.DBTask{} + if err := this.GetList(uid, &list); err != nil { + this.moduleTask.Errorf("getTaskList err %v", err) + return false, err + } + for _, v := range list { + if v.Tag == int32(taskTag) && v.Status == 1 && v.Received == 0 { + return true, nil + } + } + return false, nil +} + //获取玩家任务列表 func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newlist []*pb.DBTask) { list := []*pb.DBTask{} @@ -42,7 +57,6 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli return list[i].Sort < list[j].Sort }) - // dr := this.moduleTask.ModuleRtask.GetCondiData(uid) if dr == nil { return @@ -71,7 +85,7 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli return nil } - // 判断上个任务领取了才显示最后一个任务 + // 判断上个成就任务领取了才显示最后一个任务 isReceived := func(taskId int32) bool { if preCnf := this.moduleTask.configure.getPreTask(taskId); preCnf != nil { if preTask := getCurTask(preCnf.Key); preTask != nil { diff --git a/modules/task/module.go b/modules/task/module.go index 52cd8e23e..ead189415 100644 --- a/modules/task/module.go +++ b/modules/task/module.go @@ -1,7 +1,6 @@ package task import ( - "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/event" @@ -128,25 +127,6 @@ func (this *ModuleTask) ResetTask(uid string, taskTag comm.TaskTag) { this.modelTaskActive.clearTask(uid, taskTag) } -//任务处理 -// func (this *ModuleTask) SendToTask(session comm.IUserSession, condiId int32, params ...int32) (code pb.ErrorCode) { -// tl := new(TaskListen) -// tl.Uid = session.GetUserId() -// tl.TaskType = comm.TaskType(condiId) -// this.modelTask.EventApp.Dispatch(comm.EventTaskChanged, tl) -// return -// } - -//创建玩家攻略任务 -func (this *ModuleTask) CreateTaskForStrategy(uid string, heroCfgId int32) { - // - ids := make(map[string]string) - ids, _ = this.modelTask.Redis.HGetAllToMapString(fmt.Sprintf("task:%v_%v", uid, comm.TASK_STRATEGY)) - fmt.Println(ids) - // - -} - // 清理任务数据 func (this *ModuleTask) CleanData(uid string) { this.modelTask.clearTask(uid) @@ -156,30 +136,31 @@ func (this *ModuleTask) CleanData(uid string) { //任务处理器注册 type taskHandle func(uid string, taskId int32, tp *pb.TaskParam) *pb.DBTask -// func (this *ModuleTask) register(taskType comm.TaskType, fn taskHandle) { -// if _, ok := this.taskHandleMap[int32(taskType)]; !ok { -// this.taskHandleMap[int32(taskType)] = fn -// } -// } - -// 初始任务事件处理类 -// func (this *ModuleTask) initTaskHandle() { -// if data, err := this.configure.getTaskList(); err == nil { -// for _, v := range data { -// switch v.TypeId { -// case int32(comm.TaskTypeUpEquip): -// this.register(comm.TaskTypeUpEquip, this.modelTask.UpEquip) -// case int32(comm.TaskTypeUpHeroStar): -// this.register(comm.TaskTypeUpHeroStar, this.modelTask.UpHeroStar) -// case int32(comm.TaskTypeUpHeroLevel): -// this.register(comm.TaskTypeUpHeroLevel, this.modelTask.UpHeroLevel) -// default: -// log.Warnf("%v task type not supported", v.TypeId) -// } -// } -// } -// } - func (this *ModuleTask) GetTaskFinished(uid string, taskTage comm.TaskTag) []*pb.DBTask { return this.modelTask.getFinishTasks(uid, taskTage) } + +func (this *ModuleTask) Reddot(uid string, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) { + reddot = make(map[comm.ReddotType]bool) + + for _, v := range rid { + switch v { + case comm.Reddot1: + if ok, _ := this.modelTask.noReceiveTask(uid, comm.TASK_DAILY); ok { + reddot[comm.Reddot1] = ok + break + } + case comm.Reddot2: + if ok, _ := this.modelTask.noReceiveTask(uid, comm.TASK_WEEKLY); ok { + reddot[comm.Reddot2] = ok + break + } + case comm.Reddot4: + if ok, _ := this.modelTask.noReceiveTask(uid, comm.TASK_ACHIEVE); ok { + reddot[comm.Reddot4] = ok + break + } + } + } + return +} diff --git a/modules/timer/season.go b/modules/timer/season.go index 2b25b4fdd..955be891f 100644 --- a/modules/timer/season.go +++ b/modules/timer/season.go @@ -10,11 +10,11 @@ import ( cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/sys/db" + "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" "go_dreamfactory/lego/core/cbase" "go_dreamfactory/lego/sys/cron" "go_dreamfactory/lego/sys/log" - "go_dreamfactory/lego/sys/redis/pipe" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" @@ -30,7 +30,7 @@ type SeasonPagoda struct { cbase.ModuleCompBase modules.MCompConfigure modules.MCompModel - service core.IService + service base.IRPCXService module *Timer mail comm.Imail } @@ -40,7 +40,7 @@ func (this *SeasonPagoda) Init(service core.IService, module core.IModule, comp this.MCompConfigure.Init(service, module, comp, options) this.TableName = comm.TableSeasonPagoda this.MCompModel.Init(service, module, comp, options) - this.service = service + this.service = service.(base.IRPCXService) this.module = module.(*Timer) if module1, err := this.service.GetModule(comm.ModuleMail); err == nil { @@ -104,28 +104,6 @@ func (this *SeasonPagoda) GetSeasonLoop(id int32) *cfg.GameSeasonLoopData { // // 赛季塔结束 func (this *SeasonPagoda) TimerSeasonOver() { this.module.Debugf("TimerSeasonOver:%d", configure.Now().Unix()) - - if conn, err := db.Cross(); err == nil { - var ( - pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO()) - ) - - rd := pipe.ZRange("pagodaSeasonRank", 0, 50) - - if _, err = pipe.Exec(); err != nil { - this.module.Errorln(err) - return - } - _data3 := rd.Val() - this.module.Debugf("%v", _data3) - //sz := this.GetSeasonReward() - - // this.mail.SendNewMail(&pb.DBMailData{ - // CreateTime: uint64(configure.Now().Unix()), - // Items: nil, - // }, _data3...) - } - if db.IsCross() { if conn, err := db.Cross(); err == nil { if rst := conn.Mgo.FindOne(comm.TableServerData, bson.M{}); rst != nil { @@ -156,12 +134,22 @@ func (this *SeasonPagoda) TimerSeasonOver() { } } - //star := configure.Now() - this.DB.DeleteMany(comm.TableSeasonPagoda, bson.M{}, options.Delete()) - //this.module.Debugf("=====%d,", time.Since(star).Milliseconds()) + if _, err := this.service.RpcGo(context.Background(), + comm.Service_Worker, + string(comm.Rpc_ModuleSeasonPagodaReward), + pb.EmptyReq{}, + nil, + ); err != nil { + this.module.Errorln(err) + } } // 赛季塔开始 func (this *SeasonPagoda) TimerSeasonStar() { this.module.Debugf("TimerSeasonStar:%d", configure.Now().Unix()) + + // 打印耗时 + //star := configure.Now() + this.DB.DeleteMany(comm.TableSeasonPagoda, bson.M{}, options.Delete()) + //this.module.Debugf("=====%d,", time.Since(star).Milliseconds()) } diff --git a/modules/user/api_login.go b/modules/user/api_login.go index bd02691d2..cb2212405 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -141,8 +141,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod } // 初始化随机任务数据 - // TODO: 判断次功能开启时再初始化 - go this.module.ModuleRtask.InitCondiData(user.Uid) + this.module.ModuleRtask.InitCondiData(user.Uid) // 日常登录任务 this.module.ModuleRtask.SendToRtask(session, comm.Rtype7, 1) diff --git a/modules/user/model_user.go b/modules/user/model_user.go index 292e652d4..2746cc624 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -74,7 +74,7 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) { func (this *ModelUser) GetUser(uid string) (user *pb.DBUser) { user = &pb.DBUser{} if err := this.Get(uid, user); err != nil { - this.module.Errorln(err) + this.module.Errorf("GetUser uid:%v err:%v",uid,err) return } return diff --git a/modules/worldtask/api_battlefinish.go b/modules/worldtask/api_battlefinish.go index b89413ace..c563800aa 100644 --- a/modules/worldtask/api_battlefinish.go +++ b/modules/worldtask/api_battlefinish.go @@ -40,7 +40,7 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa // var isWin bool if code, _ = ibattle.CheckBattleReport(session, req.Report); code == pb.ErrorCode_Success { //触发任务 - go this.module.ModuleRtask.SendToRtask(session, comm.Rtype70, 1, req.BattleConfId) + this.module.ModuleRtask.SendToRtask(session, comm.Rtype70, 1, req.BattleConfId) } } diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index 240f56b24..21219e720 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -1,6 +1,7 @@ package worldtask import ( + "errors" "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/base" @@ -43,6 +44,23 @@ func (this *Worldtask) GetType() core.M_Modules { // 任务条件达成通知 func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) error { uid := session.GetUserId() + + conf, err := this.configure.getWorldtaskCfg() + if err != nil || conf == nil { + return err + } + + finishedTaskIds := make(map[int32]int32) //达成的任务条件 + for _, c := range conf.GetDataList() { + if c.Completetask == condId && c.Completetask != 0 { + finishedTaskIds[c.Group] = c.Key + } + } + + if len(finishedTaskIds) == 0 { + return nil + } + //下一个任务ID var nextTaskId int32 // 获取用户信息 @@ -60,17 +78,6 @@ func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) e if userTask.Uid != "" { //查找任务ID根据condId 可能会找出不同的任务 // 遍历配置表 - conf, err := this.configure.getWorldtaskCfg() - if err != nil || conf == nil { - return err - } - - finishedTaskIds := make(map[int32]int32) //达成的任务条件 - for _, c := range conf.GetDataList() { - if c.Completetask == condId && c.Completetask != 0 { - finishedTaskIds[c.Group] = c.Key - } - } for k, id := range finishedTaskIds { taskConf, err := this.configure.getWorldtaskById(id) @@ -120,7 +127,61 @@ func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) e } // bingo世界任务跳跃 支持回退 -func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, rtaskId int32) error { - // d, err := this.modelWorldtask.getWorldtask(session.GetUserId()) +func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, taskId int32) error { + uid := session.GetUserId() + mytask, err := this.modelWorldtask.getWorldtask(uid) + if err != nil { + return err + } + // 更新数据 + update := map[string]interface{}{} + + conf, err := this.configure.getWorldtaskCfg() + if err != nil || conf == nil { + return errors.New("config is nil") + } + + taskConf, err := this.configure.getWorldtaskById(taskId) + if err != nil || taskConf == nil { + return fmt.Errorf("taskId: %v config is nil", taskId) + } + + if mytask.LastTaskIds == nil { + mytask.LastTaskIds = make(map[int32]int32) + } + //重置taskList + mytask.TaskList = []*pb.Worldtask{} + + //遍历 + if taskConf.Ontxe != 0 && taskConf.IdAfter != 0 { + for _, v := range conf.GetDataList() { + if v.Group == groupId && v.Key <= taskId { + mytask.LastTaskIds[groupId] = v.Key + mytask.TaskList = append(mytask.TaskList, &pb.Worldtask{ + TaskId: v.Key, + Status: 1, + }) + } + break + } + } else { + mytask.LastTaskIds[groupId] = taskId + mytask.TaskList = append(mytask.TaskList, &pb.Worldtask{ + TaskId: taskId, + Status: 1, + }) + } + update = map[string]interface{}{ + "lastTaskIds": mytask.LastTaskIds, + "taskList": mytask.TaskList, + } + + this.modelWorldtask.Change(uid, update) + + rsp := &pb.WorldtaskFinishIdsPush{ + TaskList: mytask.TaskList, + } + + session.SendMsg(string(this.GetType()), "finishIds", rsp) return nil } diff --git a/pb/worldtask_msg.pb.go b/pb/worldtask_msg.pb.go index ce40485c2..a60416c96 100644 --- a/pb/worldtask_msg.pb.go +++ b/pb/worldtask_msg.pb.go @@ -488,65 +488,18 @@ func (x *WorldtaskBattleFinishResp) GetTaskId() int32 { } // 当前完成的任务列表推送 -type WorldtaskList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TaskId []int32 `protobuf:"varint,1,rep,packed,name=taskId,proto3" json:"taskId"` //任务ID -} - -func (x *WorldtaskList) Reset() { - *x = WorldtaskList{} - if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorldtaskList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorldtaskList) ProtoMessage() {} - -func (x *WorldtaskList) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] - 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 WorldtaskList.ProtoReflect.Descriptor instead. -func (*WorldtaskList) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9} -} - -func (x *WorldtaskList) GetTaskId() []int32 { - if x != nil { - return x.TaskId - } - return nil -} - type WorldtaskFinishIdsPush struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Tasks map[int32]*WorldtaskList `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //完成的任务 key:groupId val:任务ID + TaskList []*Worldtask `protobuf:"bytes,1,rep,name=taskList,proto3" json:"taskList"` //完成的任务 key:groupId val:任务ID } func (x *WorldtaskFinishIdsPush) Reset() { *x = WorldtaskFinishIdsPush{} if protoimpl.UnsafeEnabled { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -559,7 +512,7 @@ func (x *WorldtaskFinishIdsPush) String() string { func (*WorldtaskFinishIdsPush) ProtoMessage() {} func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message { - mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] + mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -572,12 +525,12 @@ func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message { // Deprecated: Use WorldtaskFinishIdsPush.ProtoReflect.Descriptor instead. func (*WorldtaskFinishIdsPush) Descriptor() ([]byte, []int) { - return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{10} + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9} } -func (x *WorldtaskFinishIdsPush) GetTasks() map[int32]*WorldtaskList { +func (x *WorldtaskFinishIdsPush) GetTaskList() []*Worldtask { if x != nil { - return x.Tasks + return x.TaskList } return nil } @@ -630,20 +583,12 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{ 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, - 0x27, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, - 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, - 0x75, 0x73, 0x68, 0x12, 0x38, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x48, 0x0a, - 0x0a, 0x54, 0x61, 0x73, 0x6b, 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, 0x24, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, - 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, + 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, 0x74, 0x61, 0x73, + 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x57, 0x6f, + 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -658,7 +603,7 @@ func file_worldtask_worldtask_msg_proto_rawDescGZIP() []byte { return file_worldtask_worldtask_msg_proto_rawDescData } -var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{ (*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq (*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp @@ -669,24 +614,22 @@ var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{ (*WorldtaskBattleStartResp)(nil), // 6: WorldtaskBattleStartResp (*WorldtaskBattleFinishReq)(nil), // 7: WorldtaskBattleFinishReq (*WorldtaskBattleFinishResp)(nil), // 8: WorldtaskBattleFinishResp - (*WorldtaskList)(nil), // 9: WorldtaskList - (*WorldtaskFinishIdsPush)(nil), // 10: WorldtaskFinishIdsPush - nil, // 11: WorldtaskFinishIdsPush.TasksEntry - (*DBWorldtask)(nil), // 12: DBWorldtask - (*BattleInfo)(nil), // 13: BattleInfo - (*BattleReport)(nil), // 14: BattleReport + (*WorldtaskFinishIdsPush)(nil), // 9: WorldtaskFinishIdsPush + (*DBWorldtask)(nil), // 10: DBWorldtask + (*BattleInfo)(nil), // 11: BattleInfo + (*BattleReport)(nil), // 12: BattleReport + (*Worldtask)(nil), // 13: Worldtask } var file_worldtask_worldtask_msg_proto_depIdxs = []int32{ - 12, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask - 13, // 1: WorldtaskBattleStartResp.info:type_name -> BattleInfo - 14, // 2: WorldtaskBattleFinishReq.report:type_name -> BattleReport - 11, // 3: WorldtaskFinishIdsPush.tasks:type_name -> WorldtaskFinishIdsPush.TasksEntry - 9, // 4: WorldtaskFinishIdsPush.TasksEntry.value:type_name -> WorldtaskList - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 10, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask + 11, // 1: WorldtaskBattleStartResp.info:type_name -> BattleInfo + 12, // 2: WorldtaskBattleFinishReq.report:type_name -> BattleReport + 13, // 3: WorldtaskFinishIdsPush.taskList:type_name -> Worldtask + 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_worldtask_worldtask_msg_proto_init() } @@ -806,18 +749,6 @@ func file_worldtask_worldtask_msg_proto_init() { } } file_worldtask_worldtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorldtaskList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_worldtask_worldtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorldtaskFinishIdsPush); i { case 0: return &v.state @@ -836,7 +767,7 @@ func file_worldtask_worldtask_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_worldtask_worldtask_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 10, NumExtensions: 0, NumServices: 0, },