上传附魔副本代码

This commit is contained in:
liwei1dao 2024-01-25 15:55:25 +08:00
parent 87368517b3
commit 53792dc170
13 changed files with 690 additions and 673 deletions

View File

@ -45,15 +45,17 @@ func (this *modelBattleComp) queryrecord(oid string) (record *pb.DBBattleRecord,
// 创建pve 战斗记录
func (this *modelBattleComp) createeve(session comm.IUserSession, stag string, conn *db.DBConn, btype pb.BattleType, req *pb.BattleEVEReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Buleformat)),
Tasks: conf.BattleEvents,
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Buleformat)),
Tasks: conf.BattleEvents,
}
var (
// battletas *cfg.GameBattletasktestingData
@ -63,10 +65,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, stag string, c
err error
// buff *cfg.GamePandamasBuffData
)
// buff, _ = this.getGlobalBuff(session.GetUserId())
// if battletas, _ = this.module.configure.GetBattleTask(int32(req.Ptype)); battletas != nil {
// record.Tasks = battletas.BattletaskTestingId
// }
if user, err = this.module.ModuleUser.GetUserExpand(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
@ -202,16 +200,18 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, stag string, c
err error
)
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
Tasks: conf.BattleEvents,
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
Tasks: conf.BattleEvents,
}
record.Redflist[0] = &pb.DBBattleFormt{
Leadpos: req.Format.Leadpos,
@ -340,15 +340,17 @@ func (this *modelBattleComp) createpvb(session comm.IUserSession, stag string, c
err error
)
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, len(req.Format)),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, len(req.Format)),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
}
if user, err = this.module.ModuleUser.GetUserExpand(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
@ -463,15 +465,17 @@ func (this *modelBattleComp) createpvb(session comm.IUserSession, stag string, c
func (this *modelBattleComp) createpvp(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVPReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: req.Redformat.Uid,
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: req.Buleformat.Uid,
Buleflist: make([]*pb.DBBattleFormt, 1),
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: req.Redformat.Uid,
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: req.Buleformat.Uid,
Buleflist: make([]*pb.DBBattleFormt, 1),
}
record.Redflist[0] = &pb.DBBattleFormt{
Leadpos: req.Redformat.Leadpos,
@ -525,15 +529,17 @@ func (this *modelBattleComp) createpvp(session comm.IUserSession, conn *db.DBCon
// 创建pvp 战斗请求
func (this *modelBattleComp) creatertpvp(redmodel, bluemodel *db.DBModel, btype pb.BattleType, req *pb.BattleRTPVPReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: req.RedCompId,
Redflist: make([]*pb.DBBattleFormt, len(req.Redformat)),
BlueCompId: req.BlueCompId,
Buleflist: make([]*pb.DBBattleFormt, len(req.Bulefformat)),
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: req.RedCompId,
Redflist: make([]*pb.DBBattleFormt, len(req.Redformat)),
BlueCompId: req.BlueCompId,
Buleflist: make([]*pb.DBBattleFormt, len(req.Bulefformat)),
}
for ii, v := range req.Redformat {
heros := make([]*pb.DBHero, 5)
@ -610,15 +616,17 @@ func (this *modelBattleComp) createlpve(session comm.IUserSession, stag string,
err error
)
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, 1),
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, 1),
}
record.Redflist[0] = &pb.DBBattleFormt{
Leadpos: req.Format.Leadpos,
@ -722,16 +730,18 @@ func (this *modelBattleComp) createheropve(session comm.IUserSession, conn *db.D
masters []*pb.BattleRole
)
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
Tasks: conf.BattleEvents,
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
Btype: btype,
Ptype: req.Ptype,
Battlereadyid: conf.Id,
Scoregroup: conf.ScoreGroupID,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
Tasks: conf.BattleEvents,
}
record.Redflist[0] = &pb.DBBattleFormt{
Leadpos: req.Redformat.Leadpos,

View File

@ -24,14 +24,6 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
if errdata != nil {
return // 参数校验失败直接返回
}
enchant, err := this.module.modelEnchant.getEnchantList(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound, // 道具数量不足
Title: pb.ErrorCode_PagodaNotFound.ToString(),
}
return
}
cfgData, err := this.module.configure.GetEnchantBossConfigData(req.BossType)
if err != nil {
@ -46,11 +38,6 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
return
}
_, ok := enchant.Boss[req.BossType]
if !ok { // 类型校验
enchant.Boss[req.BossType] = 0
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Rulesid: cfgData.BattleReadyID,
Ptype: pb.PlayType_enchant,
@ -66,7 +53,8 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
Info: &pb.BattleInfo{
Id: record.Id,
Title: record.Title,
Rulesid: cfgData.BattleReadyID,
Rulesid: record.Battlereadyid,
Scoregroup: record.Scoregroup,
Btype: record.Btype,
Ptype: record.Ptype,
RedCompId: record.RedCompId,

View File

@ -21,20 +21,24 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Encha
///挑战主线关卡
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantChallengeOverReq) (errdata *pb.ErrorData) {
var (
mapData map[string]interface{}
bWin bool // 战斗是否胜利
conf *cfg.GameEnchantbossRewardData
res []*cfg.Gameatn
atno []*pb.UserAtno
conf *cfg.GameEnchantBossData
info *pb.DBEnchant
user *pb.DBUser
rconf *cfg.GameEnchantbossRewardData
res []*cfg.Gameatn
atno []*pb.UserAtno
award []*cfg.Gameatn
line []*pb.LineUp // 阵容数据
changExp map[string]int32
boos *pb.DBEnchantBoos
ok bool
err error
)
mapData = make(map[string]interface{}, 0)
// reward = make([]*cfg.Gameatn, 0)
errdata = this.ChallengeOverCheck(session, req)
if errdata != nil {
if errdata = this.ChallengeOverCheck(session, req); errdata != nil {
return // 参数校验失败直接返回
}
enchant, err := this.module.modelEnchant.getEnchantList(session.GetUserId())
info, err = this.module.modelEnchant.getEnchantList(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaNotFound,
@ -43,7 +47,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return
}
cfgEnchant, err := this.module.configure.GetEnchantBossConfigData(req.BossType)
conf, err = this.module.configure.GetEnchantBossConfigData(req.BossType)
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
@ -53,7 +57,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return
}
if conf, err = this.module.configure.getGameRepeatAllData(req.Report.Grade); err != nil {
if rconf, err = this.module.configure.getGameRepeatAllData(req.Report.Grade); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
Title: pb.ErrorCode_ConfigNoFound.ToString(),
@ -61,31 +65,15 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
}
return
}
// check
errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report)
if errdata != nil {
if errdata, _ = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
return
}
if !bWin { // 战斗失败了 直接返回
if errdata = this.module.ConsumeRes(session, cfgEnchant.PsMg, true); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant.PsMg)
})
if errdata = this.module.ConsumeRes(session, conf.PsConsume, true); errdata != nil {
return
}
if errdata = this.module.ConsumeRes(session, cfgEnchant.PsConsume, true); errdata != nil {
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant.PsConsume)
})
userinfo, err := this.module.GetUserForSession(session)
user, err = this.module.GetUserForSession(session)
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
@ -94,41 +82,84 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
}
return
}
key := req.BossType
if enchant.BossTime[key] > req.Report.Costtime || enchant.BossTime[key] == 0 {
enchant.BossTime[key] = req.Report.Costtime
mapData["bossTime"] = enchant.BossTime // 更新时间
this.module.CheckRank(session.GetUserId(), req.BossType, req.Report, userinfo, req.Score)
}
enchant.Boss[req.BossType] = req.Report.Score // 获得的积分
enchant.Grade[req.BossType] = req.Report.Grade // 获得的积分
for _, v1 := range conf.Reward1Drop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, userinfo.Vip, userinfo.Lv)
res = append(res, reward...)
}
for _, v1 := range conf.Reward2Drop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, userinfo.Vip, userinfo.Lv)
res = append(res, reward...)
}
if len(res) > 0 {
if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil {
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "EnchantChallengeOverReq", atno)
for _, v := range req.Report.Info.Redflist[0].Team {
line = append(line, &pb.LineUp{
Cid: v.HeroID,
Star: v.Star,
Lv: v.Lv,
})
}
mapData["bossTime"] = enchant.BossTime
mapData["boss"] = enchant.Boss
errdata = this.module.ModifyEnchantData(session.GetUserId(), mapData)
if session.GetUserId() != "" { // 恢复时间
if userexpand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil {
enchant.RecoveryTime = userexpand.Recovertimeunifiedticket
if boos, ok = info.Boss[req.BossType]; !ok {
boos = &pb.DBEnchantBoos{
Score: req.Report.Score,
Grade: req.Report.Grade,
Gradegroup: req.Report.Info.Scoregroup,
Line: &pb.LineData{
Leadpos: req.Report.Info.Redflist[0].Leadpos,
Line: line,
},
}
info.Boss[req.BossType] = boos
} else {
if boos.Score < req.Report.Score {
boos = &pb.DBEnchantBoos{
Score: req.Report.Score,
Grade: req.Report.Grade,
Gradegroup: req.Report.Info.Scoregroup,
Line: &pb.LineData{
Leadpos: req.Report.Info.Redflist[0].Leadpos,
Line: line,
},
}
info.Boss[req.BossType] = boos
}
}
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant})
for _, v1 := range rconf.Reward1Drop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, user.Vip, user.Lv)
res = append(res, reward...)
}
for _, v1 := range rconf.Reward2Drop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, user.Vip, user.Lv)
res = append(res, reward...)
}
if conf.Heroexp > 0 {
var heroObjs []string
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
for _, v := range req.Report.Info.Redflist[0].Team {
if v.HeroID != "" {
if !v.Ishelp { // 助战英雄不加经验
heroObjs = append(heroObjs, v.Oid)
}
}
}
}
if changExp, award, errdata = this.module.ModuleHero.AddHerosExp(session, heroObjs, conf.Heroexp); errdata != nil {
return
}
res = append(res, award...)
}
if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil {
return
}
if err = this.module.modelEnchant.Change(session.GetUserId(), map[string]interface{}{
"boss": info.Boss,
}); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
this.module.modelRank.updateRank(req.Report.Score, session.GetUserId(), req.BossType)
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: info, Heroexp: changExp, Atno: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", conf.PsConsume)
if len(atno) > 0 {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "EnchantChallengeOverReq", atno)
}
})
return
}

View File

@ -2,10 +2,7 @@ package enchant
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson/primitive"
)
//参数校验
@ -15,29 +12,23 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.EnchantGetL
}
func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListReq) (errdata *pb.ErrorData) {
var (
info *pb.DBEnchant
err error
)
// 刷新挑战卷
if errdata = this.module.ModuleItems.RecoverTicket(session); errdata != nil {
return
}
list, err := this.module.modelEnchant.getEnchantList(session.GetUserId())
if mgo.MongodbNil == err {
list.Id = primitive.NewObjectID().Hex()
list.Uid = session.GetUserId()
list.Boss = make(map[int32]int32)
list.BossTime = make(map[int32]int32)
list.Grade = make(map[int32]int32)
this.module.modelEnchant.Add(session.GetUserId(), list)
}
if session.GetUserId() != "" { // 恢复时间
if userexpand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil {
list.RecoveryTime = userexpand.Recovertimeunifiedticket
if info, err = this.module.modelEnchant.getEnchantList(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), EnchantGetListResp, &pb.EnchantGetListResp{Data: list})
session.SendMsg(string(this.module.GetType()), EnchantGetListResp, &pb.EnchantGetListResp{Data: info})
return
}

View File

@ -1,15 +1,8 @@
package enchant
import (
"context"
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/redis/pipe"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"strconv"
"github.com/go-redis/redis/v8"
)
//参数校验
@ -20,44 +13,69 @@ func (this *apiComp) RankListCheck(session comm.IUserSession, req *pb.EnchantRan
func (this *apiComp) RankList(session comm.IUserSession, req *pb.EnchantRankListReq) (errdata *pb.ErrorData) {
var (
szRank []*pb.DBEnchantRank
rd *redis.StringSliceCmd
uids []string
ranks []*pb.DBEnchant
franks []*pb.DBEnchant
players []*pb.DBEnchantRank
friends []*pb.DBEnchantRank
err error
)
errdata = this.RankListCheck(session, req)
if errdata != nil {
return // 参数校验失败直接返回
}
conn, _ := db.Local()
dbModel := db.NewDBModelByExpired(this.service.GetTag(), comm.TableEnchantRank, conn)
if !req.Friend {
var (
pipe *pipe.RedisPipe = this.module.modelEnchant.Redis.RedisPipe(context.TODO())
)
rd = pipe.ZRange(fmt.Sprintf("%s-%s", this.module.modelEnchant.DBModel.ServiceId, "enchantRank"+strconv.Itoa(int(req.BoosType))), 0, comm.MaxRankList)
if _, err := pipe.Exec(); err != nil {
this.module.Errorln(err)
return
}
_dataList := rd.Val()
for _, v := range _dataList {
result := &pb.DBEnchantRank{}
if err := dbModel.Redis.HGetAll(v, result); err == nil {
szRank = append(szRank, result)
}
}
} else {
uids := this.friend.GetFriendList(session.GetUserId())
for _, id := range uids {
rankData := this.module.modulerank.getEnchantRankListByBossType(id, req.BoosType)
if rankData != nil {
szRank = append(szRank, rankData)
}
}
if errdata = this.RankListCheck(session, req); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), EnchantRankListResp, &pb.EnchantRankListResp{Ranks: szRank})
if uids, err = this.module.modelRank.queryRankUser(req.BoosType); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
if ranks, err = this.module.modelEnchant.queryPlayers(uids); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
players = make([]*pb.DBEnchantRank, len(ranks))
for i, v := range ranks {
players[i] = &pb.DBEnchantRank{
Id: v.Uid,
Uinfo: v.Uinfo,
Score: v.Boss[req.BoosType].Score,
Grade: v.Boss[req.BoosType].Grade,
Gradegroup: v.Boss[req.BoosType].Gradegroup,
Line: v.Boss[req.BoosType].Line,
}
}
// 获取好友
fids := this.module.ModuleFriend.GetFriendList(session.GetUserId())
if franks, err = this.module.modelEnchant.queryPlayers(fids); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
friends = make([]*pb.DBEnchantRank, len(franks))
for i, v := range franks {
friends[i] = &pb.DBEnchantRank{
Id: v.Uid,
Uinfo: v.Uinfo,
Score: v.Boss[req.BoosType].Score,
Grade: v.Boss[req.BoosType].Grade,
Gradegroup: v.Boss[req.BoosType].Gradegroup,
Line: v.Boss[req.BoosType].Line,
}
}
session.SendMsg(string(this.module.GetType()), "ranklist", &pb.EnchantRankListResp{
Ranks: players,
Friends: friends,
})
return
}

View File

@ -3,10 +3,10 @@ package enchant
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
@ -33,21 +33,27 @@ func (this *modelEnchant) modifyEnchantDataByObjId(uid string, data map[string]i
// 获取列表信息
func (this *modelEnchant) getEnchantList(uid string) (result *pb.DBEnchant, err error) {
result = &pb.DBEnchant{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Boss: make(map[int32]int32),
BossTime: make(map[int32]int32),
Grade: make(map[int32]int32),
}
if err = this.Get(uid, result); err != nil {
result = &pb.DBEnchant{}
if err = this.Get(uid, result); err != nil && err != mgo.MongodbNil {
return
}
if mgo.MongodbNil == err {
result = &pb.DBEnchant{}
}
err = nil
return result, err
}
func (this *modelEnchant) queryPlayers(uIds []string) (result []*pb.DBEnchant, err error) {
result = make([]*pb.DBEnchant, 0)
if _, err = this.Gets(uIds, &result); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err)
return
}
return
}
// 红点检测
func (this *modelEnchant) checkReddot33(session comm.IUserSession) bool {
if conf, err := this.module.configure.GetEnchantBossConfigData(1); err == nil {

View File

@ -2,12 +2,12 @@ package enchant
import (
"context"
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/redis/pipe"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/mongo"
@ -16,19 +16,23 @@ import (
type ModelRank struct {
modules.MCompModel
moduleEnchant *Enchant
module *Enchant
}
func (this *ModelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.TableName = comm.TableEnchantRank // 挑战记录
err = this.MCompModel.Init(service, module, comp, options)
this.moduleEnchant = module.(*Enchant)
this.module = module.(*Enchant)
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
func (this *ModelRank) rankKey(boosType int32) string {
return fmt.Sprintf("%s-%s-%d", this.module.service.GetTag(), this.TableName, boosType)
}
func (this *ModelRank) getEnchantRankList(uid string) []*pb.DBEnchantRank {
ranks := make([]*pb.DBEnchantRank, 0)
err := this.GetList(uid, &ranks)
@ -38,42 +42,43 @@ func (this *ModelRank) getEnchantRankList(uid string) []*pb.DBEnchantRank {
return ranks
}
func (this *ModelRank) getEnchantRankListByBossType(uid string, bossType int32) *pb.DBEnchantRank {
ranks := make([]*pb.DBEnchantRank, 0)
err := this.GetList(uid, &ranks)
if err != nil {
return nil
// 获取排行榜前50的用户名单
func (this *ModelRank) queryRankUser(boos int32) (ranks []string, err error) {
var (
result []string
)
if result, err = this.DBModel.Redis.ZRevRange(this.rankKey(boos), 0, comm.MaxRankList).Result(); err != nil {
this.module.Errorln(err)
return
}
for _, v := range ranks {
if v.Bosstype == bossType {
return v
}
ranks = make([]string, 0)
for i := 0; i < len(result); i += 1 {
ranks = append(ranks, result[i])
}
return nil
return
}
// 排行数据写跨服
func (this *ModelRank) SetRankListData(tableName string, score int64, uid string) {
if !db.IsCross() {
if conn, err := db.Cross(); err == nil {
var (
pipe *pipe.RedisPipe = conn.Redis.RedisPipe(context.TODO())
menbers *redis.Z
)
// 更新排名
func (this *ModelRank) updateRank(Score int32, uid string, boos int32) (err error) {
var (
pipe *pipe.RedisPipe = this.DBModel.Redis.RedisPipe(context.TODO())
menbers *redis.Z
cmd *redis.IntCmd
)
menbers = &redis.Z{Score: float64(score), Member: uid}
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
dock, err1 := cmd.Result()
if err1 != nil {
this.moduleEnchant.Errorln(dock, err1)
}
}
if _, err := pipe.Exec(); err != nil {
this.moduleEnchant.Errorln(err)
return
}
}
menbers = &redis.Z{Score: float64(Score), Member: uid}
if cmd = pipe.ZAdd(this.rankKey(boos), menbers); err != nil {
this.module.Errorln(err)
}
if _, err = pipe.Exec(); err != nil {
this.module.Errorln(err)
return
}
if _, err = cmd.Result(); err != nil {
this.module.Errorln(err)
return
}
return
}

View File

@ -1,17 +1,9 @@
package enchant
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"
"strconv"
"github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Enchant struct {
@ -19,7 +11,7 @@ type Enchant struct {
modelEnchant *modelEnchant
api *apiComp
configure *configureComp
modulerank *ModelRank
modelRank *ModelRank
battle comm.IBattle
service core.IService
}
@ -57,118 +49,10 @@ func (this *Enchant) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelEnchant = this.RegisterComp(new(modelEnchant)).(*modelEnchant)
this.modulerank = this.RegisterComp(new(ModelRank)).(*ModelRank)
this.modelRank = this.RegisterComp(new(ModelRank)).(*ModelRank)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
// 接口信息
func (this *Enchant) ModifyEnchantData(uid string, data map[string]interface{}) (errdata *pb.ErrorData) {
err := this.modelEnchant.modifyEnchantDataByObjId(uid, data)
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
}
return
}
func (this *Enchant) CheckUserBaseEnchantInfo(uid string) (data []*pb.DBEnchantRank) {
list, err := this.modelEnchant.getEnchantList(uid)
if err != nil {
for k := range list.Boss {
_d := this.modulerank.getEnchantRankListByBossType(uid, k)
if _d != nil {
data = append(data, _d)
}
}
}
return
}
func (this *Enchant) CheckRank(uid string, boosID int32, report *pb.BattleReport, userinfo *pb.DBUser, score int64) {
conn_, _ := db.Cross() // 获取跨服数据库对象
model := db.NewDBModelByExpired(db.CrossTag(), comm.TableEnchantRank, conn_)
costTime := report.Costtime
szLine := make([]*pb.LineUp, len(report.Info.Redflist[0].Team))
Leadpos := 0
if report != nil && report.Info != nil && len(report.Info.Redflist) > 0 {
costTime = report.Costtime
Leadpos = int(report.Info.Redflist[0].Leadpos)
for _, v := range report.Info.Redflist[0].Team {
if v != nil {
szLine = append(szLine, &pb.LineUp{
Cid: v.HeroID,
Star: v.Star,
Lv: v.Lv,
})
}
}
}
// 写入排行榜
objID := ""
bFind := false
ranks := this.modulerank.getEnchantRankList(uid)
for _, v := range ranks {
if v.Bosstype == boosID {
mapRankData := make(map[string]interface{}, 0)
mapRankData["bosstype"] = boosID
mapRankData["Leadpos"] = Leadpos
mapRankData["line"] = szLine
mapRankData["costTime"] = costTime
mapRankData["score"] = score
model.ChangeList(uid, v.Id, mapRankData)
objID = v.Id
bFind = true
break
}
}
if !bFind {
userinfo, err := this.ModuleUser.GetUser(uid)
if err != nil {
this.Errorf("not found user:%v", err)
return
}
new := &pb.DBEnchantRank{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Bosstype: boosID,
Nickname: userinfo.Name,
Lv: userinfo.Lv,
Leadpos: int32(Leadpos),
Line: szLine,
CostTime: costTime,
Score: score,
Title: userinfo.Curtitle,
}
objID = new.Id
model.AddList(uid, new.Id, new)
}
var (
pipe *pipe.RedisPipe = conn_.Redis.RedisPipe(context.TODO())
menbers *redis.Z
tableName string
)
tableName = "enchantRank" + strconv.Itoa(int(boosID))
strKey := "enchantRank:" + uid + "-" + objID
menbers = &redis.Z{Score: float64(costTime), Member: strKey}
if cmd := pipe.ZAdd(tableName, menbers); cmd != nil {
dock, err1 := cmd.Result()
if err1 != nil {
this.Errorln(dock, err1)
}
}
if _, err := pipe.Exec(); err != nil {
this.Errorln(err)
return
}
}
func (this *Enchant) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
reddot = make(map[comm.ReddotType]bool)
for _, v := range rid {

View File

@ -95,7 +95,8 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.IntegralChalle
session.SendMsg(string(this.module.GetType()), "challenge", &pb.IntegralChallengeResp{
Info: &pb.BattleInfo{Id: record.Id,
Title: record.Title,
Rulesid: cfgData.BattleReadyID,
Rulesid: record.Battlereadyid,
Scoregroup: record.Scoregroup,
Btype: record.Btype,
Ptype: record.Ptype,
RedCompId: record.RedCompId,

View File

@ -608,19 +608,21 @@ type DBBattleRecord struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗记录id
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题
Btype BattleType `protobuf:"varint,3,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型
Ptype PlayType `protobuf:"varint,4,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
Plevel string `protobuf:"bytes,5,opt,name=plevel,proto3" json:"plevel"` //玩法关卡
State BBattleState `protobuf:"varint,6,opt,name=state,proto3,enum=BBattleState" json:"state"` //战斗状态
RedCompId string `protobuf:"bytes,7,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id
Redflist []*DBBattleFormt `protobuf:"bytes,8,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表
BlueCompId string `protobuf:"bytes,9,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id
Buleflist []*DBBattleFormt `protobuf:"bytes,10,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表
Roundresult []DBBattleComp `protobuf:"varint,11,rep,packed,name=roundresult,proto3,enum=DBBattleComp" json:"roundresult"` //战斗场次结果
Result DBBattleComp `protobuf:"varint,12,opt,name=result,proto3,enum=DBBattleComp" json:"result"` //最终结果
Tasks []int32 `protobuf:"varint,13,rep,packed,name=tasks,proto3" json:"tasks"` //任务列表
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗记录id
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题
Btype BattleType `protobuf:"varint,3,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型
Ptype PlayType `protobuf:"varint,4,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
Battlereadyid int32 `protobuf:"varint,5,opt,name=battlereadyid,proto3" json:"battlereadyid"` //玩法规则
Scoregroup int32 `protobuf:"varint,6,opt,name=scoregroup,proto3" json:"scoregroup"` //积分组
Plevel string `protobuf:"bytes,7,opt,name=plevel,proto3" json:"plevel"` //玩法关卡
State BBattleState `protobuf:"varint,8,opt,name=state,proto3,enum=BBattleState" json:"state"` //战斗状态
RedCompId string `protobuf:"bytes,9,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id
Redflist []*DBBattleFormt `protobuf:"bytes,10,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表
BlueCompId string `protobuf:"bytes,11,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id
Buleflist []*DBBattleFormt `protobuf:"bytes,12,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表
Roundresult []DBBattleComp `protobuf:"varint,13,rep,packed,name=roundresult,proto3,enum=DBBattleComp" json:"roundresult"` //战斗场次结果
Result DBBattleComp `protobuf:"varint,14,opt,name=result,proto3,enum=DBBattleComp" json:"result"` //最终结果
Tasks []int32 `protobuf:"varint,15,rep,packed,name=tasks,proto3" json:"tasks"` //任务列表
}
func (x *DBBattleRecord) Reset() {
@ -683,6 +685,20 @@ func (x *DBBattleRecord) GetPtype() PlayType {
return PlayType_null
}
func (x *DBBattleRecord) GetBattlereadyid() int32 {
if x != nil {
return x.Battlereadyid
}
return 0
}
func (x *DBBattleRecord) GetScoregroup() int32 {
if x != nil {
return x.Scoregroup
}
return 0
}
func (x *DBBattleRecord) GetPlevel() string {
if x != nil {
return x.Plevel
@ -804,7 +820,7 @@ var file_battle_battle_db_proto_rawDesc = []byte{
0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d,
0x12, 0x2b, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c,
0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xbd, 0x03,
0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x83, 0x04,
0x0a, 0x0e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
@ -812,59 +828,63 @@ var file_battle_battle_db_proto_rawDesc = []byte{
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79,
0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79,
0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54,
0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c,
0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x65, 0x76,
0x65, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x0d, 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65,
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f,
0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43,
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73,
0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73,
0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49,
0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46,
0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12,
0x2f, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0b,
0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
0x6f, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52,
0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73,
0x18, 0x0d, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2a, 0x4e, 0x0a,
0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e,
0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a,
0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12,
0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x70, 0x76,
0x70, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x70, 0x65, 0x76, 0x10, 0x06, 0x2a, 0xc7, 0x02,
0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75,
0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09,
0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e,
0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67,
0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73,
0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b,
0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68,
0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0a, 0x0a,
0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x6e, 0x63,
0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x6d, 0x65,
0x65, 0x74, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65,
0x6e, 0x70, 0x63, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x10, 0x0f, 0x12,
0x09, 0x0a, 0x05, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x10, 0x10, 0x12, 0x0c, 0x0a, 0x08, 0x67, 0x75,
0x69, 0x6c, 0x64, 0x67, 0x76, 0x65, 0x10, 0x11, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x6e,
0x65, 0x10, 0x12, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x62, 0x6f, 0x6f, 0x73, 0x10, 0x13,
0x12, 0x0a, 0x0a, 0x06, 0x69, 0x73, 0x4c, 0x61, 0x6e, 0x64, 0x10, 0x14, 0x12, 0x0c, 0x0a, 0x08,
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x10, 0x15, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x6c,
0x75, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x16, 0x12, 0x0e, 0x0a, 0x0a, 0x70, 0x6c, 0x75, 0x6e, 0x64,
0x65, 0x72, 0x70, 0x76, 0x70, 0x10, 0x17, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, 0x12,
0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77,
0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x62,
0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x61, 0x64, 0x79, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x65, 0x61, 0x64, 0x79, 0x69, 0x64,
0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74,
0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72,
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72,
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43,
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75,
0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66,
0x6c, 0x69, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65,
0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61,
0x73, 0x6b, 0x73, 0x2a, 0x4e, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70,
0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76,
0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03,
0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x12, 0x09,
0x0a, 0x05, 0x72, 0x74, 0x70, 0x76, 0x70, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x70, 0x65,
0x76, 0x10, 0x06, 0x2a, 0xc7, 0x02, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65,
0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61,
0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f,
0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12,
0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06,
0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e,
0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65,
0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10,
0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e,
0x67, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12,
0x0b, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x12, 0x0b, 0x0a, 0x07,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x66, 0x72, 0x69,
0x65, 0x6e, 0x64, 0x73, 0x6d, 0x65, 0x65, 0x74, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72,
0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x6e, 0x70, 0x63, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x72,
0x61, 0x63, 0x65, 0x10, 0x0f, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x10, 0x10,
0x12, 0x0c, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x67, 0x76, 0x65, 0x10, 0x11, 0x12, 0x09,
0x0a, 0x05, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x10, 0x12, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x78, 0x70,
0x62, 0x6f, 0x6f, 0x73, 0x10, 0x13, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x73, 0x4c, 0x61, 0x6e, 0x64,
0x10, 0x14, 0x12, 0x0c, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x10, 0x15,
0x12, 0x0b, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x16, 0x12, 0x0e, 0x0a,
0x0a, 0x70, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x70, 0x76, 0x70, 0x10, 0x17, 0x2a, 0x1f, 0x0a,
0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a,
0x02, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b,
0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08,
0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10,
0x01, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -892,15 +892,16 @@ type BattleInfo struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题
Rulesid int32 `protobuf:"varint,3,opt,name=rulesid,proto3" json:"rulesid"` //规则id
Btype BattleType `protobuf:"varint,4,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型
Ptype PlayType `protobuf:"varint,5,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
RedCompId string `protobuf:"bytes,6,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id
Redflist []*DBBattleFormt `protobuf:"bytes,7,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表
BlueCompId string `protobuf:"bytes,8,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id
Buleflist []*DBBattleFormt `protobuf:"bytes,9,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表
Tasks []int32 `protobuf:"varint,10,rep,packed,name=tasks,proto3" json:"tasks"` //任务列表
Params []float32 `protobuf:"fixed32,11,rep,packed,name=params,proto3" json:"params"` //需要代入战斗中的参数列表
Buffer []int32 `protobuf:"varint,12,rep,packed,name=buffer,proto3" json:"buffer"` // 战斗buff 带入
Scoregroup int32 `protobuf:"varint,4,opt,name=scoregroup,proto3" json:"scoregroup"` //评分组
Btype BattleType `protobuf:"varint,5,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型
Ptype PlayType `protobuf:"varint,6,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
RedCompId string `protobuf:"bytes,7,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id
Redflist []*DBBattleFormt `protobuf:"bytes,8,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表
BlueCompId string `protobuf:"bytes,9,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id
Buleflist []*DBBattleFormt `protobuf:"bytes,10,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表
Tasks []int32 `protobuf:"varint,11,rep,packed,name=tasks,proto3" json:"tasks"` //任务列表
Params []float32 `protobuf:"fixed32,12,rep,packed,name=params,proto3" json:"params"` //需要代入战斗中的参数列表
Buffer []int32 `protobuf:"varint,13,rep,packed,name=buffer,proto3" json:"buffer"` //战斗buff 带入
}
func (x *BattleInfo) Reset() {
@ -956,6 +957,13 @@ func (x *BattleInfo) GetRulesid() int32 {
return 0
}
func (x *BattleInfo) GetScoregroup() int32 {
if x != nil {
return x.Scoregroup
}
return 0
}
func (x *BattleInfo) GetBtype() BattleType {
if x != nil {
return x.Btype
@ -2320,29 +2328,31 @@ var file_battle_battle_msg_proto_rawDesc = []byte{
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46,
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28,
0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xee, 0x02, 0x0a, 0x0a, 0x42,
0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x8e, 0x03, 0x0a, 0x0a, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79,
0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x63, 0x6f,
0x72, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73,
0x63, 0x6f, 0x72, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79,
0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05,
0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c,
0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c,
0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72,
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72,
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43,
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75,
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75,
0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66,
0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42,
0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65,
0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0a,
0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0b,
0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x0c, 0x20,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x0d, 0x20,
0x03, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0x51, 0x0a, 0x09, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6d, 0x64, 0x74, 0x79,

View File

@ -25,14 +25,10 @@ type DBEnchant 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
Boss map[int32]int32 `protobuf:"bytes,3,rep,name=boss,proto3" json:"boss" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key boss 类型 value 积分
BuyCount int32 `protobuf:"varint,4,opt,name=buyCount,proto3" json:"buyCount" bson:"buyCount"` //购买次数
CTime int64 `protobuf:"varint,5,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` //修改时间
BossTime map[int32]int32 `protobuf:"bytes,6,rep,name=bossTime,proto3" json:"bossTime" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"bossTime"` //
RecoveryTime int64 `protobuf:"varint,7,opt,name=recoveryTime,proto3" json:"recoveryTime" bson:"recoveryTime"` //// 开始恢复的时间
Grade map[int32]int32 `protobuf:"bytes,8,rep,name=grade,proto3" json:"grade" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key boss 类型 value 积分
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"`
Uinfo *BaseUserInfo `protobuf:"bytes,3,opt,name=uinfo,proto3" json:"uinfo"` //用户基础
Boss map[int32]*DBEnchantBoos `protobuf:"bytes,4,rep,name=boss,proto3" json:"boss" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *DBEnchant) Reset() {
@ -81,45 +77,88 @@ func (x *DBEnchant) GetUid() string {
return ""
}
func (x *DBEnchant) GetBoss() map[int32]int32 {
func (x *DBEnchant) GetUinfo() *BaseUserInfo {
if x != nil {
return x.Uinfo
}
return nil
}
func (x *DBEnchant) GetBoss() map[int32]*DBEnchantBoos {
if x != nil {
return x.Boss
}
return nil
}
func (x *DBEnchant) GetBuyCount() int32 {
type DBEnchantBoos struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Score int32 `protobuf:"varint,1,opt,name=score,proto3" json:"score"`
Grade int32 `protobuf:"varint,2,opt,name=grade,proto3" json:"grade"`
Gradegroup int32 `protobuf:"varint,3,opt,name=gradegroup,proto3" json:"gradegroup"`
Line *LineData `protobuf:"bytes,4,opt,name=line,proto3" json:"line"`
}
func (x *DBEnchantBoos) Reset() {
*x = DBEnchantBoos{}
if protoimpl.UnsafeEnabled {
mi := &file_enchant_enchant_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBEnchantBoos) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBEnchantBoos) ProtoMessage() {}
func (x *DBEnchantBoos) ProtoReflect() protoreflect.Message {
mi := &file_enchant_enchant_db_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 DBEnchantBoos.ProtoReflect.Descriptor instead.
func (*DBEnchantBoos) Descriptor() ([]byte, []int) {
return file_enchant_enchant_db_proto_rawDescGZIP(), []int{1}
}
func (x *DBEnchantBoos) GetScore() int32 {
if x != nil {
return x.BuyCount
return x.Score
}
return 0
}
func (x *DBEnchant) GetCTime() int64 {
if x != nil {
return x.CTime
}
return 0
}
func (x *DBEnchant) GetBossTime() map[int32]int32 {
if x != nil {
return x.BossTime
}
return nil
}
func (x *DBEnchant) GetRecoveryTime() int64 {
if x != nil {
return x.RecoveryTime
}
return 0
}
func (x *DBEnchant) GetGrade() map[int32]int32 {
func (x *DBEnchantBoos) GetGrade() int32 {
if x != nil {
return x.Grade
}
return 0
}
func (x *DBEnchantBoos) GetGradegroup() int32 {
if x != nil {
return x.Gradegroup
}
return 0
}
func (x *DBEnchantBoos) GetLine() *LineData {
if x != nil {
return x.Line
}
return nil
}
@ -129,22 +168,18 @@ type DBEnchantRank 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
Bosstype int32 `protobuf:"varint,3,opt,name=bosstype,proto3" json:"bosstype"` // boss类型塔类型
Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname"` // 昵称
Lv int32 `protobuf:"varint,5,opt,name=lv,proto3" json:"lv"` // 玩家等级
Leadpos int32 `protobuf:"varint,6,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
Line []*LineUp `protobuf:"bytes,7,rep,name=line,proto3" json:"line"` // 阵容数据
CostTime int32 `protobuf:"varint,8,opt,name=costTime,proto3" json:"costTime" bson:"costTime"` //闯关耗时 单位s
Score int64 `protobuf:"varint,9,opt,name=score,proto3" json:"score" bson:"score"`
Title string `protobuf:"bytes,10,opt,name=title,proto3" json:"title"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uinfo *BaseUserInfo `protobuf:"bytes,2,opt,name=uinfo,proto3" json:"uinfo"` //用户基础
Line *LineData `protobuf:"bytes,3,opt,name=line,proto3" json:"line"` //阵容信息
Score int32 `protobuf:"varint,4,opt,name=score,proto3" json:"score"` //积分
Grade int32 `protobuf:"varint,5,opt,name=grade,proto3" json:"grade"` //评级
Gradegroup int32 `protobuf:"varint,6,opt,name=gradegroup,proto3" json:"gradegroup"` //评分组
}
func (x *DBEnchantRank) Reset() {
*x = DBEnchantRank{}
if protoimpl.UnsafeEnabled {
mi := &file_enchant_enchant_db_proto_msgTypes[1]
mi := &file_enchant_enchant_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -157,7 +192,7 @@ func (x *DBEnchantRank) String() string {
func (*DBEnchantRank) ProtoMessage() {}
func (x *DBEnchantRank) ProtoReflect() protoreflect.Message {
mi := &file_enchant_enchant_db_proto_msgTypes[1]
mi := &file_enchant_enchant_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -170,7 +205,7 @@ func (x *DBEnchantRank) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBEnchantRank.ProtoReflect.Descriptor instead.
func (*DBEnchantRank) Descriptor() ([]byte, []int) {
return file_enchant_enchant_db_proto_rawDescGZIP(), []int{1}
return file_enchant_enchant_db_proto_rawDescGZIP(), []int{2}
}
func (x *DBEnchantRank) GetId() string {
@ -180,121 +215,81 @@ func (x *DBEnchantRank) GetId() string {
return ""
}
func (x *DBEnchantRank) GetUid() string {
func (x *DBEnchantRank) GetUinfo() *BaseUserInfo {
if x != nil {
return x.Uid
return x.Uinfo
}
return ""
return nil
}
func (x *DBEnchantRank) GetBosstype() int32 {
if x != nil {
return x.Bosstype
}
return 0
}
func (x *DBEnchantRank) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}
func (x *DBEnchantRank) GetLv() int32 {
if x != nil {
return x.Lv
}
return 0
}
func (x *DBEnchantRank) GetLeadpos() int32 {
if x != nil {
return x.Leadpos
}
return 0
}
func (x *DBEnchantRank) GetLine() []*LineUp {
func (x *DBEnchantRank) GetLine() *LineData {
if x != nil {
return x.Line
}
return nil
}
func (x *DBEnchantRank) GetCostTime() int32 {
if x != nil {
return x.CostTime
}
return 0
}
func (x *DBEnchantRank) GetScore() int64 {
func (x *DBEnchantRank) GetScore() int32 {
if x != nil {
return x.Score
}
return 0
}
func (x *DBEnchantRank) GetTitle() string {
func (x *DBEnchantRank) GetGrade() int32 {
if x != nil {
return x.Title
return x.Grade
}
return ""
return 0
}
func (x *DBEnchantRank) GetGradegroup() int32 {
if x != nil {
return x.Gradegroup
}
return 0
}
var File_enchant_enchant_db_proto protoreflect.FileDescriptor
var file_enchant_enchant_db_proto_rawDesc = []byte{
0x0a, 0x18, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e,
0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x03, 0x0a, 0x09, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e,
0x74, 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, 0x28, 0x0a, 0x04, 0x62, 0x6f, 0x73, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x42, 0x6f,
0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x73, 0x73, 0x12, 0x1a, 0x0a,
0x08, 0x62, 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x62, 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x54, 0x69,
0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x34, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x42, 0x6f,
0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x6f, 0x73,
0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72,
0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x63,
0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x67, 0x72, 0x61,
0x64, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63,
0x68, 0x61, 0x6e, 0x74, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x6f, 0x73, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x3b, 0x0a, 0x0d, 0x42, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a,
0x47, 0x72, 0x61, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf8, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, 0x63,
0x68, 0x61, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 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, 0x1a, 0x0a, 0x08, 0x62, 0x6f,
0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f,
0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x06, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04,
0x6c, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e,
0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73,
0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73,
0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x09,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74,
0x69, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xc5, 0x01, 0x0a, 0x09, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 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,
0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75,
0x69, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x04, 0x62, 0x6f, 0x73, 0x73, 0x18, 0x04, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x42,
0x6f, 0x73, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x73, 0x73, 0x1a, 0x47,
0x0a, 0x09, 0x42, 0x6f, 0x73, 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, 0x44,
0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x73, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7a, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, 0x63,
0x68, 0x61, 0x6e, 0x74, 0x42, 0x6f, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67,
0x72, 0x61, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, 0x67, 0x72, 0x6f,
0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, 0x67,
0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c,
0x69, 0x6e, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e,
0x74, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69,
0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44,
0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f,
0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x64, 0x65,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -309,25 +304,27 @@ func file_enchant_enchant_db_proto_rawDescGZIP() []byte {
return file_enchant_enchant_db_proto_rawDescData
}
var file_enchant_enchant_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_enchant_enchant_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_enchant_enchant_db_proto_goTypes = []interface{}{
(*DBEnchant)(nil), // 0: DBEnchant
(*DBEnchantRank)(nil), // 1: DBEnchantRank
nil, // 2: DBEnchant.BossEntry
nil, // 3: DBEnchant.BossTimeEntry
nil, // 4: DBEnchant.GradeEntry
(*LineUp)(nil), // 5: LineUp
(*DBEnchantBoos)(nil), // 1: DBEnchantBoos
(*DBEnchantRank)(nil), // 2: DBEnchantRank
nil, // 3: DBEnchant.BossEntry
(*BaseUserInfo)(nil), // 4: BaseUserInfo
(*LineData)(nil), // 5: LineData
}
var file_enchant_enchant_db_proto_depIdxs = []int32{
2, // 0: DBEnchant.boss:type_name -> DBEnchant.BossEntry
3, // 1: DBEnchant.bossTime:type_name -> DBEnchant.BossTimeEntry
4, // 2: DBEnchant.grade:type_name -> DBEnchant.GradeEntry
5, // 3: DBEnchantRank.line:type_name -> LineUp
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
4, // 0: DBEnchant.uinfo:type_name -> BaseUserInfo
3, // 1: DBEnchant.boss:type_name -> DBEnchant.BossEntry
5, // 2: DBEnchantBoos.line:type_name -> LineData
4, // 3: DBEnchantRank.uinfo:type_name -> BaseUserInfo
5, // 4: DBEnchantRank.line:type_name -> LineData
1, // 5: DBEnchant.BossEntry.value:type_name -> DBEnchantBoos
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_enchant_enchant_db_proto_init() }
@ -335,6 +332,7 @@ func file_enchant_enchant_db_proto_init() {
if File_enchant_enchant_db_proto != nil {
return
}
file_comm_proto_init()
file_battle_battle_msg_proto_init()
if !protoimpl.UnsafeEnabled {
file_enchant_enchant_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
@ -350,6 +348,18 @@ func file_enchant_enchant_db_proto_init() {
}
}
file_enchant_enchant_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBEnchantBoos); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_enchant_enchant_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBEnchantRank); i {
case 0:
return &v.state
@ -368,7 +378,7 @@ func file_enchant_enchant_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_enchant_enchant_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -285,7 +285,9 @@ type EnchantChallengeOverResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBEnchant `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
Data *DBEnchant `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
Atno []*UserAtno `protobuf:"bytes,2,rep,name=atno,proto3" json:"atno"` // 推送atno
Heroexp map[string]int32 `protobuf:"bytes,3,rep,name=heroexp,proto3" json:"heroexp" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 英雄获得经验
}
func (x *EnchantChallengeOverResp) Reset() {
@ -327,6 +329,20 @@ func (x *EnchantChallengeOverResp) GetData() *DBEnchant {
return nil
}
func (x *EnchantChallengeOverResp) GetAtno() []*UserAtno {
if x != nil {
return x.Atno
}
return nil
}
func (x *EnchantChallengeOverResp) GetHeroexp() map[string]int32 {
if x != nil {
return x.Heroexp
}
return nil
}
// 购买
type EnchantBuyReq struct {
state protoimpl.MessageState
@ -483,7 +499,8 @@ type EnchantRankListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ranks []*DBEnchantRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` // 排行数据 有序的 注意boss类型
Ranks []*DBEnchantRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` // 排行数据 有序的 注意boss类型
Friends []*DBEnchantRank `protobuf:"bytes,2,rep,name=friends,proto3" json:"friends"`
}
func (x *EnchantRankListResp) Reset() {
@ -525,6 +542,13 @@ func (x *EnchantRankListResp) GetRanks() []*DBEnchantRank {
return nil
}
func (x *EnchantRankListResp) GetFriends() []*DBEnchantRank {
if x != nil {
return x.Friends
}
return nil
}
var File_enchant_enchant_msg_proto protoreflect.FileDescriptor
var file_enchant_enchant_msg_proto_rawDesc = []byte{
@ -532,49 +556,62 @@ var file_enchant_enchant_msg_proto_rawDesc = []byte{
0x74, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, 0x63,
0x68, 0x61, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13,
0x0a, 0x11, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x47, 0x65,
0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68,
0x61, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5b, 0x0a, 0x13, 0x45, 0x6e, 0x63,
0x68, 0x61, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71,
0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x06,
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06,
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x53, 0x0a, 0x14, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e,
0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f,
0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12,
0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x72, 0x0a, 0x17, 0x45,
0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f,
0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79,
0x70, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72,
0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f,
0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22,
0x3a, 0x0a, 0x18, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65,
0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x45, 0x6e,
0x63, 0x68, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x25, 0x0a, 0x0d, 0x45,
0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x79,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x22, 0x48, 0x0a, 0x12, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52,
0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f,
0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f,
0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x3b,
0x0a, 0x13, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74,
0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a,
0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x45, 0x6e,
0x63, 0x68, 0x61, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22,
0x34, 0x0a, 0x12, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5b, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74,
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08,
0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x22, 0x53, 0x0a, 0x14, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x43, 0x68, 0x61,
0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e,
0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x62,
0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62,
0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x72, 0x0a, 0x17, 0x45, 0x6e, 0x63, 0x68, 0x61,
0x6e, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52,
0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25,
0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x18,
0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61,
0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x04, 0x61, 0x74, 0x6e, 0x6f,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e,
0x6f, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x12, 0x40, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65,
0x78, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x45, 0x6e, 0x63, 0x68, 0x61,
0x6e, 0x74, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52,
0x65, 0x73, 0x70, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x72,
0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74,
0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, 0x0a, 0x0e,
0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e,
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44,
0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x48,
0x0a, 0x12, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x65, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x68,
0x61, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
0x24, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05,
0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x28, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x45, 0x6e, 0x63, 0x68, 0x61,
0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -589,7 +626,7 @@ func file_enchant_enchant_msg_proto_rawDescGZIP() []byte {
return file_enchant_enchant_msg_proto_rawDescData
}
var file_enchant_enchant_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_enchant_enchant_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_enchant_enchant_msg_proto_goTypes = []interface{}{
(*EnchantGetListReq)(nil), // 0: EnchantGetListReq
(*EnchantGetListResp)(nil), // 1: EnchantGetListResp
@ -601,25 +638,30 @@ var file_enchant_enchant_msg_proto_goTypes = []interface{}{
(*EnchantBuyResp)(nil), // 7: EnchantBuyResp
(*EnchantRankListReq)(nil), // 8: EnchantRankListReq
(*EnchantRankListResp)(nil), // 9: EnchantRankListResp
(*DBEnchant)(nil), // 10: DBEnchant
(*BattleFormation)(nil), // 11: BattleFormation
(*BattleInfo)(nil), // 12: BattleInfo
(*BattleReport)(nil), // 13: BattleReport
(*DBEnchantRank)(nil), // 14: DBEnchantRank
nil, // 10: EnchantChallengeOverResp.HeroexpEntry
(*DBEnchant)(nil), // 11: DBEnchant
(*BattleFormation)(nil), // 12: BattleFormation
(*BattleInfo)(nil), // 13: BattleInfo
(*BattleReport)(nil), // 14: BattleReport
(*UserAtno)(nil), // 15: UserAtno
(*DBEnchantRank)(nil), // 16: DBEnchantRank
}
var file_enchant_enchant_msg_proto_depIdxs = []int32{
10, // 0: EnchantGetListResp.data:type_name -> DBEnchant
11, // 1: EnchantChallengeReq.battle:type_name -> BattleFormation
12, // 2: EnchantChallengeResp.info:type_name -> BattleInfo
13, // 3: EnchantChallengeOverReq.report:type_name -> BattleReport
10, // 4: EnchantChallengeOverResp.data:type_name -> DBEnchant
10, // 5: EnchantBuyResp.data:type_name -> DBEnchant
14, // 6: EnchantRankListResp.ranks:type_name -> DBEnchantRank
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
11, // 0: EnchantGetListResp.data:type_name -> DBEnchant
12, // 1: EnchantChallengeReq.battle:type_name -> BattleFormation
13, // 2: EnchantChallengeResp.info:type_name -> BattleInfo
14, // 3: EnchantChallengeOverReq.report:type_name -> BattleReport
11, // 4: EnchantChallengeOverResp.data:type_name -> DBEnchant
15, // 5: EnchantChallengeOverResp.atno:type_name -> UserAtno
10, // 6: EnchantChallengeOverResp.heroexp:type_name -> EnchantChallengeOverResp.HeroexpEntry
11, // 7: EnchantBuyResp.data:type_name -> DBEnchant
16, // 8: EnchantRankListResp.ranks:type_name -> DBEnchantRank
16, // 9: EnchantRankListResp.friends:type_name -> DBEnchantRank
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
}
func init() { file_enchant_enchant_msg_proto_init() }
@ -629,6 +671,7 @@ func file_enchant_enchant_msg_proto_init() {
}
file_enchant_enchant_db_proto_init()
file_battle_battle_msg_proto_init()
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_enchant_enchant_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EnchantGetListReq); i {
@ -757,7 +800,7 @@ func file_enchant_enchant_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_enchant_enchant_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},