diff --git a/comm/const.go b/comm/const.go index df71ec82d..ca9fa4d90 100644 --- a/comm/const.go +++ b/comm/const.go @@ -143,8 +143,7 @@ const ( // TableViking = "viking" // 维京远征排行榜 - TableVikingRank = "vikingrank" - TableVikingRankList = "vikingranklist" + TableVikingRank = "vikingrank" //月之秘境 TableMoonFantasy = "moonfantasy" @@ -152,8 +151,8 @@ const ( // TableHunting = "hunting" // 维京远征排行榜 - TableHuntingRecord = "huntingrecord" - TableHuntingRankList = "huntingrankList" + TableHuntingRecord = "huntingrecord" + TableHuntingRank = "huntingrank" // 支线剧情任务 TableLinestory = "linestory" diff --git a/modules/forum/api_watchhero.go b/modules/forum/api_watchhero.go index d35c0b433..e5e9bd5cc 100644 --- a/modules/forum/api_watchhero.go +++ b/modules/forum/api_watchhero.go @@ -18,8 +18,9 @@ func (this *apiComp) WatchHeroCheck(session comm.IUserSession, req *pb.ForumWatc ///获取本服聊天消息记录 func (this *apiComp) WatchHero(session comm.IUserSession, req *pb.ForumWatchHeroReq) (code pb.ErrorCode, data proto.Message) { var ( - hero *pb.DBHero - err error + hero *pb.DBHero + err error + equip []*pb.DB_Equipment ) if code = this.WatchHeroCheck(session, req); code != pb.ErrorCode_Success { return @@ -27,6 +28,12 @@ func (this *apiComp) WatchHero(session comm.IUserSession, req *pb.ForumWatchHero if hero, err = this.module.modelForum.watchHero(req.Stag, req.Uid, req.HerocId); err != nil { code = pb.ErrorCode_HeroNoExist } - session.SendMsg(string(this.module.GetType()), "watchhero", &pb.ForumWatchHeroResp{Hero: hero}) + if equip, err = this.module.modelForum.watchHeroEquip(req.Stag, req.Uid, hero.EquipID...); err != nil { + code = pb.ErrorCode_EquipmentOnFoundEquipment + } + session.SendMsg(string(this.module.GetType()), "watchhero", &pb.ForumWatchHeroResp{ + Hero: hero, + EquipID: equip, + }) return } diff --git a/modules/forum/modelForum.go b/modules/forum/modelForum.go index 90d507166..995bba7a6 100644 --- a/modules/forum/modelForum.go +++ b/modules/forum/modelForum.go @@ -155,3 +155,27 @@ func (this *modelForumComp) watchHero(stage string, uid string, herocid string) } return } + +func (this *modelForumComp) watchHeroEquip(stage string, uid string, equipIds ...string) (equips []*pb.DB_Equipment, err error) { + + var ( + tcoon *db.DBConn + ) + if tcoon, err = db.ServerDBConn(stage); err != nil { + this.module.Errorf("stage:%s err:%v", stage, err) + return + } + for id := range equipIds { + sr := tcoon.Mgo.FindOne(comm.TableEquipment, bson.M{ + "_id": id, + }) + equip := &pb.DB_Equipment{} + if err = sr.Decode(equip); err == nil { + equips = append(equips, equip) + } else { + this.module.Errorf("find hero equip error: %v", err) + } + } + + return +} diff --git a/modules/hunting/api_challengeover.go b/modules/hunting/api_challengeover.go index 7b6528ef5..71edb2f4c 100644 --- a/modules/hunting/api_challengeover.go +++ b/modules/hunting/api_challengeover.go @@ -4,7 +4,11 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" + "go_dreamfactory/sys/db" + "strconv" + "time" + "go.mongodb.org/mongo-driver/bson/primitive" "google.golang.org/protobuf/proto" ) @@ -23,6 +27,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha mapData map[string]interface{} newChallenge bool // 新的关卡 reward []*cfg.Gameatn + costTime int32 ) mapData = make(map[string]interface{}, 0) reward = make([]*cfg.Gameatn, 0) @@ -65,21 +70,70 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha mapData["boss"] = hunting.Boss mapData["challengeTime"] = hunting.BossTime } - // 查询是不是最高难度的挑战 + if req.Report != nil { + costTime = req.Report.Costtime + } + key := strconv.Itoa(int(req.BossType)) + "_" + strconv.Itoa(int(req.Difficulty)) - if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 && value == req.Difficulty { - sz := make([]*pb.LineUp, 5) - for i, v := range req.Report.Info.Redflist[0].Team { - if v != nil { - sz[i] = &pb.LineUp{ - Cid: v.HeroID, - Star: v.Star, - Lv: v.Lv, + if hunting.BossTime[key] > costTime || hunting.BossTime[key] == 0 && req.Difficulty >= hunting.Boss[req.BossType] { // 刷新记录 + hunting.BossTime[key] = costTime + szLine := make([]*pb.LineUp, 5) + Leadpos := 0 + if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { + costTime = req.Report.Costtime + Leadpos = int(req.Report.Info.Redflist[0].Leadpos) + for i, v := range req.Report.Info.Redflist[0].Team { + if v != nil { + szLine[i] = &pb.LineUp{ + Cid: v.HeroID, + Star: v.Star, + Lv: v.Lv, + } } } } - this.module.modulerank.updatehuntingRankList(session, req.Difficulty, req.BossType, req.Report.Info.Redflist[0].Leadpos, sz, req.Report.Costtime) + // 写入排行榜 + objID := "" + bFind := false + ranks := this.module.modulerank.getHuntingRankList(session.GetUserId()) + for _, v := range ranks { + if v.Bosstype == req.BossType { + mapRankData := make(map[string]interface{}, 0) + mapRankData["difficulty"] = req.Difficulty + mapRankData["bosstype"] = req.BossType + mapRankData["Leadpos"] = Leadpos + mapRankData["line"] = szLine + mapRankData["costTime"] = costTime + conn_, _ := db.Cross() + dbModel := db.NewDBModel(comm.TableHuntingRank, time.Hour, conn_) + dbModel.ChangeList(session.GetUserId(), v.Id, mapRankData) + objID = v.Id + bFind = true + break + } + } + if !bFind { + userinfo := this.module.ModuleUser.GetUser(session.GetUserId()) + new := &pb.DBHuntingRank{ + Id: primitive.NewObjectID().Hex(), + Uid: session.GetUserId(), + Difficulty: req.Difficulty, + Bosstype: req.BossType, + Nickname: userinfo.Name, + Icon: "", + Lv: userinfo.Lv, + Leadpos: int32(Leadpos), + Line: szLine, + CostTime: costTime, + } + objID = new.Id + conn_, _ := db.Cross() + dbModel := db.NewDBModel(comm.TableHuntingRank, time.Hour, conn_) + dbModel.AddList(session.GetUserId(), new.Id, new) + } + this.module.modulerank.SetRankListData("huntingRank"+strconv.Itoa(int(req.BossType)), req.Difficulty<<16+costTime, objID) } + // check code, _ = this.module.battle.CheckBattleReport(session, req.Report) if code != pb.ErrorCode_Success { diff --git a/modules/hunting/api_ranklist.go b/modules/hunting/api_ranklist.go index ac331a5db..9a791bbbc 100644 --- a/modules/hunting/api_ranklist.go +++ b/modules/hunting/api_ranklist.go @@ -1,9 +1,13 @@ package hunting import ( + "context" "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/pb" + "strconv" + "github.com/go-redis/redis/v8" "google.golang.org/protobuf/proto" ) @@ -15,28 +19,41 @@ func (this *apiComp) RankListCheck(session comm.IUserSession, req *pb.HuntingRan func (this *apiComp) RankList(session comm.IUserSession, req *pb.HuntingRankListReq) (code pb.ErrorCode, data proto.Message) { var ( - ranks []*pb.DBHuntingRank - err error + szRank []*pb.DBHuntingRank + rd *redis.StringSliceCmd ) code = this.RankListCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } if !req.Friend { - ranks, err = this.module.modulerank.GetRankData(req.BoosType) - if err != nil { - code = pb.ErrorCode_DBError + var ( + pipe *pipe.RedisPipe = this.module.modelHunting.Redis.RedisPipe(context.TODO()) + ) + rd = pipe.ZRange("huntingRank"+strconv.Itoa(int(req.BoosType)), 0, -1) + + if _, err := pipe.Exec(); err != nil { + this.module.Errorln(err) + return } + _dataList := rd.Val() + for _, v := range _dataList { + result := &pb.DBHuntingRank{} + if err := this.module.modulerank.GetListObj(session.GetUserId(), v, result); err == nil { + szRank = append(szRank, result) + } + } + } else { uids := this.friend.GetFriendList(session.GetUserId()) for _, id := range uids { rankData := this.module.modulerank.getHuntingRankListByBossType(id, req.BoosType) if rankData != nil { - ranks = append(ranks, rankData) + szRank = append(szRank, rankData) } } } - session.SendMsg(string(this.module.GetType()), HuntingRankListResp, &pb.HuntingRankListResp{Ranks: ranks}) + session.SendMsg(string(this.module.GetType()), HuntingRankListResp, &pb.HuntingRankListResp{Ranks: szRank}) return } diff --git a/modules/hunting/model_hunting.go b/modules/hunting/model_hunting.go index 2e833981b..c7b9706fe 100644 --- a/modules/hunting/model_hunting.go +++ b/modules/hunting/model_hunting.go @@ -50,7 +50,7 @@ func (this *modelHunting) getHuntingList(uid string) (result *pb.DBHunting, err _cfg := this.module.configure.GetHuntingBossTypeConfigData() for k := range _cfg { result.Boss[k] = 0 - str := strconv.Itoa(int(k)) + "_0" + str := strconv.Itoa(int(k)) + "_1" result.BossTime[str] = 0 } } diff --git a/modules/hunting/model_rank.go b/modules/hunting/model_rank.go index 62c9e962d..8e0ff8816 100644 --- a/modules/hunting/model_rank.go +++ b/modules/hunting/model_rank.go @@ -1,12 +1,15 @@ package hunting import ( + "context" "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/db" - "go.mongodb.org/mongo-driver/bson/primitive" + "github.com/go-redis/redis/v8" ) type ModelRank struct { @@ -29,29 +32,6 @@ func (this *ModelRank) AddRankList(uId string, objId string, data *pb.DBHuntingR return nil } -// 更新排行榜数据 -func (this *ModelRank) ChangeUserRank(uid string, objId string, value map[string]interface{}) (err error) { - if len(value) == 0 { - return nil - } - return this.ChangeList(uid, objId, value) -} - -// 获取排行榜数据 -func (this *ModelRank) GetRankData(bossType int32) (data []*pb.DBHuntingRank, err error) { - tmpdata := make([]*pb.DBHuntingRank, 0) - data = make([]*pb.DBHuntingRank, 0) - err = this.Redis.LRange(comm.TableVikingRankList, 0, -1, &tmpdata) - if err == nil { - for _, v := range tmpdata { - if v.Bosstype == bossType { - data = append(data, v) - } - } - } - return -} - func (this *ModelRank) getHuntingRankList(uid string) []*pb.DBHuntingRank { ranks := make([]*pb.DBHuntingRank, 0) err := this.GetList(uid, &ranks) @@ -61,41 +41,6 @@ func (this *ModelRank) getHuntingRankList(uid string) []*pb.DBHuntingRank { return ranks } -func (this *ModelRank) updatehuntingRankList(session comm.IUserSession, difficulty int32, boosType int32, Leadpos int32, line []*pb.LineUp, costTime int32) { - // 查询是不是更新数据 - ranks := this.getHuntingRankList(session.GetUserId()) - bfind := false - for _, v := range ranks { - if v.Bosstype == boosType { - mapRankData := make(map[string]interface{}, 0) - mapRankData["difficulty"] = difficulty - mapRankData["bosstype"] = boosType - mapRankData["Leadpos"] = Leadpos - mapRankData["line"] = line - mapRankData["costTime"] = costTime - this.ChangeUserRank(session.GetUserId(), v.Id, mapRankData) - bfind = true - break - } - } - if !bfind { - userinfo := this.moduleHunting.ModuleUser.GetUser(session.GetUserId()) - new := &pb.DBHuntingRank{ - Id: primitive.NewObjectID().Hex(), - Uid: session.GetUserId(), - Difficulty: difficulty, - Bosstype: boosType, - Nickname: userinfo.Name, - Icon: "", - Lv: userinfo.Lv, - Leadpos: Leadpos, - Line: line, - CostTime: costTime, - } - this.AddRankList(session.GetUserId(), new.Id, new) - } - return -} func (this *ModelRank) getHuntingRankListByBossType(uid string, bossType int32) *pb.DBHuntingRank { ranks := make([]*pb.DBHuntingRank, 0) err := this.GetList(uid, &ranks) @@ -109,3 +54,29 @@ func (this *ModelRank) getHuntingRankListByBossType(uid string, bossType int32) } return nil } + +// 排行数据写跨服 +func (this *ModelRank) SetRankListData(tableName string, score int32, uid string) { + if !db.IsCross() { + if conn, err := db.Cross(); err == nil { + var ( + pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO()) + menbers *redis.Z + ) + + menbers = &redis.Z{Score: float64(score), Member: uid} + + if cmd := pipe.ZAdd(tableName, menbers); cmd != nil { + + dock, err1 := cmd.Result() + if err1 != nil { + this.moduleHunting.Errorln(dock, err1) + } + } + if _, err := pipe.Exec(); err != nil { + this.moduleHunting.Errorln(err) + return + } + } + } +} diff --git a/modules/mainline/api_challengeover.go b/modules/mainline/api_challengeover.go index 61497194e..86c053e2a 100644 --- a/modules/mainline/api_challengeover.go +++ b/modules/mainline/api_challengeover.go @@ -105,7 +105,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh if node.Episodetype != 5 && node.Episodetype != 7 { if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { for _, v := range req.Report.Info.Redflist[0].Team { - if node.Exp > 0 { + if node.Exp > 0 && !v.Ishelp { // 助战英雄不加经验 this.module.ModuleHero.AddHeroExp(session, v.Oid, node.Exp) } } diff --git a/modules/timer/forum.go b/modules/timer/forum.go index b3844a94c..193661ce4 100644 --- a/modules/timer/forum.go +++ b/modules/timer/forum.go @@ -17,7 +17,7 @@ type ForumComp struct { func (this *ForumComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - this.TableName = comm.TableHuntingRankList + this.TableName = comm.TableForum this.MCompModel.Init(service, module, comp, options) this.service = service return diff --git a/modules/timer/huntingrank.go b/modules/timer/huntingrank.go deleted file mode 100644 index 9933dcfb6..000000000 --- a/modules/timer/huntingrank.go +++ /dev/null @@ -1,61 +0,0 @@ -package timer - -import ( - "context" - "go_dreamfactory/comm" - "go_dreamfactory/modules" - "go_dreamfactory/pb" - - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/cron" - "go_dreamfactory/lego/sys/log" - - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" -) - -type HuntingRank struct { - modules.MCompModel - service core.IService - DbName string -} - -//组件初始化接口 -func (this *HuntingRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - this.DbName = comm.TableHuntingRecord - this.TableName = comm.TableHuntingRankList - this.MCompModel.Init(service, module, comp, options) - this.service = service - return -} - -func (this *HuntingRank) Start() (err error) { - err = this.MCompModel.Start() - cron.AddFunc("*/60 * * * * ?", this.Timer) //每60s执行一次 - return -} - -// 处理排行榜排序 -func (this *HuntingRank) Timer() { - data := make([]interface{}, 0) // options.Find().SetLimit(comm.MaxRankList) - for i := 1; i <= 4; i++ { // boss 类型 1 2 3 4 后面封装 // 时间参数战斗调完后再加进来 - if _data, err := this.DB.Find(core.SqlTable(this.DbName), bson.M{"bosstype": i}, options.Find().SetSort(bson.M{"difficulty": -1}).SetLimit(comm.MaxRankList)); err == nil { - for _data.Next(context.TODO()) { - temp := &pb.DBHuntingRank{} - if err = _data.Decode(temp); err == nil { - data = append(data, temp) - } - } - } - } - - if len(data) > 0 { - err := this.Redis.RPush(this.TableName, data...) - if err == nil { - err = this.Redis.Ltrim(this.TableName, -1*len(data), -1) //对一个列表进行修剪 - if err != nil { - log.Errorf("delete failed") - } - } - } -} diff --git a/modules/timer/module.go b/modules/timer/module.go index 215251038..63604bf17 100644 --- a/modules/timer/module.go +++ b/modules/timer/module.go @@ -23,10 +23,7 @@ type Timer struct { cbase.ModuleBase options *Options service base.IRPCXService //rpc服务对象 通过这个对象可以发布服务和调用其他服务的接口 - //rank *PagodaRank - rank2 *VikingRank - rank3 *HuntingRank - chat *ChatComp //俩天系统定时任务 + chat *ChatComp //俩天系统定时任务 season *SeasonPagoda forum *ForumComp arena *ArenaComp @@ -59,9 +56,6 @@ func (this *Timer) Start() (err error) { func (this *Timer) OnInstallComp() { this.ModuleBase.OnInstallComp() - //this.rank = this.RegisterComp(new(PagodaRank)).(*PagodaRank) - this.rank2 = this.RegisterComp(new(VikingRank)).(*VikingRank) - this.rank3 = this.RegisterComp(new(HuntingRank)).(*HuntingRank) this.chat = this.RegisterComp(new(ChatComp)).(*ChatComp) this.season = this.RegisterComp(new(SeasonPagoda)).(*SeasonPagoda) this.arena = this.RegisterComp(new(ArenaComp)).(*ArenaComp) diff --git a/modules/timer/vikingrank.go b/modules/timer/vikingrank.go deleted file mode 100644 index 518d2682a..000000000 --- a/modules/timer/vikingrank.go +++ /dev/null @@ -1,61 +0,0 @@ -package timer - -import ( - "context" - "go_dreamfactory/comm" - "go_dreamfactory/modules" - "go_dreamfactory/pb" - - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/cron" - "go_dreamfactory/lego/sys/log" - - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" -) - -type VikingRank struct { - modules.MCompModel - service core.IService - dbName string -} - -//组件初始化接口 -func (this *VikingRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - this.dbName = comm.TableVikingRank - this.TableName = comm.TableVikingRankList - this.MCompModel.Init(service, module, comp, options) - this.service = service - return -} - -func (this *VikingRank) Start() (err error) { - err = this.MCompModel.Start() - cron.AddFunc("*/60 * * * * ?", this.Timer) //每60s执行一次 - return -} - -// 处理排行榜排序 -func (this *VikingRank) Timer() { - data := make([]interface{}, 0) // options.Find().SetLimit(comm.MaxRankList) - for i := 1; i <= 3; i++ { // boss 类型 1 2 3 后面封装 // 时间参数战斗调完后再加进来 - if _data, err := this.DB.Find(core.SqlTable(this.dbName), bson.M{"bosstype": i}, options.Find().SetSort(bson.M{"difficulty": -1}).SetLimit(comm.MaxRankList)); err == nil { - for _data.Next(context.TODO()) { - temp := &pb.DBVikingRank{} - if err = _data.Decode(temp); err == nil { - data = append(data, temp) - } - } - } - } - - if len(data) > 0 { - err := this.Redis.RPush(this.TableName, data...) - if err == nil { - err = this.Redis.Ltrim(this.TableName, -1*len(data), -1) //对一个列表进行修剪 - if err != nil { - log.Errorf("delete failed") - } - } - } -} diff --git a/modules/viking/model_rank.go b/modules/viking/model_rank.go index 6b7bd52f0..f8b5af96b 100644 --- a/modules/viking/model_rank.go +++ b/modules/viking/model_rank.go @@ -30,14 +30,6 @@ func (this *ModelRank) AddRankList(uId string, id string, data *pb.DBVikingRank) return nil } -// 更新排行榜数据 -func (this *ModelRank) ChangeUserRank(uid string, objId string, value map[string]interface{}) (err error) { - if len(value) == 0 { - return nil - } - return this.ChangeList(uid, objId, value) -} - // 获取排行榜数据 func (this *ModelRank) getVikingRankList(uid string) []*pb.DBVikingRank { ranks := make([]*pb.DBVikingRank, 0) diff --git a/pb/forum_msg.pb.go b/pb/forum_msg.pb.go index 79013cc37..c8a353c00 100644 --- a/pb/forum_msg.pb.go +++ b/pb/forum_msg.pb.go @@ -330,7 +330,8 @@ type ForumWatchHeroResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hero *DBHero `protobuf:"bytes,1,opt,name=hero,proto3" json:"hero"` + Hero *DBHero `protobuf:"bytes,1,opt,name=hero,proto3" json:"hero"` + EquipID []*DB_Equipment `protobuf:"bytes,2,rep,name=equipID,proto3" json:"equipID"` // 装备详细信息 } func (x *ForumWatchHeroResp) Reset() { @@ -372,6 +373,13 @@ func (x *ForumWatchHeroResp) GetHero() *DBHero { return nil } +func (x *ForumWatchHeroResp) GetEquipID() []*DB_Equipment { + if x != nil { + return x.EquipID + } + return nil +} + //请求点赞 请求 type ForumLikeReq struct { state protoimpl.MessageState @@ -507,49 +515,54 @@ var file_forum_forum_msg_proto_rawDesc = []byte{ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x2f, 0x66, 0x6f, 0x72, 0x75, 0x6d, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x22, 0x38, - 0x0a, 0x10, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xa6, 0x01, 0x0a, 0x16, 0x46, 0x6f, 0x72, - 0x75, 0x6d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x75, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x22, 0x3f, 0x0a, 0x17, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x22, 0x6d, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x57, 0x61, 0x74, 0x63, 0x68, - 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x61, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x68, 0x65, 0x72, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f, - 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x49, - 0x64, 0x22, 0x31, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, - 0x68, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0a, 0x0c, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x4c, 0x69, 0x6b, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x69, 0x73, 0x6c, 0x69, 0x6b, 0x65, 0x22, 0x51, 0x0a, 0x0d, 0x46, 0x6f, 0x72, 0x75, - 0x6d, 0x4c, 0x69, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, - 0x73, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c, - 0x69, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, + 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x2b, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x10, + 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xa6, 0x01, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x75, 0x6d, + 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x75, 0x6c, + 0x76, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, + 0x65, 0x72, 0x6f, 0x6f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, + 0x72, 0x6f, 0x6f, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x3f, 0x0a, 0x17, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x6d, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, + 0x72, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x68, + 0x65, 0x72, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, + 0x72, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x49, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x6f, 0x49, 0x64, 0x22, + 0x5a, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x72, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, + 0x72, 0x6f, 0x12, 0x27, 0x0a, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x22, 0x52, 0x0a, 0x0c, 0x46, + 0x6f, 0x72, 0x75, 0x6d, 0x4c, 0x69, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x68, + 0x65, 0x72, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, + 0x72, 0x6f, 0x63, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x69, 0x6b, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c, 0x69, 0x6b, 0x65, 0x22, + 0x51, 0x0a, 0x0d, 0x46, 0x6f, 0x72, 0x75, 0x6d, 0x4c, 0x69, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6c, 0x69, 0x6b, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, + 0x73, 0x75, 0x63, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, + 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -576,16 +589,18 @@ var file_forum_forum_msg_proto_goTypes = []interface{}{ (*ForumLikeResp)(nil), // 7: ForumLikeResp (*DBComment)(nil), // 8: DBComment (*DBHero)(nil), // 9: DBHero + (*DB_Equipment)(nil), // 10: DB_Equipment } var file_forum_forum_msg_proto_depIdxs = []int32{ - 8, // 0: ForumGetListResp.comment:type_name -> DBComment - 8, // 1: ForumReleaseCommentResp.comment:type_name -> DBComment - 9, // 2: ForumWatchHeroResp.hero:type_name -> DBHero - 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: ForumGetListResp.comment:type_name -> DBComment + 8, // 1: ForumReleaseCommentResp.comment:type_name -> DBComment + 9, // 2: ForumWatchHeroResp.hero:type_name -> DBHero + 10, // 3: ForumWatchHeroResp.equipID:type_name -> DB_Equipment + 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_forum_forum_msg_proto_init() } @@ -595,6 +610,7 @@ func file_forum_forum_msg_proto_init() { } file_forum_forum_db_proto_init() file_hero_hero_db_proto_init() + file_equipment_equipment_db_proto_init() if !protoimpl.UnsafeEnabled { file_forum_forum_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ForumGetListReq); i {