Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2023-04-25 17:49:21 +08:00
commit 5152b9a469
19 changed files with 769 additions and 633 deletions

View File

@ -107,6 +107,8 @@ type (
// 跨服查询英雄详细信息
QueryCrossMultipleHeroinfo(oid []string) (hero []*pb.DBHero, err error)
AddHeroFetterAttribute(session IUserSession, attr map[string][]*cfg.Gameatr)
}
//玩家

View File

@ -112,7 +112,19 @@ type sumy struct {
}
func Test_Main(t *testing.T) {
c := map[int32]int32{
3: 100,
6: 250,
9: 100,
}
out := make(map[int32]int32)
last := 1
for iPos, v := range c {
for ; int32(last) <= iPos; last++ {
out[int32(last)] = v
}
}
// 值包装结构体
d := reflect.ValueOf(sumy{
next: &sumy{},

View File

@ -60,6 +60,7 @@ func (this *ModelHero) InitHero(uid string, heroCfgId string) *pb.DBHero {
JuexProperty: make(map[string]int32),
TalentProperty: make(map[string]int32),
HoroscopeProperty: make(map[string]int32),
Fetters: make(map[string]int32),
}
this.PropertyCompute(newHero)
this.initHeroSkill(newHero)
@ -958,3 +959,32 @@ func (this *ModelHero) checkHeroAllSkillMax(hero *pb.DBHero) bool {
}
return true
}
func (this *ModelHero) SetHeroFetterProperty(hero *pb.DBHero, attr []*cfg.Gameatr) {
if hero == nil || len(attr) == 0 {
return
}
if hero.Fetters == nil {
hero.Fetters = make(map[string]int32, 0)
}
for _, key := range attr {
value := key.N
switch key.A {
case comm.Hp:
hero.Fetters[comm.Hp] += int32(value)
case comm.Def:
hero.Fetters[comm.Def] += int32(value)
case comm.Atk:
hero.Fetters[comm.Atk] += int32(value)
case comm.Speed:
hero.Fetters[comm.Speed] += int32(value)
case comm.HpPro:
hero.Fetters[comm.Hp] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Hp])))
case comm.AtkPro:
hero.Fetters[comm.Atk] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Atk])))
case comm.DefPro:
hero.Fetters[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def])))
default:
this.moduleHero.Errorf("unkonw hero fetter property:%v", key)
}
}
}

View File

@ -977,3 +977,24 @@ func (this *Hero) QueryCrossMultipleHeroinfo(oid []string) (hero []*pb.DBHero, e
return
}
func (this *Hero) AddHeroFetterAttribute(session comm.IUserSession, attr map[string][]*cfg.Gameatr) {
chanegCard := make([]*pb.DBHero, 0)
heroList := this.GetHeroList(session.GetUserId())
for _, v := range heroList {
if v1, ok := attr[v.HeroID]; ok { // 找到对应的英雄ID
_heroMap := make(map[string]interface{}, 0)
this.modelHero.SetHeroFetterProperty(v, v1)
_heroMap["fetters"] = v.Fetters
// 保存数据
err := this.modelHero.ChangeList(session.GetUserId(), v.Id, _heroMap)
if err != nil {
this.Errorf("SetHeroFetterProperty failed:%v", err)
continue
}
chanegCard = append(chanegCard, v)
}
}
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: chanegCard})
}

View File

@ -33,26 +33,7 @@ func (this *apiComp) ActivationFetter(session comm.IUserSession, req *pb.Library
fetter.Activation = true
mapData := make(map[string]interface{}, 0)
mapData["activation"] = fetter.Activation
// 激活的时候算一下 当前羁绊等级
list := this.module.modelFetter.getHeroFetterList(session.GetUserId())
conf := this.module.configure.GetLibraryFetter(fetter.Fid, 1)
var minLv int32
for _, v1 := range conf.Hid {
for _, v := range list {
if v.Heroid == v1 {
if minLv == 0 {
minLv = v.Favorlv
}
if minLv > v.Favorlv {
minLv = v.Favorlv
}
break
}
}
}
fetter.Fetterlv = minLv
mapData["fetterlv"] = fetter.Fetterlv
this.module.modelLibrary.modifyLibraryDataByObjId(session.GetUserId(), fetter.Id, mapData)
rsp.Data = fetter
return
}

View File

@ -3,6 +3,8 @@ package library
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go_dreamfactory/utils"
)
//参数校验
@ -13,13 +15,25 @@ func (this *apiComp) GetFetterListCheck(session comm.IUserSession, req *pb.Libra
func (this *apiComp) GetFetterList(session comm.IUserSession, req *pb.LibraryGetFetterListReq) (code pb.ErrorCode, data *pb.ErrorData) {
code = this.GetFetterListCheck(session, req)
if code != pb.ErrorCode_Success {
if code = this.GetFetterListCheck(session, req); code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
rsp := &pb.LibraryGetFetterListResp{}
rsp.Data = this.module.GetHeroFetterList(session.GetUserId())
for _, v := range rsp.Data {
if !utils.IsToday(v.Ctime) {
update := map[string]interface{}{}
v.Ctime = configure.Now().Unix()
v.Givecount = 0
update["givecount"] = 0
update["ctime"] = v.Ctime
if err := this.module.modelFetter.ChangeList(session.GetUserId(), v.Id, update); err != nil {
this.module.Errorf("modelFetter ChangeList error: %v", err)
}
}
}
session.SendMsg(string(this.module.GetType()), LibraryGetFetterListResp, rsp)
return

View File

@ -20,6 +20,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.LibraryGetListRe
rsp := &pb.LibraryGetListResp{}
rsp.Data = this.module.GetLibraryList(session.GetUserId())
session.SendMsg(string(this.module.GetType()), LibraryGetListResp, rsp)
return

View File

@ -3,6 +3,7 @@ package library
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
//参数校验
@ -13,61 +14,60 @@ func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.LibraryGe
return
}
// 羁绊等级奖励
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.LibraryGetRewardReq) (code pb.ErrorCode, data *pb.ErrorData) {
code = this.GetRewardCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
// 配置校验
rsp := &pb.LibraryGetRewardResp{}
defer session.SendMsg(string(this.module.GetType()), LibraryGetRewardResp, rsp)
fetter := this.module.getLibraryByObjID(session.GetUserId(), req.ObjId)
if fetter == nil {
code = pb.ErrorCode_LibraryNoData
return
}
// fetterlv check
var minLv int32
conf := this.module.configure.GetLibraryFetter(fetter.Fid, req.Fetterlv)
if conf == nil {
conf := this.module.configure.GetFriendData(fetter.Fid, req.Fetterlv)
if len(conf) == 0 {
code = pb.ErrorCode_ConfigNoFound
}
for _, v := range conf.Hid { // 获取羁绊等级
_d := this.module.modelFetter.GetFetterByHeroId(session.GetUserId(), v)
if _d != nil {
if minLv == 0 {
minLv = _d.Favorlv
}
if _d.Favorlv > minLv {
minLv = _d.Favorlv
}
return
} else {
if conf[0].FavorabilityLv > fetter.Fetterlv {
code = pb.ErrorCode_LibraryLvReward
return
}
}
if minLv < req.Fetterlv {
if _, ok := fetter.Prize[req.Fetterlv]; ok {
code = pb.ErrorCode_LibraryReward
return
}
// 等级校验
if req.Fetterlv > fetter.Fetterlv {
code = pb.ErrorCode_LibraryLvReward
return
}
for k := range fetter.Prize {
if k == req.Fetterlv {
code = pb.ErrorCode_LibraryReward
return
}
}
fetter.Prize[req.Fetterlv] = 1
// 发奖
if len(conf.Prize) != 0 {
if code = this.module.DispenseRes(session, conf.Prize, true); code != pb.ErrorCode_Success { //
return
}
}
hProperty := make(map[string][]*cfg.Gameatr, 0)
for _, v := range conf {
var sz []*cfg.Gameatr
for _, v1 := range v.Attribute {
b := &cfg.Gameatr{
A: v1.A,
N: v1.N,
}
sz = append(sz, b)
}
hProperty[v.Hid] = sz
}
this.module.ModuleHero.AddHeroFetterAttribute(session, hProperty)
mapData := make(map[string]interface{}, 0)
mapData["prize"] = fetter.Prize
this.module.ModifyLibraryData(session.GetUserId(), fetter.Id, mapData) // 更新内存信息
rsp.Data = fetter
session.SendMsg(string(this.module.GetType()), LibraryGetRewardResp, rsp)
return
}

View File

@ -8,103 +8,124 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
"strconv"
)
//参数校验
func (this *apiComp) GetStoryRewardCheck(session comm.IUserSession, req *pb.LibraryGetStoryRewardReq) (code pb.ErrorCode) {
if req.Hid == "" {
if req.Oid == "" {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGetStoryRewardReq) (code pb.ErrorCode, data *pb.ErrorData) {
var (
update map[string]interface{}
)
update = make(map[string]interface{}, 0)
resp := &pb.LibraryGetStoryRewardResp{}
code = this.GetStoryRewardCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
_heroFetter := this.module.modelFetter.getOneHeroFetter(session.GetUserId(), req.Hid)
_heroFetter := this.module.modelFetter.getOneHeroFetter(session.GetUserId(), req.Oid)
if _heroFetter == nil {
code = pb.ErrorCode_ReqParameterError
return
}
conf := this.module.configure.GetLibraryHero(_heroFetter.Heroid)
if req.History != 0 {
for index, v := range conf.History {
if utils.ToInt32(v) == req.History && conf.Favorlv[index] >= _heroFetter.Favorlv {
for _, v1 := range _heroFetter.History {
if v1 == req.History {
code = pb.ErrorCode_ReqParameterError
return
}
}
favorConf := this.module.configure.GetFavorability(_heroFetter.Heroid, 1) // 取1级的就可以
if favorConf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if req.History != 0 { // 领取传记往事id
for _, v := range _heroFetter.History {
if v == req.History { // 已经领取过奖励
code = pb.ErrorCode_LibraryReward
return
}
_heroFetter.History = append(_heroFetter.History, req.History)
// 发奖
historyConf := this.configure.GetLibraryHistory(strconv.Itoa(int(req.History)))
if historyConf != nil {
this.module.DispenseRes(session, historyConf.Prize, true)
}
mapData := make(map[string]interface{}, 0)
mapData["history"] = _heroFetter.History
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, mapData)
resp.Data = _heroFetter
break
}
} else if req.Rightend != 0 { // 剧情奖励
bRepeadGetReawrd := false
sz := conf.Endid
for _, id := range sz {
if req.Rightend == conf.Rightend || req.Rightend == id {
if len(conf.PlotUnlock) >= len(_heroFetter.Stroyprize)+1 {
// 校验等级
lv := conf.PlotUnlock[len(_heroFetter.Stroyprize)]
if _heroFetter.Favorlv < lv {
code = pb.ErrorCode_LibraryLvReward
return
}
} else {
code = pb.ErrorCode_LibraryLvReward
return
}
for _, v := range _heroFetter.Stroyprize {
if v == req.Rightend {
bRepeadGetReawrd = true
break
}
}
if bRepeadGetReawrd { // 重复领奖
code = pb.ErrorCode_LibraryReward
return
}
var res []*cfg.Gameatn //
if req.Rightend == conf.Rightend {
res = conf.Stroyprize
} else {
res = conf.SpecialStroyprize
}
// 等级规则校验
l := len(_heroFetter.History)
if len(favorConf.Favorlv) < l {
if favorConf.Favorlv[l] > _heroFetter.Favorlv { // 等级不够
code = pb.ErrorCode_LibraryLvReward
return
}
}
for iPos, v := range favorConf.BiographyName {
_heroFetter.Stroyprize = append(_heroFetter.Stroyprize, req.Rightend)
// 发奖
code = this.module.DispenseRes(session, res, true)
if code != pb.ErrorCode_Success {
this.module.Errorf("GetStoryReward err:add item : %v", res)
var res []*cfg.Gameatn
if v == req.History {
switch iPos {
case 1:
res = append(res, favorConf.BiographyReward1...)
case 2:
res = append(res, favorConf.BiographyReward2...)
case 3:
res = append(res, favorConf.BiographyReward3...)
}
mapData := make(map[string]interface{}, 0)
mapData["stroyprize"] = _heroFetter.Stroyprize
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, mapData)
resp.Data = _heroFetter
break
}
if len(res) > 0 {
if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
return
}
} else {
this.module.Errorf("领取奖励配置错误:%d", req.History)
code = pb.ErrorCode_LibraryLvReward
return
}
}
_heroFetter.History = append(_heroFetter.History, req.History)
update["history"] = _heroFetter.History
} else if req.Story != 0 { // 领取故事ID
for _, v := range _heroFetter.Stroyprize {
if v == req.Story { // 已经领取过奖励
code = pb.ErrorCode_LibraryReward
return
}
}
// 等级规则校验
l := len(_heroFetter.Stroyprize)
if len(favorConf.PlotUnlock) < l {
if favorConf.PlotUnlock[l] > _heroFetter.Favorlv { // 等级不够
code = pb.ErrorCode_LibraryLvReward
return
}
}
if favorConf.Rightend == req.Story { // 完美结局
if code = this.module.DispenseRes(session, favorConf.SpecialStroyprize, true); code != pb.ErrorCode_Success {
return
}
} else { // 普通结局
bFound := false
for _, v := range favorConf.Endid {
if v == req.Story {
if code = this.module.DispenseRes(session, favorConf.Stroyprize, true); code != pb.ErrorCode_Success {
return
}
bFound = true
break
}
}
if !bFound {
this.module.Errorf("领取奖励配置错误:%d", req.Story)
code = pb.ErrorCode_LibraryLvReward
return
}
}
_heroFetter.Stroyprize = append(_heroFetter.Stroyprize, req.Story)
update["stroyprize"] = _heroFetter.Stroyprize
}
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, update)
resp.Data = _heroFetter
session.SendMsg(string(this.module.GetType()), LibraryGetStoryRewardResp, resp)
return
}

View File

@ -17,6 +17,7 @@ func (this *apiComp) LvRewardCheck(session comm.IUserSession, req *pb.LibraryLvR
return
}
// 英雄回礼
func (this *apiComp) LvReward(session comm.IUserSession, req *pb.LibraryLvRewardReq) (code pb.ErrorCode, data *pb.ErrorData) {
resp := &pb.LibraryLvRewardResp{}
@ -29,28 +30,25 @@ func (this *apiComp) LvReward(session comm.IUserSession, req *pb.LibraryLvReward
code = pb.ErrorCode_ReqParameterError
return
}
curStar := this.module.configure.GetHeroConfigStar(_heroFetter.Heroid) // 查询原始星级
if curStar == 0 {
code = pb.ErrorCode_ConfigNoFound
if _heroFetter.Lvprize == nil {
_heroFetter.Lvprize = map[int32]int32{}
}
if _, ok := _heroFetter.Lvprize[req.Lv]; ok {
code = pb.ErrorCode_LibraryReward // 重复领奖
return
}
confData := this.module.configure.GetLibraryFavorData(curStar, req.Lv)
if len(confData.Prize) == 0 {
confData := this.module.configure.GetFavorability(_heroFetter.Heroid, req.Lv)
if confData == nil {
code = pb.ErrorCode_ReqParameterError
return
}
for _, v := range _heroFetter.Lvprize {
if v == req.Lv {
code = pb.ErrorCode_LibraryReward // 重复领奖
break
}
}
_heroFetter.Lvprize = append(_heroFetter.Lvprize, req.Lv)
_heroFetter.Lvprize[req.Lv] = 1
// 发奖
code = this.module.DispenseRes(session, confData.Prize, true)
code = this.module.DispenseRes(session, confData.ReturnReward, true)
if code != pb.ErrorCode_Success {
this.module.Errorf("GetStoryReward err:add item : %v", confData.Prize)
this.module.Errorf("GetStoryReward err:add item : %v", confData.ReturnReward)
}
mapData := make(map[string]interface{}, 0)
mapData["lvprize"] = _heroFetter.Lvprize

View File

@ -9,20 +9,23 @@ import (
//参数校验
func (this *apiComp) UseGiftCheck(session comm.IUserSession, req *pb.LibraryUseGiftReq) (code pb.ErrorCode) {
if req.Heroid == "" || len(req.Items) == 0 {
if req.Heroid == "" || req.Items == "" || req.Counts == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
// 给英雄赠送美食
func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftReq) (code pb.ErrorCode, data *pb.ErrorData) {
var (
res []*cfg.Gameatn
totalExp int32
curStar int32 // 配置表星级
maxLv int32 // 羁绊最大等级
upLv int32
res []*cfg.Gameatn
maxLv int32 // 羁绊最大等级
upLv int32
attenuation map[int32]int32
likeStates int32 // 0 普通食物 1 喜欢 2 不喜欢
addExp int32 // 获得的经验
)
attenuation = make(map[int32]int32, 0)
code = this.UseGiftCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
@ -33,48 +36,88 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
code = pb.ErrorCode_HeroNoExist // 没找到对应的英雄信息
return
}
// 查询该英雄原始的星级
curStar = this.module.configure.GetHeroConfigStar(_heroObj.Heroid)
if curStar == 0 {
_exp := this.module.configure.GetFavorabilityExp(req.Heroid)
if len(_exp) == 0 {
code = pb.ErrorCode_ConfigNoFound
return
}
favorConf := this.configure.GetLibraryFavor(curStar)
maxLv = int32(len(favorConf)) // 获取当前星级羁绊最大等级
maxLv = int32(len(_exp)) // 获取当前星级羁绊最大等级
// 达到最大等级不让继续升级
if _heroObj.Favorlv >= maxLv {
code = pb.ErrorCode_LibraryMaxLv
return
}
for k, v := range req.Items { // 校验数量
res = append(res, &cfg.Gameatn{
A: "item",
T: k,
N: v,
})
conf, err := this.module.configure.GetItemConfigureData(k)
if err != nil {
this.module.Errorf("err:%v", err)
return
}
totalExp += conf.SpecialType * v
// 获取当天最大的次数
c := this.module.ModuleTools.GetGlobalConf().FavorabilityAttenuation
maxCoun := c[len(c)-1].K + 1
if _heroObj.Givecount+req.Counts > maxCoun { // 当天赠送次数
code = pb.ErrorCode_LibraryGiveMaxCount
return
}
last := 1
for iPos, v := range c {
for ; last <= iPos; last++ {
attenuation[int32(last)] = v.V // 3,1000|6,500|9,250
}
}
for i := _heroObj.Givecount; i <= _heroObj.Givecount+req.Counts; i++ {
addExp += attenuation[i]
}
// 校验是否是自己喜欢的食物
_c := this.module.configure.GetFavorability(req.Heroid, _heroObj.Favorlv)
if _c != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
for _, v := range _c.LikesFood { // 喜欢的食物
if v == req.Items {
likeStates = 1
addExp *= this.module.ModuleTools.GetGlobalConf().FavorabilityLikes * req.Counts
break
}
}
if likeStates != 1 {
for _, v := range _c.DislikingFood { //不喜欢
if v == req.Items {
likeStates = 2
addExp *= this.module.ModuleTools.GetGlobalConf().FavorabilityDislikes * req.Counts
break
}
}
}
if likeStates == 0 {
addExp *= req.Counts
}
res = append(res, &cfg.Gameatn{
A: "item",
T: req.Items,
N: req.Counts,
})
if code = this.module.CheckRes(session, res); code != pb.ErrorCode_Success { // 道具不够直接返回
return
}
itemConf, err1 := this.module.configure.GetItemConfigureData(req.Items) // 获取食物的
if err1 != nil {
this.module.Errorf("赠送菜品配置没找到:%s", req.Items)
code = pb.ErrorCode_ConfigNoFound
return
}
// 100*1 + 100*0.5 + 100*0.25
addExp *= itemConf.SpecialType / 1000
_heroObj.Favorexp += addExp
_heroObj.Favorexp += totalExp
// 折算出等级
for {
if _heroObj.Favorlv >= maxLv { // 达到最大等级不让继续升级
code = pb.ErrorCode_LibraryMaxLv
_heroObj.Favorexp = 0
break
}
if favorConf[_heroObj.Favorlv] <= _heroObj.Favorexp {
_heroObj.Favorexp -= favorConf[_heroObj.Favorlv]
if _exp[_heroObj.Favorlv] <= _heroObj.Favorexp {
_heroObj.Favorexp -= _exp[_heroObj.Favorlv]
_heroObj.Favorlv += 1
upLv++
} else {
@ -95,6 +138,15 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
// 任务统计
//赠送英雄礼物并增加N点好感度
if upLv > 0 {
this.module.Errorf("英雄好感度等级提升,英雄ID:%s,增加经验:%s,提升的等级:%d", req.Heroid, addExp, upLv)
if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { // 修改阵营累计好感度
if heroCfg := this.module.configure.GetHeroConfig(req.Heroid); heroCfg != nil {
rst.Race[heroCfg.Race] += upLv
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
"race": rst.Race,
})
}
}
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv)
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype134, utils.ToInt32(_heroObj.Heroid), upLv))
}

View File

@ -7,73 +7,93 @@ import (
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"strconv"
"sync"
)
const (
game_libraryhero = "game_libraryhero.json" // 英雄对应的羁绊id信息
game_libraryfetter = "game_libraryfetter.json" // 羁绊信息表
game_libraryhistory = "game_libraryhistory.json" // 往事id 对应的奖励
game_libraryfavor = "game_libraryfavor.json" // 英雄好感度升级所需的经验
game_librarystory = "game_librarystory.json" // 羁绊id对应剧情奖励
game_librarycomplot = "game_librarycomplot.json"
// game_libraryhero = "game_libraryhero.json" // 英雄对应的羁绊id信息
// game_libraryfetter = "game_libraryfetter.json" // 羁绊信息表
// game_libraryhistory = "game_libraryhistory.json" // 往事id 对应的奖励
// game_libraryfavor = "game_libraryfavor.json" // 英雄好感度升级所需的经验
// game_librarystory = "game_librarystory.json" // 羁绊id对应剧情奖励
// game_librarycomplot = "game_librarycomplot.json"
game_favorability = "game_favorability.json" // 好感度
game_friends = "game_friends.json" // 好感度
)
///配置管理基础组件
type configureComp struct {
modules.MCompConfigure
fetter map[int64]*cfg.GameLibraryFetterData
favor map[int64]*cfg.GameLibraryFavorData
hlock sync.RWMutex
favorability map[string]*cfg.GameFavorabilityData
favorLvExp map[string][]int32 // key 英雄id value 每级升级所需要的经验值
friend map[int64][]*cfg.GameFriendsData
heroFetter map[string][]int32 // key 英雄id value 羁绊id
}
//组件初始化接口
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
err = this.LoadMultiConfigure(map[string]interface{}{
game_libraryhero: cfg.NewGameLibraryHero,
game_libraryhistory: cfg.NewGameLibraryHistory,
game_libraryfavor: cfg.NewGameLibraryFavor,
game_librarystory: cfg.NewGameLibraryStory,
game_librarycomplot: cfg.NewGameLibraryComplot,
})
this.fetter = make(map[int64]*cfg.GameLibraryFetterData, 0)
configure.RegisterConfigure(game_libraryfetter, cfg.NewGameLibraryFetter, this.SetLibraryFetter)
this.favor = make(map[int64]*cfg.GameLibraryFavorData, 0)
configure.RegisterConfigure(game_libraryfetter, cfg.NewGameLibraryFetter, this.SetLibraryFavor)
configure.RegisterConfigure(game_favorability, cfg.NewGameFavorability, this.SetFavorability)
configure.RegisterConfigure(game_friends, cfg.NewGameFriends, this.SetFriendData)
return
}
func (this *configureComp) SetFavorability() {
if v, err := this.GetConfigure(game_favorability); err == nil {
this.hlock.Lock()
defer this.hlock.Unlock()
this.favorability = make(map[string]*cfg.GameFavorabilityData, 0)
this.favorLvExp = make(map[string][]int32)
if _configure, ok := v.(*cfg.GameFavorability); ok {
for _, v1 := range _configure.GetDataList() {
lv := strconv.Itoa(int(v1.FavorLv))
this.favorLvExp[v1.Hid] = append(this.favorLvExp[v1.Hid], v1.FavorExp)
this.favorability[v1.Hid+"-"+lv] = v1
}
return
}
} else {
err = fmt.Errorf("%T no is *cfg.SetFavorability", err)
}
}
func (this *configureComp) GetFavorability(hid string, lv int32) *cfg.GameFavorabilityData {
return this.favorability[hid+"-"+strconv.Itoa(int(lv))]
}
func (this *configureComp) SetFriendData() {
if v, err := this.GetConfigure(game_friends); err == nil {
this.hlock.Lock()
defer this.hlock.Unlock()
this.friend = make(map[int64][]*cfg.GameFriendsData, 0)
this.heroFetter = make(map[string][]int32)
if _configure, ok := v.(*cfg.GameFriends); ok {
for _, v1 := range _configure.GetDataList() {
key := int64(v1.FriendId)<<8 + int64(v1.FriendsLv)
this.friend[key] = append(this.friend[key], v1)
this.heroFetter[v1.Hid] = append(this.heroFetter[v1.Hid], v1.FriendId)
}
}
} else {
err = fmt.Errorf("%T no is *cfg.SetFavorability", err)
}
return
}
func (this *configureComp) SetLibraryFavor() {
if v, err := this.GetConfigure(game_libraryfavor); err == nil {
if _configure, ok := v.(*cfg.GameLibraryFavor); ok {
for _, v1 := range _configure.GetDataList() {
this.favor[int64(v1.Star<<8)+int64(v1.Favorlv)] = v1
}
return
}
} else {
err = fmt.Errorf("%T no is *cfg.GameLibraryFavor", v)
}
}
func (this *configureComp) GetLibraryFavorData(star, favorlv int32) (data *cfg.GameLibraryFavorData) {
return this.favor[int64(star<<8)+int64(favorlv)]
// id:羁绊id lv 羁绊等级
func (this *configureComp) GetFriendData(id int32, lv int32) []*cfg.GameFriendsData {
return this.friend[int64(id)<<8+int64(lv)]
}
func (this *configureComp) SetLibraryFetter() {
if v, err := this.GetConfigure(game_libraryfetter); err == nil {
if _configure, ok := v.(*cfg.GameLibraryFetter); ok {
for _, v := range _configure.GetDataList() {
this.fetter[int64(v.Fid<<8)+int64(v.Favorlv)] = v
}
return
}
} else {
err = fmt.Errorf("%T no is *cfg.GameLibraryFetter", v)
}
}
func (this *configureComp) GetLibraryFetter(fid, favorlv int32) (data *cfg.GameLibraryFetterData) {
return this.fetter[int64(fid<<8)+int64(favorlv)]
// 通过英雄获取当前英雄的所有羁绊ID
func (this *configureComp) GetHeroFetterID(hid string) []int32 {
return this.heroFetter[hid]
}
//加载多个配置文件
@ -93,80 +113,7 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
return configure.GetConfigure(name)
}
func (this *configureComp) GetLibraryHero(hid string) (data *cfg.GameLibraryHeroData) {
if v, err := this.GetConfigure(game_libraryhero); err == nil {
if configure, ok := v.(*cfg.GameLibraryHero); ok {
data = configure.Get(hid)
}
} else {
log.Errorf("get GetLibraryHero conf err:%v", err)
}
return
}
func (this *configureComp) GetFavorabilityExp(hid string) []int32 {
// 获取当前星级的好感度
func (this *configureComp) GetLibraryFavor(star int32) (data []int32) {
if v, err := this.GetConfigure(game_libraryfavor); err == nil {
if configure, ok := v.(*cfg.GameLibraryFavor); ok {
for _, v := range configure.GetDataList() {
if v.Star == star {
data = append(data, v.Expneed)
}
}
}
} else {
log.Errorf("GetLibraryFavor conf err:%v", err)
}
return
}
func (this *configureComp) GetLibraryHistory(id string) (data *cfg.GameLibraryHistoryData) {
if v, err := this.GetConfigure(game_libraryhistory); err == nil {
if configure, ok := v.(*cfg.GameLibraryHistory); ok {
data = configure.Get(id)
}
} else {
log.Errorf("GetLibraryHistory conf err:%v", err)
}
return
}
func (this *configureComp) GetLibraryStory(fid int32) (data *cfg.GameLibraryStoryData) {
if v, err := this.GetConfigure(game_librarystory); err == nil {
if configure, ok := v.(*cfg.GameLibraryStory); ok {
data = configure.Get(fid)
}
} else {
log.Errorf("GetLibraryStory conf err:%v", err)
}
return
}
func (this *configureComp) getFetterstoryTaskCfg() (data *cfg.GameLibraryComplot, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(game_librarycomplot); err != nil {
return
} else {
if data, ok = v.(*cfg.GameLibraryComplot); !ok {
err = fmt.Errorf("%T no is *cfg.GameLibraryComplot", v)
return
}
}
return
}
func(c *configureComp)getMainTaskCfgByFetter(fetterId int32)(list []*cfg.GameLibraryComplotData) {
glc, err := c.getFetterstoryTaskCfg()
if err!=nil{
return nil
}
for _, v:=range glc.GetDataList(){
if v.FetterId == fetterId{
list = append(list, v)
}
}
return
return this.favorLvExp[hid]
}

View File

@ -6,7 +6,6 @@ import (
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
@ -56,17 +55,17 @@ func (this *modelFetterstory) getFetterTasks(uid string, fetterId int32) *pb.Fet
// 校验前置任务是否完成
// true完成 false未完成
func (this *modelFetterstory) isPreFinished(finishTasks []int32, taskId int32) bool {
maintaskConf, ok := this.module.confComplot.GetDataMap()[taskId]
if !ok {
return false
}
if maintaskConf.SubTask == 0 {
return true
}
// maintaskConf, ok := this.module.confComplot.GetDataMap()[taskId]
// if !ok {
// return false
// }
// if maintaskConf.SubTask == 0 {
// return true
// }
if _, ok := utils.Findx(finishTasks, maintaskConf.SubTask); ok {
return true
}
// if _, ok := utils.Findx(finishTasks, maintaskConf.SubTask); ok {
// return true
// }
return false
}

View File

@ -9,7 +9,6 @@ import (
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
"go.mongodb.org/mongo-driver/bson/primitive"
@ -23,7 +22,6 @@ type Library struct {
modelFetterstory *modelFetterstory
api *apiComp
configure *configureComp
confComplot *cfg.GameLibraryComplot
}
func NewModule() core.IModule {
@ -52,9 +50,7 @@ func (this *Library) OnInstallComp() {
func (this *Library) Start() (err error) {
err = this.ModuleBase.Start()
this.service.RegisterFunctionName(string(comm.Rpc_ModuleFetter), this.Rpc_ModuleFetter)
if this.confComplot, err = this.configure.getFetterstoryTaskCfg(); err != nil {
return err
}
return
}
@ -83,28 +79,76 @@ func (this *Library) GetLibraryListByFid(uid string, fid int32) *pb.DBLibrary {
return nil
}
// 通过英雄ID 查询羁绊信息
func (this *Library) GetLibraryListByHid(uid string, hid string) *pb.DBLibrary {
list := this.modelLibrary.getLibraryList(uid)
for _, v := range list {
if _, ok := v.Herofetter[hid]; ok {
return v
}
}
return nil
}
//
func (this *Library) CheckFetter(uid string, hid string) (dbLibrary []*pb.DBLibrary, fetter []*pb.DBHeroFetter) {
szFid := this.configure.GetHeroFetterID(hid)
for _, fid := range szFid {
if list := this.GetLibraryListByFid(uid, fid); list == nil { // 没有这条羁绊数据
tmp := &pb.DBLibrary{ // 创建一条羁绊数据
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Fid: fid,
Herofetter: map[string]string{},
Prize: map[int32]int32{},
}
if _d := this.CheckHeroFetter(uid, hid); _d != nil { // check DBHeroFetter
tmp.Herofetter[hid] = _d.Id
fetter = append(fetter, _d)
}
if err := this.modelLibrary.createLibrary(uid, tmp); err != nil {
this.modelFetter.module.Errorf("createLibrary error: %v,obj:%v", err, tmp)
continue
}
dbLibrary = append(dbLibrary, tmp)
} else { // 有这条羁绊数据
if _, ok := list.Herofetter[hid]; !ok {
if _d := this.CheckHeroFetter(uid, hid); _d == nil {
list.Herofetter[hid] = _d.Id
fetter = append(fetter, _d)
}
mapData := make(map[string]interface{}, 0)
mapData["herofetter"] = list.Herofetter
this.modelLibrary.modifyLibraryDataByObjId(uid, list.Id, mapData) // 更新新的羁绊信息
dbLibrary = append(dbLibrary, list)
}
}
}
return
}
//通过羁绊id 创建多个羁绊信息
func (this *Library) CreateLibrary(uid string, fid int32, heroConfId string) (code pb.ErrorCode, obj *pb.DBLibrary) {
obj = &pb.DBLibrary{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Fid: fid,
Hero: map[string]int32{},
Prize: map[int32]int32{},
Fetterlv: 0,
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Fid: fid,
Herofetter: map[string]string{},
Prize: map[int32]int32{},
}
conf := this.configure.GetLibraryFetter(fid, 1)
conf := this.configure.GetFriendData(fid, 1)
if conf != nil {
for _, v := range conf.Hid {
obj.Hero[v] = 0 // 默认值
if v == heroConfId {
obj.Hero[heroConfId] = 1 // 获得的英雄好感度等级为1级
}
}
if err := this.modelLibrary.createLibrary(uid, obj); err != nil {
code = pb.ErrorCode_DBError
}
obj.Herofetter[heroConfId] = obj.Id
}
return
@ -120,9 +164,32 @@ func (this *Library) GetHeroFetterList(uid string) []*pb.DBHeroFetter {
return this.modelFetter.getHeroFetterList(uid)
}
// 校验羁绊数据 如果没有 则创建
func (this *Library) CheckHeroFetter(uid string, hid string) (obj *pb.DBHeroFetter) {
var (
sz []*pb.DBHeroFetter
bFound bool
err error
)
sz = this.modelFetter.getHeroFetterList(uid)
for _, v := range sz {
if v.Heroid == hid {
bFound = true
break
}
}
if !bFound { // 创建一条英雄数据
if obj, err = this.createHeroFetter(uid, hid); err != nil {
obj = nil
return
}
}
return
}
// 创建一条英雄羁绊信息
func (this *Library) createHeroFetter(uid string, heroConfId string) (obj *pb.DBHeroFetter, code pb.ErrorCode) {
this.modelFetter.getHeroFetterList(uid)
func (this *Library) createHeroFetter(uid string, heroConfId string) (obj *pb.DBHeroFetter, err error) {
obj = &pb.DBHeroFetter{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
@ -130,11 +197,9 @@ func (this *Library) createHeroFetter(uid string, heroConfId string) (obj *pb.DB
History: make([]int32, 0),
Favorlv: 1,
Stroyprize: make([]int32, 0),
Lvprize: make([]int32, 0),
}
if err := this.modelFetter.createHeroFetter(uid, obj); err != nil {
code = pb.ErrorCode_DBError
Lvprize: make(map[int32]int32, 0),
}
err = this.modelFetter.createHeroFetter(uid, obj)
return
}
@ -174,64 +239,9 @@ func (this *Library) SendRpcAddHero(uid string, heroConfId string, serverTag str
// 创建一条羁绊信息
func (this *Library) AddHeroFetterData(uid, heroConfId string) (code pb.ErrorCode) {
_conf := this.configure.GetLibraryHero(heroConfId) // 配置表中没有这个英雄数据 直接返回
if _conf == nil {
return
}
var (
objFetter *pb.DBHeroFetter // 详细羁绊信息数据
)
rsp := &pb.LibraryChangePush{}
_data := this.QueryOneHeroFetter(uid, heroConfId)
if _data == nil {
objFetter, code = this.createHeroFetter(uid, heroConfId)
if code == pb.ErrorCode_Success {
rsp.Fetter = append(rsp.Fetter, objFetter)
} else {
this.Errorf("createHeroFetter failed:%v,uid:%s,heroid:%s", code, uid, heroConfId)
}
}
for _, fid := range _conf.Fid {
// 查询是否存在这个羁绊对象
obj := this.GetLibraryListByFid(uid, fid)
if obj == nil { // 没有羁绊信息
code, obj = this.CreateLibrary(uid, fid, heroConfId)
if code != pb.ErrorCode_Success {
this.Errorf("CreateLibrary failed: %v,uid:%s,fid:%d", code, uid, fid)
}
rsp.Data = append(rsp.Data, obj)
} else { // 羁绊信息中没有这个heroid 也需要加进来
// 同步数据
mapData := make(map[string]interface{}, 0)
rsp.Data, rsp.Fetter = this.CheckFetter(uid, heroConfId)
if obj.Activation {
// 重新计算最低等级
var minLv int32
conf := this.configure.GetLibraryFetter(obj.Fid, 1)
list := this.GetHeroFetterList(uid)
for _, v1 := range conf.Hid {
for _, v := range list {
if v.Heroid == v1 {
if minLv == 0 {
minLv = v.Favorlv
}
if minLv > v.Favorlv {
minLv = v.Favorlv
}
break
}
}
}
obj.Fetterlv = minLv
mapData["fetterlv"] = obj.Fetterlv
}
mapData["hero"] = obj.Hero
this.modelLibrary.modifyLibraryDataByObjId(uid, obj.Id, mapData)
rsp.Data = append(rsp.Data, obj)
}
}
if len(rsp.Data) != 0 || len(rsp.Fetter) != 0 {
this.SendMsgToUser(string(this.GetType()), LibraryChangePush, rsp, uid)
}

View File

@ -6,6 +6,7 @@ import (
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go_dreamfactory/sys/db"
"go_dreamfactory/utils"
@ -51,6 +52,8 @@ func (this *ModelExpand) GetUserExpand(uid string) (result *pb.DBUserExpand, err
"sociatyTicket": globalConf.GuildBossInitialNum, //公会BOSS挑战券
"expitem": make(map[string]int32, 0), // 初始化
"mline": make(map[string]int32, 0),
"race": make(map[string]int32, 0),
"givetime": configure.Now().Unix(),
}
result.SociatyTicket = globalConf.GuildBossInitialNum
if err = this.module.modelExpand.ChangeUserExpand(uid, initUpdate); err != nil {

View File

@ -101,6 +101,7 @@ type DBHero struct {
HoroscopeProperty map[string]int32 `protobuf:"bytes,28,rep,name=horoscopeProperty,proto3" json:"horoscopeProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"horoscopeProperty"` ////星座属性加成
Fulllvenr int32 `protobuf:"varint,29,opt,name=fulllvenr,proto3" json:"fulllvenr" bson:"fulllvenr"` ////满级登记分组 武馆使用
KongfuUid string `protobuf:"bytes,30,opt,name=kongfuUid,proto3" json:"kongfuUid"` //@go_tags(`bson:"kongfuUid"`)// 英雄在谁家练功
Fetters map[string]int32 `protobuf:"bytes,31,rep,name=fetters,proto3" json:"fetters" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"fetters"` ////羁绊属性加成
}
func (x *DBHero) Reset() {
@ -345,6 +346,13 @@ func (x *DBHero) GetKongfuUid() string {
return ""
}
func (x *DBHero) GetFetters() map[string]int32 {
if x != nil {
return x.Fetters
}
return nil
}
//英雄扩展数据
type DBHeroRecord struct {
state protoimpl.MessageState
@ -582,7 +590,7 @@ var File_hero_hero_db_proto protoreflect.FileDescriptor
var file_hero_hero_db_proto_rawDesc = []byte{
0x0a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xc7, 0x0a, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x22, 0xb3, 0x0b, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 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, 0x16, 0x0a,
0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68,
@ -646,7 +654,10 @@ var file_hero_hero_db_proto_rawDesc = []byte{
0x76, 0x65, 0x6e, 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, 0x75, 0x6c, 0x6c,
0x6c, 0x76, 0x65, 0x6e, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x6f, 0x6e, 0x67, 0x66, 0x75, 0x55,
0x69, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x6f, 0x6e, 0x67, 0x66, 0x75,
0x55, 0x69, 0x64, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45,
0x55, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x1f,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x46, 0x65,
0x74, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x65, 0x74, 0x74,
0x65, 0x72, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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,
@ -666,64 +677,68 @@ var file_hero_hero_db_proto_rawDesc = []byte{
0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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, 0x98, 0x05, 0x0a, 0x0c, 0x44,
0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x14, 0x0a,
0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74,
0x61, 0x72, 0x34, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01,
0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a,
0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1c, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09,
0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x73, 0x74, 0x61,
0x72, 0x35, 0x48, 0x65, 0x72, 0x6f, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44,
0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x72,
0x35, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72,
0x35, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x79, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x61, 0x79, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e,
0x62, 0x75, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75,
0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18,
0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c,
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x31,
0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62,
0x6c, 0x65, 0x31, 0x12, 0x2b, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x2e, 0x52, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65,
0x1a, 0x3c, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x1a, 0x3c,
0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x35, 0x48, 0x65, 0x72, 0x6f, 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, 0x1a, 0x37, 0x0a, 0x09,
0x52, 0x61, 0x63, 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, 0xb6, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f,
0x54, 0x61, 0x6c, 0x65, 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, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f,
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64,
0x12, 0x31, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2e,
0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x61, 0x6c,
0x65, 0x6e, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 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, 0x2a, 0x2f,
0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x65,
0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48,
0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, 0x67, 0x46, 0x75, 0x10, 0x01, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x65,
0x74, 0x74, 0x65, 0x72, 0x73, 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, 0x98, 0x05, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72,
0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61,
0x72, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x12,
0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x73, 0x74, 0x61, 0x72, 0x35, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64,
0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x09, 0x63, 0x6f, 0x6e,
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44,
0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6e, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x35, 0x48, 0x65,
0x72, 0x6f, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72,
0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x35, 0x48, 0x65, 0x72,
0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x35, 0x48, 0x65, 0x72,
0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x79, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x61, 0x79, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f,
0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x18,
0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x12, 0x1e, 0x0a,
0x0a, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x31, 0x18, 0x0e, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x65, 0x76, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x31, 0x12,
0x2b, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x52, 0x61, 0x63,
0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x1a, 0x3c, 0x0a, 0x0e,
0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x1a, 0x3c, 0x0a, 0x0e, 0x53, 0x74,
0x61, 0x72, 0x35, 0x48, 0x65, 0x72, 0x6f, 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, 0x1a, 0x37, 0x0a, 0x09, 0x52, 0x61, 0x63, 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, 0xb6, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65,
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, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x06,
0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44,
0x42, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x6c, 0x65,
0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x1a,
0x39, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 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, 0x2a, 0x2f, 0x0a, 0x08, 0x48, 0x65,
0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79,
0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x54,
0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, 0x67, 0x46, 0x75, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -739,7 +754,7 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte {
}
var file_hero_hero_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_hero_hero_db_proto_goTypes = []interface{}{
(HeroType)(0), // 0: HeroType
(*DBHero)(nil), // 1: DBHero
@ -750,30 +765,32 @@ var file_hero_hero_db_proto_goTypes = []interface{}{
nil, // 6: DBHero.JuexPropertyEntry
nil, // 7: DBHero.TalentPropertyEntry
nil, // 8: DBHero.HoroscopePropertyEntry
nil, // 9: DBHeroRecord.ConditionEntry
nil, // 10: DBHeroRecord.Star5HeroEntry
nil, // 11: DBHeroRecord.RaceEntry
nil, // 12: DBHeroTalent.TalentEntry
(*SkillData)(nil), // 13: SkillData
nil, // 9: DBHero.FettersEntry
nil, // 10: DBHeroRecord.ConditionEntry
nil, // 11: DBHeroRecord.Star5HeroEntry
nil, // 12: DBHeroRecord.RaceEntry
nil, // 13: DBHeroTalent.TalentEntry
(*SkillData)(nil), // 14: SkillData
}
var file_hero_hero_db_proto_depIdxs = []int32{
13, // 0: DBHero.normalSkill:type_name -> SkillData
14, // 0: DBHero.normalSkill:type_name -> SkillData
4, // 1: DBHero.property:type_name -> DBHero.PropertyEntry
5, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
6, // 3: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry
0, // 4: DBHero.status:type_name -> HeroType
7, // 5: DBHero.talentProperty:type_name -> DBHero.TalentPropertyEntry
13, // 6: DBHero.equipSkill:type_name -> SkillData
14, // 6: DBHero.equipSkill:type_name -> SkillData
8, // 7: DBHero.horoscopeProperty:type_name -> DBHero.HoroscopePropertyEntry
9, // 8: DBHeroRecord.condition:type_name -> DBHeroRecord.ConditionEntry
10, // 9: DBHeroRecord.star5Hero:type_name -> DBHeroRecord.Star5HeroEntry
11, // 10: DBHeroRecord.race:type_name -> DBHeroRecord.RaceEntry
12, // 11: DBHeroTalent.talent:type_name -> DBHeroTalent.TalentEntry
12, // [12:12] is the sub-list for method output_type
12, // [12:12] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension type_name
12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
9, // 8: DBHero.fetters:type_name -> DBHero.FettersEntry
10, // 9: DBHeroRecord.condition:type_name -> DBHeroRecord.ConditionEntry
11, // 10: DBHeroRecord.star5Hero:type_name -> DBHeroRecord.Star5HeroEntry
12, // 11: DBHeroRecord.race:type_name -> DBHeroRecord.RaceEntry
13, // 12: DBHeroTalent.talent:type_name -> DBHeroTalent.TalentEntry
13, // [13:13] is the sub-list for method output_type
13, // [13:13] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
}
func init() { file_hero_hero_db_proto_init() }
@ -826,7 +843,7 @@ func file_hero_hero_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hero_hero_db_proto_rawDesc,
NumEnums: 1,
NumMessages: 12,
NumMessages: 13,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -25,14 +25,14 @@ type DBLibrary 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
Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id
Hero map[string]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: id
Prize map[int32]int32 `protobuf:"bytes,5,rep,name=prize,proto3" json:"prize" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //是否领奖 key 好感度等级
Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级
Storyid int32 `protobuf:"varint,7,opt,name=storyid,proto3" json:"storyid"` // 故事id 用来判断是否领奖
Activation bool `protobuf:"varint,8,opt,name=activation,proto3" json:"activation"` // 是否激活
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
Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id
Herofetter map[string]string `protobuf:"bytes,4,rep,name=herofetter,proto3" json:"herofetter" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key: hid value: DBHeroFetter ObjID
Prize map[int32]int32 `protobuf:"bytes,5,rep,name=prize,proto3" json:"prize" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //是否领奖 key 好感度等级
Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级综合
Storyid int32 `protobuf:"varint,7,opt,name=storyid,proto3" json:"storyid"` // 故事id 用来判断是否领奖
Activation bool `protobuf:"varint,8,opt,name=activation,proto3" json:"activation"` // 是否激活
}
func (x *DBLibrary) Reset() {
@ -88,9 +88,9 @@ func (x *DBLibrary) GetFid() int32 {
return 0
}
func (x *DBLibrary) GetHero() map[string]int32 {
func (x *DBLibrary) GetHerofetter() map[string]string {
if x != nil {
return x.Hero
return x.Herofetter
}
return nil
}
@ -129,14 +129,16 @@ type DBHeroFetter 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
Heroid string `protobuf:"bytes,3,opt,name=heroid,proto3" json:"heroid"` // 英雄配置表id
History []int32 `protobuf:"varint,4,rep,packed,name=history,proto3" json:"history"` // 传记往事ID
Favorlv int32 `protobuf:"varint,5,opt,name=favorlv,proto3" json:"favorlv"` // 好感度等级
Favorexp int32 `protobuf:"varint,6,opt,name=favorexp,proto3" json:"favorexp"` // 好感度经验
Stroyprize []int32 `protobuf:"varint,7,rep,packed,name=stroyprize,proto3" json:"stroyprize"` // 剧情奖励
Lvprize []int32 `protobuf:"varint,8,rep,packed,name=lvprize,proto3" json:"lvprize"` // 等级奖励
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
Heroid string `protobuf:"bytes,3,opt,name=heroid,proto3" json:"heroid"` // 英雄配置表id
History []int32 `protobuf:"varint,4,rep,packed,name=history,proto3" json:"history"` // 传记往事ID
Favorlv int32 `protobuf:"varint,5,opt,name=favorlv,proto3" json:"favorlv"` // 好感度等级
Favorexp int32 `protobuf:"varint,6,opt,name=favorexp,proto3" json:"favorexp"` // 好感度经验
Stroyprize []int32 `protobuf:"varint,7,rep,packed,name=stroyprize,proto3" json:"stroyprize"` // 剧情奖励
Lvprize map[int32]int32 `protobuf:"bytes,8,rep,name=lvprize,proto3" json:"lvprize" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 等级奖励
Givecount int32 `protobuf:"varint,9,opt,name=givecount,proto3" json:"givecount"` // 赠送次数
Ctime int64 `protobuf:"varint,10,opt,name=ctime,proto3" json:"ctime"` // 送礼物时间
}
func (x *DBHeroFetter) Reset() {
@ -220,13 +222,27 @@ func (x *DBHeroFetter) GetStroyprize() []int32 {
return nil
}
func (x *DBHeroFetter) GetLvprize() []int32 {
func (x *DBHeroFetter) GetLvprize() map[int32]int32 {
if x != nil {
return x.Lvprize
}
return nil
}
func (x *DBHeroFetter) GetGivecount() int32 {
if x != nil {
return x.Givecount
}
return 0
}
func (x *DBHeroFetter) GetCtime() int64 {
if x != nil {
return x.Ctime
}
return 0
}
//羁绊剧情
type DBFetterstory struct {
state protoimpl.MessageState
@ -398,62 +414,72 @@ var File_library_library_db_proto protoreflect.FileDescriptor
var file_library_library_db_proto_rawDesc = []byte{
0x0a, 0x18, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72,
0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x02, 0x0a, 0x09, 0x44,
0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x02, 0x0a, 0x09, 0x44,
0x42, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 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, 0x10, 0x0a, 0x03, 0x66, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x66, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x04,
0x68, 0x65, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x2b, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x18,
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72,
0x79, 0x2e, 0x50, 0x72, 0x69, 0x7a, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x70, 0x72,
0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c, 0x76, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c, 0x76, 0x12,
0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74,
0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61,
0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x37, 0x0a, 0x09, 0x48, 0x65, 0x72,
0x6f, 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, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x7a, 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, 0xd2, 0x01, 0x0a,
0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 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,
0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f,
0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
0x79, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x6c, 0x76, 0x12, 0x1a, 0x0a, 0x08, 0x66,
0x61, 0x76, 0x6f, 0x72, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66,
0x61, 0x76, 0x6f, 0x72, 0x65, 0x78, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x6f, 0x79,
0x70, 0x72, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x72,
0x6f, 0x79, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x76, 0x70, 0x72, 0x69,
0x7a, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x76, 0x70, 0x72, 0x69, 0x7a,
0x65, 0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74,
0x6f, 0x72, 0x79, 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, 0x3e, 0x0a, 0x0a, 0x66, 0x65, 0x65, 0x74, 0x65, 0x72, 0x54,
0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x44, 0x42, 0x46, 0x65,
0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x46, 0x65, 0x65, 0x74, 0x65, 0x72,
0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x66, 0x65, 0x65, 0x74, 0x65,
0x72, 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x4b, 0x0a, 0x0f, 0x46, 0x65, 0x65, 0x74, 0x65, 0x72, 0x54,
0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x46, 0x65, 0x74, 0x74,
0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x22, 0x23, 0x0a, 0x0b, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b,
0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05,
0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x3c, 0x0a, 0x0a, 0x46, 0x65, 0x74, 0x74, 0x65,
0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x66, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a,
0x68, 0x65, 0x72, 0x6f, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2e, 0x48, 0x65, 0x72,
0x6f, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x68, 0x65,
0x72, 0x6f, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x7a,
0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72,
0x61, 0x72, 0x79, 0x2e, 0x50, 0x72, 0x69, 0x7a, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05,
0x70, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c,
0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c,
0x76, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3d, 0x0a, 0x0f, 0x48,
0x65, 0x72, 0x6f, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 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, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x72,
0x69, 0x7a, 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, 0xde, 0x02, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46,
0x65, 0x74, 0x74, 0x65, 0x72, 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, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05,
0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76,
0x6f, 0x72, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x61, 0x76, 0x6f,
0x72, 0x6c, 0x76, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x65, 0x78, 0x70, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x65, 0x78, 0x70, 0x12,
0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20,
0x03, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x12,
0x34, 0x0a, 0x07, 0x6c, 0x76, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x2e,
0x4c, 0x76, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6c, 0x76,
0x70, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x69, 0x76, 0x65, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x4c, 0x76, 0x70,
0x72, 0x69, 0x7a, 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, 0xbe, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x46, 0x65, 0x74, 0x74,
0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x79, 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, 0x3e, 0x0a, 0x0a, 0x66, 0x65, 0x65,
0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
0x44, 0x42, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x46, 0x65,
0x65, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x66,
0x65, 0x65, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x4b, 0x0a, 0x0f, 0x46, 0x65, 0x65,
0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x22,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, 0x0b, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72,
0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x3c, 0x0a, 0x0a, 0x46,
0x65, 0x74, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -468,27 +494,29 @@ func file_library_library_db_proto_rawDescGZIP() []byte {
return file_library_library_db_proto_rawDescData
}
var file_library_library_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_library_library_db_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_library_library_db_proto_goTypes = []interface{}{
(*DBLibrary)(nil), // 0: DBLibrary
(*DBHeroFetter)(nil), // 1: DBHeroFetter
(*DBFetterstory)(nil), // 2: DBFetterstory
(*FetterTasks)(nil), // 3: FetterTasks
(*FetterTask)(nil), // 4: FetterTask
nil, // 5: DBLibrary.HeroEntry
nil, // 5: DBLibrary.HerofetterEntry
nil, // 6: DBLibrary.PrizeEntry
nil, // 7: DBFetterstory.FeeterTaskEntry
nil, // 7: DBHeroFetter.LvprizeEntry
nil, // 8: DBFetterstory.FeeterTaskEntry
}
var file_library_library_db_proto_depIdxs = []int32{
5, // 0: DBLibrary.hero:type_name -> DBLibrary.HeroEntry
5, // 0: DBLibrary.herofetter:type_name -> DBLibrary.HerofetterEntry
6, // 1: DBLibrary.prize:type_name -> DBLibrary.PrizeEntry
7, // 2: DBFetterstory.feeterTask:type_name -> DBFetterstory.FeeterTaskEntry
3, // 3: DBFetterstory.FeeterTaskEntry.value:type_name -> FetterTasks
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
7, // 2: DBHeroFetter.lvprize:type_name -> DBHeroFetter.LvprizeEntry
8, // 3: DBFetterstory.feeterTask:type_name -> DBFetterstory.FeeterTaskEntry
3, // 4: DBFetterstory.FeeterTaskEntry.value:type_name -> FetterTasks
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_library_library_db_proto_init() }
@ -564,7 +592,7 @@ func file_library_library_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_library_library_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumMessages: 9,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -192,13 +192,13 @@ func (x *LibraryGetFetterListResp) GetData() []*DBHeroFetter {
return nil
}
// 领取奖励
// 领取羁绊等级奖励
type LibraryGetRewardReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ObjId string `protobuf:"bytes,1,opt,name=objId,proto3" json:"objId"`
ObjId string `protobuf:"bytes,1,opt,name=objId,proto3" json:"objId"` // DBLibrary 的ObjID
Fetterlv int32 `protobuf:"varint,2,opt,name=fetterlv,proto3" json:"fetterlv"` // 羁绊等级
}
@ -301,9 +301,9 @@ type LibraryGetStoryRewardReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hid string `protobuf:"bytes,1,opt,name=hid,proto3" json:"hid"` // 英雄ID
History int32 `protobuf:"varint,2,opt,name=history,proto3" json:"history"` // 传记往事id
Rightend int32 `protobuf:"varint,3,opt,name=rightend,proto3" json:"rightend"` // 对应配置表 rightend
Oid string `protobuf:"bytes,1,opt,name=oid,proto3" json:"oid"` // DBHeroFetter oid
History int32 `protobuf:"varint,2,opt,name=history,proto3" json:"history"` // 传记往事id
Story int32 `protobuf:"varint,3,opt,name=story,proto3" json:"story"` // 剧情id
}
func (x *LibraryGetStoryRewardReq) Reset() {
@ -338,9 +338,9 @@ func (*LibraryGetStoryRewardReq) Descriptor() ([]byte, []int) {
return file_library_library_msg_proto_rawDescGZIP(), []int{6}
}
func (x *LibraryGetStoryRewardReq) GetHid() string {
func (x *LibraryGetStoryRewardReq) GetOid() string {
if x != nil {
return x.Hid
return x.Oid
}
return ""
}
@ -352,9 +352,9 @@ func (x *LibraryGetStoryRewardReq) GetHistory() int32 {
return 0
}
func (x *LibraryGetStoryRewardReq) GetRightend() int32 {
func (x *LibraryGetStoryRewardReq) GetStory() int32 {
if x != nil {
return x.Rightend
return x.Story
}
return 0
}
@ -412,8 +412,9 @@ type LibraryUseGiftReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"` // 英雄id
Items map[string]int32 `protobuf:"bytes,2,rep,name=items,proto3" json:"items" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 道具ID value 数量
Heroid string `protobuf:"bytes,1,opt,name=heroid,proto3" json:"heroid"` // 英雄id
Items string `protobuf:"bytes,2,opt,name=items,proto3" json:"items"` // 道具ID
Counts int32 `protobuf:"varint,3,opt,name=counts,proto3" json:"counts"` //道具 数量
}
func (x *LibraryUseGiftReq) Reset() {
@ -455,11 +456,18 @@ func (x *LibraryUseGiftReq) GetHeroid() string {
return ""
}
func (x *LibraryUseGiftReq) GetItems() map[string]int32 {
func (x *LibraryUseGiftReq) GetItems() string {
if x != nil {
return x.Items
}
return nil
return ""
}
func (x *LibraryUseGiftReq) GetCounts() int32 {
if x != nil {
return x.Counts
}
return 0
}
type LibraryUseGiftResp struct {
@ -882,59 +890,55 @@ var file_library_library_msg_proto_rawDesc = []byte{
0x72, 0x6c, 0x76, 0x22, 0x36, 0x0a, 0x14, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x47, 0x65,
0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64,
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x4c, 0x69,
0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x62, 0x0a, 0x18, 0x4c,
0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5c, 0x0a, 0x18, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65,
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69, 0x73,
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69, 0x73,
0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x69, 0x67, 0x68, 0x74, 0x65, 0x6e, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x69, 0x67, 0x68, 0x74, 0x65, 0x6e, 0x64, 0x22,
0x3e, 0x0a, 0x19, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f,
0x72, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04,
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48,
0x65, 0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
0x9a, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x73, 0x65, 0x47, 0x69,
0x66, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12, 0x33, 0x0a,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x73, 0x65, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 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, 0x37, 0x0a, 0x12,
0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x73, 0x65, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x1a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72,
0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x1b, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x74, 0x74, 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, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x22, 0x5a, 0x0a, 0x11, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x43,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72,
0x61, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x65, 0x74,
0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65,
0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72,
0x22, 0x36, 0x0a, 0x12, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x77,
0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x38, 0x0a, 0x13, 0x4c, 0x69, 0x62, 0x72,
0x61, 0x72, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61,
0x74, 0x61, 0x22, 0x37, 0x0a, 0x19, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x46, 0x65, 0x74,
0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12,
0x1a, 0x0a, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x1a, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72,
0x79, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73,
0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72,
0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x3e, 0x0a, 0x19, 0x4c, 0x69, 0x62,
0x72, 0x61, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x77, 0x61,
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x74,
0x74, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x11, 0x4c, 0x69, 0x62,
0x72, 0x61, 0x72, 0x79, 0x55, 0x73, 0x65, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16,
0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x22, 0x37, 0x0a, 0x12, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55,
0x73, 0x65, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72,
0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a,
0x1a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22, 0x3d, 0x0a,
0x1b, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x46, 0x65, 0x74, 0x74, 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, 0x4c,
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5a, 0x0a, 0x11,
0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73,
0x68, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0a, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74,
0x61, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72,
0x52, 0x06, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x12, 0x4c, 0x69, 0x62, 0x72,
0x61, 0x72, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10,
0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64,
0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76,
0x22, 0x38, 0x0a, 0x13, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x77,
0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x65,
0x74, 0x74, 0x65, 0x72, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x37, 0x0a, 0x19, 0x4c, 0x69,
0x62, 0x72, 0x61, 0x72, 0x79, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x79,
0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65,
0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65,
0x72, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x1a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x46, 0x65,
0x74, 0x74, 0x65, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73,
0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0b, 0x2e, 0x46, 0x65, 0x74, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6c, 0x69,
0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -949,7 +953,7 @@ func file_library_library_msg_proto_rawDescGZIP() []byte {
return file_library_library_msg_proto_rawDescData
}
var file_library_library_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_library_library_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_library_library_msg_proto_goTypes = []interface{}{
(*LibraryGetListReq)(nil), // 0: LibraryGetListReq
(*LibraryGetListResp)(nil), // 1: LibraryGetListResp
@ -968,28 +972,26 @@ var file_library_library_msg_proto_goTypes = []interface{}{
(*LibraryLvRewardResp)(nil), // 14: LibraryLvRewardResp
(*LibraryFetterstoryTaskReq)(nil), // 15: LibraryFetterstoryTaskReq
(*LibraryFetterstoryTaskResp)(nil), // 16: LibraryFetterstoryTaskResp
nil, // 17: LibraryUseGiftReq.ItemsEntry
(*DBLibrary)(nil), // 18: DBLibrary
(*DBHeroFetter)(nil), // 19: DBHeroFetter
(*FetterTask)(nil), // 20: FetterTask
(*DBLibrary)(nil), // 17: DBLibrary
(*DBHeroFetter)(nil), // 18: DBHeroFetter
(*FetterTask)(nil), // 19: FetterTask
}
var file_library_library_msg_proto_depIdxs = []int32{
18, // 0: LibraryGetListResp.data:type_name -> DBLibrary
19, // 1: LibraryGetFetterListResp.data:type_name -> DBHeroFetter
18, // 2: LibraryGetRewardResp.data:type_name -> DBLibrary
19, // 3: LibraryGetStoryRewardResp.data:type_name -> DBHeroFetter
17, // 4: LibraryUseGiftReq.items:type_name -> LibraryUseGiftReq.ItemsEntry
19, // 5: LibraryUseGiftResp.data:type_name -> DBHeroFetter
18, // 6: LibraryActivationFetterResp.data:type_name -> DBLibrary
18, // 7: LibraryChangePush.data:type_name -> DBLibrary
19, // 8: LibraryChangePush.fetter:type_name -> DBHeroFetter
19, // 9: LibraryLvRewardResp.data:type_name -> DBHeroFetter
20, // 10: LibraryFetterstoryTaskResp.list:type_name -> FetterTask
11, // [11:11] is the sub-list for method output_type
11, // [11:11] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
17, // 0: LibraryGetListResp.data:type_name -> DBLibrary
18, // 1: LibraryGetFetterListResp.data:type_name -> DBHeroFetter
17, // 2: LibraryGetRewardResp.data:type_name -> DBLibrary
18, // 3: LibraryGetStoryRewardResp.data:type_name -> DBHeroFetter
18, // 4: LibraryUseGiftResp.data:type_name -> DBHeroFetter
17, // 5: LibraryActivationFetterResp.data:type_name -> DBLibrary
17, // 6: LibraryChangePush.data:type_name -> DBLibrary
18, // 7: LibraryChangePush.fetter:type_name -> DBHeroFetter
18, // 8: LibraryLvRewardResp.data:type_name -> DBHeroFetter
19, // 9: LibraryFetterstoryTaskResp.list:type_name -> FetterTask
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_library_library_msg_proto_init() }
@ -1210,7 +1212,7 @@ func file_library_library_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_library_library_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 18,
NumMessages: 17,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -9,8 +9,8 @@
package cfg
type GameEquipAttrlibrary struct {
_dataMap map[int32]*GameEquipAttrlibraryData
_dataList []*GameEquipAttrlibraryData
_dataMap map[int32]*GameEquipAttrlibraryData
_dataList []*GameEquipAttrlibraryData
}
func NewGameEquipAttrlibrary(_buf []map[string]interface{}) (*GameEquipAttrlibrary, error) {
@ -24,19 +24,17 @@ func NewGameEquipAttrlibrary(_buf []map[string]interface{}) (*GameEquipAttrlibra
dataMap[_v.Key] = _v
}
}
return &GameEquipAttrlibrary{_dataList:_dataList, _dataMap:dataMap}, nil
return &GameEquipAttrlibrary{_dataList: _dataList, _dataMap: dataMap}, nil
}
func (table *GameEquipAttrlibrary) GetDataMap() map[int32]*GameEquipAttrlibraryData {
return table._dataMap
return table._dataMap
}
func (table *GameEquipAttrlibrary) GetDataList() []*GameEquipAttrlibraryData {
return table._dataList
return table._dataList
}
func (table *GameEquipAttrlibrary) Get(key int32) *GameEquipAttrlibraryData {
return table._dataMap[key]
return table._dataMap[key]
}