diff --git a/comm/const.go b/comm/const.go new file mode 100644 index 000000000..e3c82d468 --- /dev/null +++ b/comm/const.go @@ -0,0 +1,70 @@ +package comm + +import "go_dreamfactory/lego/core" + +type LogHandleType string + +const ( + LogHandleType_Insert LogHandleType = "insert" + LogHandleType_Update LogHandleType = "update" + LogHandleType_Delete LogHandleType = "delete" +) + +const ( + SC_ServiceGateRouteComp core.S_Comps = "SC_GateRouteComp" //s_comps.ISC_GateRouteComp +) + +const ( + Service_Gateway = "gateway" + Service_Worker = "worker" + Service_DB = "dbservice" +) + +//ERR +const ( + MainType_Notify = "notify" //通知 + SubType_ErrorNotify = "errornotify" //错误通知 +) + +//模块名定义处 +const ( + SM_GateModule core.M_Modules = "gateway" //gate模块 网关服务模块 + SM_WebModule core.M_Modules = "web" //web模块 + SM_UserModule core.M_Modules = "user" //用户模块 + SM_PackModule core.M_Modules = "pack" //背包模块 + SM_MailModule core.M_Modules = "mail" //邮件模块 + SM_FriendModule core.M_Modules = "friend" //好友模块 + SM_LogModelModule core.M_Modules = "model" //日志模块 + SM_EquipmentModule core.M_Modules = "equipment" //装备模块 + SM_HeroModule core.M_Modules = "hero" //英雄模块 + SM_ForumModule core.M_Modules = "forum" //论坛模块 +) + +//RPC服务接口定义处 +const ( //Rpc + Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由 + Rpc_GatewayAgentBind core.Rpc_Key = "Rpc_GatewayAgentBind" //代理绑定 绑定用户Id + Rpc_GatewayAgentUnBind core.Rpc_Key = "Rpc_GatewayAgentUnBind" //代理解绑 解绑用户Id + Rpc_GatewayAgentSendMsg core.Rpc_Key = "Rpc_GatewayAgentSendMsg" //代理发送消息 向用户发送消息 + Rpc_GatewaySendBatchMsg core.Rpc_Key = "Rpc_GatewaySendBatchMsg" //向多个用户发送消息 + Rpc_GatewaySendRadioMsg core.Rpc_Key = "Rpc_GatewaySendRadioMsg" //广播消息 + Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接 + Rpc_NoticeUserClose core.Rpc_Key = "Rpc_NoticeUserClose" //通知用户离线 +) + +//事件类型定义处 +const ( + Event_UserLogin core.Event_Key = "Event_UserLogin" //登录事件 + Event_CreateUser core.Event_Key = "Event_CreateUser" //创建角色事件 + Event_UserOffline core.Event_Key = "Event_UserOffline" //用户离线事件 +) + +const ( + DBService_Status string = "DBService_status" +) + +const ( + PropertyHp = 1 //生命 + PropertyAtk = 2 //攻击 + PropertyDef = 3 //防御 +) diff --git a/comm/core.go b/comm/core.go index 9331de077..a4dc73814 100644 --- a/comm/core.go +++ b/comm/core.go @@ -12,59 +12,6 @@ import ( "google.golang.org/protobuf/types/known/anypb" ) -const ( - SC_ServiceGateRouteComp core.S_Comps = "SC_GateRouteComp" //s_comps.ISC_GateRouteComp -) - -const ( - Service_Gateway = "gateway" - Service_Worker = "worker" - Service_DB = "dbservice" -) - -//ERR -const ( - MainType_Notify = "notify" //通知 - SubType_ErrorNotify = "errornotify" //错误通知 -) - -//模块名定义处 -const ( - SM_GateModule core.M_Modules = "gateway" //gate模块 网关服务模块 - SM_WebModule core.M_Modules = "web" //web模块 - SM_UserModule core.M_Modules = "user" //用户模块 - SM_ItemsModule core.M_Modules = "items" //道具模块 - SM_MailModule core.M_Modules = "mail" //邮件模块 - SM_FriendModule core.M_Modules = "friend" //好友模块 - SM_LogModelModule core.M_Modules = "model" //日志模块 - SM_EquipmentModule core.M_Modules = "equipment" //装备模块 - SM_HeroModule core.M_Modules = "hero" //英雄模块 - SM_ForumModule core.M_Modules = "forum" //论坛模块 -) - -//RPC服务接口定义处 -const ( //Rpc - Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由 - Rpc_GatewayAgentBind core.Rpc_Key = "Rpc_GatewayAgentBind" //代理绑定 绑定用户Id - Rpc_GatewayAgentUnBind core.Rpc_Key = "Rpc_GatewayAgentUnBind" //代理解绑 解绑用户Id - Rpc_GatewayAgentSendMsg core.Rpc_Key = "Rpc_GatewayAgentSendMsg" //代理发送消息 向用户发送消息 - Rpc_GatewaySendBatchMsg core.Rpc_Key = "Rpc_GatewaySendBatchMsg" //向多个用户发送消息 - Rpc_GatewaySendRadioMsg core.Rpc_Key = "Rpc_GatewaySendRadioMsg" //广播消息 - Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接 - Rpc_NoticeUserClose core.Rpc_Key = "Rpc_NoticeUserClose" //通知用户离线 -) - -//事件类型定义处 -const ( - Event_UserLogin core.Event_Key = "Event_UserLogin" //登录事件 - Event_CreateUser core.Event_Key = "Event_CreateUser" //创建角色事件 - Event_UserOffline core.Event_Key = "Event_UserOffline" //用户离线事件 -) - -const ( - DBService_Status string = "DBService_status" -) - // 服务网关组件接口定义 type ISC_GateRouteComp interface { core.IServiceComp @@ -88,13 +35,7 @@ type Autogenerated struct { D []interface{} } -type LogHandleType string -const ( - LogHandleType_Insert LogHandleType = "insert" - LogHandleType_Update LogHandleType = "update" - LogHandleType_Delete LogHandleType = "delete" -) //Api Check 错误返回结构 type ErrorCode struct { diff --git a/comm/imodule.go b/comm/imodule.go index 443d76ce4..6241b7712 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -29,11 +29,17 @@ type ( QueryCardAmount(uId string, cardId int32) (amount uint32) //添加/减少卡片 AddCard(uId string, cardId int32, add int32) (code pb.ErrorCode) + //创建一个新英雄 + CreatMultiHero(uid string, heroCfgId ...int32) error + // 获取英雄 // heroId 英雄ID GetHero(uid, heroId string) (*pb.DB_HeroData, pb.ErrorCode) // 佩戴装备 UpdateEquipment(hero *pb.DB_HeroData, equip []*pb.DB_Equipment) (code pb.ErrorCode) + //获取玩家英雄列表 + GetHeroList(uid string) []*pb.DB_HeroData + } //玩家 @@ -42,9 +48,7 @@ type ( QueryAttributeValue(uid string, attr string) (value int32) //添加/减少属性值 AddAttributeValue(uid string, attr string, add int32) (code pb.ErrorCode) - //获取玩家英雄列表 - //uid 玩家ID - GetHeroList(uid string) []*pb.DB_HeroData + } //武器模块 IEquipment interface { diff --git a/go.mod b/go.mod index 12ef52565..163bbcc84 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module go_dreamfactory go 1.18 require ( + bright v0.0.0 github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 github.com/go-playground/validator/v10 v10.10.1 github.com/go-redis/redis/v8 v8.11.5 @@ -29,7 +30,6 @@ require ( golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3 google.golang.org/protobuf v1.28.0 gopkg.in/yaml.v2 v2.4.0 - bright v0.0.0 ) require ( @@ -43,6 +43,7 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cheekybits/genny v1.0.0 // indirect + github.com/dengsgo/math-engine v0.0.0-20220213125415-0351c3c75eca // indirect github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/edwingeng/doublejump v0.0.0-20210724020454-c82f1bcb3280 // indirect diff --git a/go.sum b/go.sum index 992ed8e23..ed2f49db8 100644 --- a/go.sum +++ b/go.sum @@ -110,6 +110,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dengsgo/math-engine v0.0.0-20220213125415-0351c3c75eca h1:5R7Xum+9XDxbGDYpBfeedfzbb11wG++geFn7EvMbhuA= +github.com/dengsgo/math-engine v0.0.0-20220213125415-0351c3c75eca/go.mod h1:zkR27k4K0I8FS6rkEd8qBhPeS8i3X2FKfvSPdF64OpQ= github.com/dgryski/go-jump v0.0.0-20170409065014-e1f439676b57/go.mod h1:4hKCXuwrJoYvHZxJ86+bRVTOMyJ0Ej+RqfSm8mHi6KA= github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0 h1:0wH6nO9QEa02Qx8sIQGw6ieKdz+BXjpccSOo9vXNl4U= github.com/dgryski/go-jump v0.0.0-20211018200510-ba001c3ffce0/go.mod h1:4hKCXuwrJoYvHZxJ86+bRVTOMyJ0Ej+RqfSm8mHi6KA= diff --git a/modules/configure_comp.go b/modules/configure_comp.go index 941c2ad9c..6986c981f 100644 --- a/modules/configure_comp.go +++ b/modules/configure_comp.go @@ -22,11 +22,22 @@ func (this *MComp_Configure) Init(service core.IService, module core.IModule, co return } -//加载配置文件 +//加载一个配置文件 func (this *MComp_Configure) LoadConfigure(name string, fn interface{}) (err error) { return configure.RegisterConfigure(name, fn) } +//加载多个配置文件 +func (this *MComp_Configure) LoadMultiConfigure(confs map[string]interface{}) (err error) { + for k, v := range confs { + err = configure.RegisterConfigure(k, v) + if err != nil { + break + } + } + return +} + //读取配置数据 func (this *MComp_Configure) GetConfigure(name string) (v interface{}, err error) { return configure.GetConfigure(name) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 78de1f481..b02cca51b 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -33,7 +33,7 @@ func (this *Api_Comp) Equip_Check(session comm.IUserSession, req *pb.Equipment_E } } - if hero, errorCode = this.module.hero.GetHero(req.HeroCardId); errorCode != pb.ErrorCode_Success { + if hero, errorCode = this.module.hero.GetHero(session.GetUserId(), req.HeroCardId); errorCode != pb.ErrorCode_Success { code.Code = errorCode return } diff --git a/modules/hero/api.go b/modules/hero/api.go index da37ba010..b8759bf0c 100644 --- a/modules/hero/api.go +++ b/modules/hero/api.go @@ -12,7 +12,9 @@ type Api_Comp struct { } const ( //消息回复的头名称 - StrengthenUplv = "strengthenherolv" + StrengthenUplv = "strengthenherolv" + Hero_SubType_Info = "info" //英雄卡片信息 + Hero_SubType_List = "list" //英雄列表 ) //组件初始化接口 diff --git a/modules/hero/api_info.go b/modules/hero/api_info.go new file mode 100644 index 000000000..67075eddf --- /dev/null +++ b/modules/hero/api_info.go @@ -0,0 +1,33 @@ +package hero + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//参数校验 +func (this *Api_Comp) Info_Check(session comm.IUserSession, req *pb.Hero_Info_Req) (result map[string]interface{}, code comm.ErrorCode) { + result = map[string]interface{}{} + hero := this.module.model_hero.getOneHero(session.GetUserId(), req.HeroId) + if hero == nil { + code = comm.ErrorCode{Code: pb.ErrorCode_HeroNoExist} + } + result["hero"] = hero + return +} + +func (this *Api_Comp) Info(session comm.IUserSession, result map[string]interface{}, req *pb.Hero_Info_Req) (code pb.ErrorCode) { + rsp := &pb.Hero_Info_Rsp{} + defer func() { + err := session.SendMsg(string(this.module.GetType()), Hero_SubType_Info, rsp) + if err != nil { + code = pb.ErrorCode_SystemError + return + } + }() + + if v, ok := result["hero"]; ok { + rsp.Base = v.(*pb.DB_HeroData) + } + return +} diff --git a/modules/hero/api_list.go b/modules/hero/api_list.go new file mode 100644 index 000000000..5a5fd5b98 --- /dev/null +++ b/modules/hero/api_list.go @@ -0,0 +1,32 @@ +package hero + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +//参数校验 +func (this *Api_Comp) List_Check(session comm.IUserSession, req *pb.Hero_List_Req) (result map[string]interface{}, code comm.ErrorCode) { + return +} + +func (this *Api_Comp) List(session comm.IUserSession, result map[string]interface{}, req *pb.Hero_List_Req) (code pb.ErrorCode) { + rsp := &pb.Hero_List_Rsp{} + + defer func() { + err := session.SendMsg(this.module.api_comp.service.GetType(), Hero_SubType_List, rsp) + if err != nil { + code = pb.ErrorCode_SystemError + } + }() + + list, err := this.module.model_hero.getHeroList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + rsp.List = list + + return +} diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index d07045589..2546fcac4 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -9,12 +9,12 @@ import ( ) const ( - game_hero = "game_newhero.json" - game_heroStargrow = "game_heroStargrow.json" - game_heroLevelgrow = "game_heroLevelgrow.json" - game_heroStarup = "game_heroStarup.json" - game_heroLevelup = "game_heroLevelup.json" - game_heroExp = "game_exp.json" + new_hero = "game_newhero.json" //英雄 + hero_stargrow = "game_herostargrow.json" //英雄品质系数 + hero_levelgrow = "game_herolevelgrow.json" //英雄成长系数 + hero_starup = "game_herostarup.json" // + hero_levelup = "game_herolevelup.json" //英雄等级基础属性 + hero_exp = "game_exp.json" ) ///配置管理组件 @@ -24,28 +24,33 @@ type Configure_Comp struct { //组件初始化接口 func (this *Configure_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - err = this.ModuleCompBase.Init(service, module, comp, options) - err = this.LoadConfigure(game_hero, cfg.NewGame_newHero) - err = this.LoadConfigure(game_heroStargrow, cfg.NewGame_heroStargrow) - err = this.LoadConfigure(game_heroLevelgrow, cfg.NewGame_heroLevelgrow) - err = this.LoadConfigure(game_heroStarup, cfg.NewGame_heroStarup) - err = this.LoadConfigure(game_heroLevelup, cfg.NewGame_heroLevelup) - err = this.LoadConfigure(game_heroExp, cfg.NewGame_heroExp) + + err = this.MComp_Configure.Init(service, module, comp, options) + err = this.LoadMultiConfigure(map[string]interface{}{ + new_hero: cfg.NewGame_newHero, + hero_stargrow: cfg.NewGame_heroStargrow, + hero_levelgrow: cfg.NewGame_heroLevelgrow, + hero_starup: cfg.NewGame_heroStarup, + hero_levelup: cfg.NewGame_heroLevelup, + hero_exp: cfg.NewGame_heroExp, + }) + return } //获取英雄配置数据 -func (this *Configure_Comp) GetHeroConfigure() (configure *cfg.Game_newHero, err error) { +func (this *Configure_Comp) getHeroConfigure() (configure *cfg.Game_newHero, err error) { var ( v interface{} ok bool ) - if v, err = this.GetConfigure(game_hero); err == nil { + + if v, err = this.GetConfigure(new_hero); err != nil { + return + } else { if configure, ok = v.(*cfg.Game_newHero); !ok { err = fmt.Errorf("%T no is *cfg.Game_hero", v) } - } else { - err = fmt.Errorf("%T no is *cfg.Game_hero", v) } return } @@ -56,7 +61,7 @@ func (this *Configure_Comp) GetHeroStargrowCon() (configure *cfg.Game_heroStargr v interface{} ok bool ) - if v, err = this.GetConfigure(game_heroStargrow); err == nil { + if v, err = this.GetConfigure(hero_stargrow); err == nil { if configure, ok = v.(*cfg.Game_heroStargrow); !ok { err = fmt.Errorf("%T no is *cfg.Game_hero", v) return @@ -74,7 +79,7 @@ func (this *Configure_Comp) GetHeroLevelgrowCon() (configure *cfg.Game_heroLevel v interface{} ok bool ) - if v, err = this.GetConfigure(game_heroLevelgrow); err == nil { + if v, err = this.GetConfigure(hero_levelgrow); err == nil { if configure, ok = v.(*cfg.Game_heroLevelgrow); !ok { err = fmt.Errorf("%T no is *cfg.Game_heroLevelgrow", v) return @@ -90,7 +95,7 @@ func (this *Configure_Comp) GetHeroStarupCon() (configure *cfg.Game_heroStarup, v interface{} ok bool ) - if v, err = this.GetConfigure(game_heroStarup); err == nil { + if v, err = this.GetConfigure(hero_starup); err == nil { if configure, ok = v.(*cfg.Game_heroStarup); !ok { err = fmt.Errorf("%T no is *cfg.Game_heroStarup", v) return @@ -107,7 +112,7 @@ func (this *Configure_Comp) GetHeroLevelUpCon() (configure *cfg.Game_heroLevelup v interface{} ok bool ) - if v, err = this.GetConfigure(game_heroLevelup); err == nil { + if v, err = this.GetConfigure(hero_levelup); err == nil { if configure, ok = v.(*cfg.Game_heroLevelup); !ok { err = fmt.Errorf("%T no is *cfg.Game_heroLevelup", v) return @@ -123,7 +128,7 @@ func (this *Configure_Comp) GetHeroExpCon() (configure *cfg.Game_heroExp, err er v interface{} ok bool ) - if v, err = this.GetConfigure(game_heroExp); err == nil { + if v, err = this.GetConfigure(hero_exp); err == nil { if configure, ok = v.(*cfg.Game_heroExp); !ok { err = fmt.Errorf("%T no is *cfg.Game_heroExp", v) return @@ -133,3 +138,103 @@ func (this *Configure_Comp) GetHeroExpCon() (configure *cfg.Game_heroExp, err er } return } + +//英雄等级基础属性 +func (this *Configure_Comp) GetHeroLevelup() (configure *cfg.Game_heroLevelup, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(hero_levelup); err != nil { + return + } else { + if configure, ok = v.(*cfg.Game_heroLevelup); !ok { + err = fmt.Errorf("%T no is *cfg.Game_heroLevelup", v) + return + } + } + return +} + +//英雄品质系数 +func (this *Configure_Comp) GetHeroStargrow() (configure *cfg.Game_heroStargrow, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(hero_stargrow); err != nil { + return + } else { + if configure, ok = v.(*cfg.Game_heroStargrow); !ok { + err = fmt.Errorf("%T no is *cfg.Game_heroStargrow", v) + return + } + } + return +} + +//获取英雄配置 +func (this *Configure_Comp) GetHero(heroId int32) *cfg.Game_newHeroData { + cfg, err := this.getHeroConfigure() + if err != nil { + return nil + } + if v, ok := cfg.GetDataMap()[heroId]; ok { + return v + } + return nil +} + +//获取英雄星级配置 +func (this *Configure_Comp) GetHeroStar(star int32) *cfg.Game_heroStargrowData { + cfg, err := this.GetHeroStargrow() + if err != nil { + return nil + } + + if v, ok := cfg.GetDataMap()[star]; ok { + return v + } + return nil +} + +//获取英雄等级配置 +func (this *Configure_Comp) GetHeroLv(lv int32) *cfg.Game_heroLevelupData { + cfg, err := this.GetHeroLevelup() + if err != nil { + return nil + } + if v, ok := cfg.GetDataMap()[lv]; ok { + return v + } + return nil +} + +// 英雄成长系数 +func (this *Configure_Comp) GetHeroLevelgrow() (configure *cfg.Game_heroLevelgrow, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(hero_levelgrow); err != nil { + return + } else { + if configure, ok = v.(*cfg.Game_heroLevelgrow); !ok { + err = fmt.Errorf("%T no is *cfg.Game_heroLevelgrow", v) + return + } + } + return +} + +//英雄成长配置 +func (this *Configure_Comp) GetHeroLvgrow(heroId int32) *cfg.Game_heroLevelgrowData { + cfg, err := this.GetHeroLevelgrow() + if err != nil { + return nil + } + if v, ok := cfg.GetDataMap()[heroId]; ok { + return v + } + return nil +} diff --git a/modules/hero/hero_test.go b/modules/hero/hero_test.go index 444094edd..561130787 100644 --- a/modules/hero/hero_test.go +++ b/modules/hero/hero_test.go @@ -75,5 +75,16 @@ func TestCreateOneHero(t *testing.T) { //获取玩家英雄 func TestGetOneHero(t *testing.T) { - + d := module.model_hero.getOneHero("u1", "62b534bebf4745d4117acabe") + fmt.Printf("%v", d) +} + +func TestPropertyCompute(t *testing.T) { + m := module.model_hero.PropertyCompute("u1", "62b534bebf4745d4117acabe") + fmt.Println(m) +} + +func TestHeroList(t *testing.T) { + heroes, err := module.model_hero.getHeroList("u1") + fmt.Printf("%v %v", heroes, err) } diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index c2246ae64..2e9ae8819 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -1,11 +1,15 @@ package hero import ( + "fmt" + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" + "math" + mengine "github.com/dengsgo/math-engine/engine" "go.mongodb.org/mongo-driver/bson/primitive" ) @@ -21,41 +25,87 @@ func (this *ModelHero) Init(service core.IService, module core.IModule, comp cor return } +//初始化英雄 +func (this *ModelHero) initHero(uid string, heroCfgId int32) *pb.DB_HeroData { + heroCfg := this.moduleHero.configure_comp.GetHero(heroCfgId) + if heroCfg == nil { + log.Errorf("%v hero not found from config %v", heroCfgId) + return nil + } + objId := primitive.NewObjectID().Hex() + newHero := &pb.DB_HeroData{ + Id: objId, + Uid: uid, + HeroID: heroCfg.Hid, + Star: heroCfg.Star, + Lv: 1, //初始等级 + NormalSkill: []*pb.SkillData{}, + Skins: []int32{}, + EquipID: make([]string, 6), + AddProperty: make(map[int32]int32), + Energy: make(map[int32]int32), + Property: make(map[int32]int32), + } + return newHero +} + //创建一个指定的英雄 func (this *ModelHero) createOneHero(uid string, heroCfgId int32) error { - heroCfg, err := this.moduleHero.configure_comp.GetHeroConfigure() - if err != nil { - log.Errorf("%v", err) - return err - } - if heroCfg != nil { - oneHeroCfg := heroCfg.Get(heroCfgId) - if oneHeroCfg != nil { - objId := primitive.NewObjectID().Hex() - newHero := &pb.DB_HeroData{ - Id: objId, - Uid: uid, - HeroID: oneHeroCfg.Id, - Star: oneHeroCfg.Star, - Lv: 1, //初始等级 - NormalSkill: []*pb.SkillData{}, - Skins: []int32{}, - EquipID: make([]string, 6), - AddProperty: make(map[int32]int32), - Energy: make(map[int32]int32), - Property: make(map[int32]int32), - } - - return this.moduleHero.model_hero.AddList(uid, objId, newHero) - } - + hero := this.initHero(uid, heroCfgId) + if hero != nil { + return this.moduleHero.model_hero.AddList(uid, hero.Id, hero) } return nil } +//创建多个指定的英雄 +func (this *ModelHero) createMultiHero(uid string, heroCfgId ...int32) error { + data := make(map[string]interface{}) + for _, v := range heroCfgId { + hero := this.initHero(uid, v) + if hero != nil { + data[hero.Id] = hero + } + } + return this.moduleHero.model_hero.AddLists(uid, data) +} + //获取一个英雄 -func (this *ModelHero) getOneHero(heroId string) (*pb.DB_HeroData, pb.ErrorCode) { - return nil, pb.ErrorCode_HeroNoExist +func (this *ModelHero) getOneHero(uid, heroId string) *pb.DB_HeroData { + hero := &pb.DB_HeroData{} + err := this.moduleHero.model_hero.GetListObj(uid, heroId, hero) + if err != nil { + return nil + } + return hero +} + +//获取玩家的英雄列表 +func (this *ModelHero) getHeroList(uid string) ([]*pb.DB_HeroData, error) { + herokeys := make(map[string]string) + err := this.Get(uid, herokeys) + if err != nil { + return nil, err + } + + heroes := make([]*pb.DB_HeroData, 0) + err = this.GetList(uid, &heroes) + if err != nil { + return nil, err + } + + return heroes, nil +} + +//更新装备 +func (this *ModelHero) setEquipment(uid, heroId string, equipIds []string) pb.ErrorCode { + hero := this.getOneHero(uid, heroId) + if hero == nil { + return pb.ErrorCode_HeroNoExist + } + + hero.EquipID = equipIds + return pb.ErrorCode_Success } //指定英雄升级 @@ -73,3 +123,57 @@ func (this *ModelHero) levelUp(uid string, heroId int32) error { func (this *ModelHero) starUp() { } + +//属性计算 - 暂时放在modelHero里实现 +//英雄基础属性 + 英雄等级基础属性 * 英雄成长系数 + 英雄星级对应等级属性 * 英雄品质系数 +func (this *ModelHero) PropertyCompute(uid, heroId string) map[int32]int32 { + hero := this.getOneHero(uid, heroId) + if hero == nil { + return nil + } + + //英雄等级基础属性levelup + heroLvCfg := this.moduleHero.configure_comp.GetHeroLv(hero.Lv) + if heroLvCfg == nil { + return nil + } + + //英雄基础配置 newhero + heroCfg := this.moduleHero.configure_comp.GetHero(hero.HeroID) + if heroCfg == nil { + return nil + } + + //品质系数 + stargrowCfg := this.moduleHero.configure_comp.GetHeroStar(heroCfg.Star) + if stargrowCfg == nil { + return nil + } + + //英雄星级对应等级属性 + heroStarCfg := this.moduleHero.configure_comp.GetHeroLv(stargrowCfg.Level) + if heroStarCfg == nil { + return nil + } + + //成长系数 + lvGrow := this.moduleHero.configure_comp.GetHeroLvgrow(hero.HeroID) + if lvGrow == nil { + return nil + } + + exprHp := fmt.Sprintf("%v + %v * %v/1000 + %v * %v", lvGrow.Hp, heroLvCfg.Hp, lvGrow.Hpgrow, heroStarCfg.Hp, stargrowCfg.StarupHp) + hp, _ := mengine.ParseAndExec(exprHp) + + exprAtk := fmt.Sprintf("%v +%v * %v/1000 + %v * %v", lvGrow.Atk, heroLvCfg.Atk, lvGrow.Atkgrow, heroStarCfg.Atk, stargrowCfg.StarupAtk) + atk, _ := mengine.ParseAndExec(exprAtk) + + exprDef := fmt.Sprintf("%v +%v * %v/1000 + %v * %v", lvGrow.Def, heroLvCfg.Def, lvGrow.Defgrow, heroStarCfg.Def, stargrowCfg.StarupDef) + def, _ := mengine.ParseAndExec(exprDef) + + return map[int32]int32{ + comm.PropertyHp: int32(math.Floor(hp)), + comm.PropertyAtk: int32(math.Floor(atk)), + comm.PropertyDef: int32(math.Floor(def)), + } +} diff --git a/modules/hero/module.go b/modules/hero/module.go index 02d3fbcca..a4a6a8472 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -38,24 +38,33 @@ func (this *Hero) OnInstallComp() { this.configure_comp = this.RegisterComp(new(Configure_Comp)).(*Configure_Comp) } -//通过唯一对象获取英雄信息 -func (this *Hero) GetHeroInfoByObjID(id string) (*pb.DB_HeroData, pb.ErrorCode) { - return nil, pb.ErrorCode_HeroNoExist +//创建指定的英雄 +func (this *Hero) CreatMultiHero(uid string, heroCfgId ...int32) error { + return this.model_hero.createMultiHero(uid, heroCfgId...) } //获取英雄 -func (this *Hero) GetHero(uid, heroId int32) (*pb.DB_HeroData, pb.ErrorCode) { - - return nil, pb.ErrorCode_HeroNoExist +func (this *Hero) GetHero(uid, heroId string) (*pb.DB_HeroData, pb.ErrorCode) { + hero := this.model_hero.getOneHero(uid, heroId) + if hero == nil { + return nil, pb.ErrorCode_HeroNoExist + } + return hero, pb.ErrorCode_Success } -//佩戴装备 -func (this *Hero) InstallEquip(heroId, equipId string) pb.ErrorCode { +//更新装备 +func (this *Hero) UpdateEquipment(hero *pb.DB_HeroData, equip []*pb.DB_Equipment) pb.ErrorCode { + equipIds := make([]string, 4) + for _, v := range equip { + equipIds = append(equipIds, v.Id) + } + this.model_hero.setEquipment(hero.Uid, hero.Id, equipIds) + return pb.ErrorCode_Success } -// 卸载装备 -func (this *Hero) UninstallEquip(heroId, equipId string) pb.ErrorCode { - return pb.ErrorCode_Success +//获取玩家的英雄列表 +func (this *Hero) GetHeroList(uid string) ([]*pb.DB_HeroData, error) { + return this.model_hero.getHeroList(uid) } diff --git a/modules/user/api.go b/modules/user/api.go index 7c72ed4e2..d188874cc 100644 --- a/modules/user/api.go +++ b/modules/user/api.go @@ -1,6 +1,7 @@ package user import ( + "go_dreamfactory/comm" "go_dreamfactory/modules" "go_dreamfactory/lego/base" @@ -17,6 +18,7 @@ type Api_Comp struct { modules.MComp_GateComp service base.IRPCXService module *User + hero comm.IHero } func (this *Api_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { @@ -28,5 +30,12 @@ func (this *Api_Comp) Init(service core.IService, module core.IModule, comp core func (this *Api_Comp) Start() (err error) { err = this.MComp_GateComp.Start() + var module core.IModule + + //get module hero + if module, err = this.service.GetModule(comm.SM_HeroModule); err != nil { + return + } + this.hero = module.(comm.IHero) return } diff --git a/modules/user/api_create.go b/modules/user/api_create.go index 37d012d10..0d3c08d3f 100644 --- a/modules/user/api_create.go +++ b/modules/user/api_create.go @@ -2,12 +2,19 @@ package user import ( "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/event" "go_dreamfactory/pb" "go_dreamfactory/utils" ) func (this *Api_Comp) Create_Check(session comm.IUserSession, req *pb.UserCreateReq) (result map[string]interface{}, code comm.ErrorCode) { + result = make(map[string]interface{}) + self := &pb.DB_UserData{} + err := this.module.modelUser.Get(session.GetUserId(), self) + if err != nil { + code = comm.ErrorCode{Code: pb.ErrorCode_DBError} + return + } + result["self"] = self return } @@ -15,28 +22,25 @@ func (this *Api_Comp) Create_Check(session comm.IUserSession, req *pb.UserCreate func (this *Api_Comp) Create(session comm.IUserSession, result map[string]interface{}, req *pb.UserCreateReq) (code pb.ErrorCode) { defer utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), User_SubType_Create, req, nil) - self := &pb.DB_UserData{} - defer func() { - session.SendMsg(string(this.module.GetType()), User_SubType_Create, &pb.UserCreateRsp{}) + err := session.SendMsg(string(this.module.GetType()), User_SubType_Create, &pb.UserCreateRsp{}) + if err != nil { + code = pb.ErrorCode_SystemError + } }() - //更新昵称 - // update := map[string]interface{}{ - // "name": req.NickName, - // } - err := this.module.modelUser.Get(session.GetUserId(), self) - if err != nil { - code = pb.ErrorCode_DBError - return + update := map[string]interface{}{ + "name": req.NickName, } - self.Name = req.NickName - err = this.module.modelUser.Get(session.GetUserId(), self) + + err := this.module.modelUser.Change(session.GetUserId(), update) if err != nil { code = pb.ErrorCode_DBError return } - event.RegisterGO(comm.Event_CreateUser, session.GetUserId()) + //初始化英雄 + // this.hero. + return } diff --git a/modules/user/model_user.go b/modules/user/model_user.go index 7d1e8364b..3ed7a3f0b 100644 --- a/modules/user/model_user.go +++ b/modules/user/model_user.go @@ -10,7 +10,6 @@ import ( uuid "github.com/satori/go.uuid" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/mongo/options" ) const ( //Redis @@ -38,16 +37,6 @@ func (this *ModelUser) User_FindByAccount(sid int32, account string) (*pb.DB_Use return nd, err } -func (this *ModelUser) User_FindById(id string) (*pb.DB_UserData, error) { - filter := bson.M{ - "userid": id, - } - sr := this.DB.FindOne(DB_UserTable, filter) - user := &pb.DB_UserData{} - err := sr.Decode(user) - return user, err -} - func (this *ModelUser) User_Create(user *pb.DB_UserData) (err error) { _id := primitive.NewObjectID().Hex() user.Id = _id @@ -57,16 +46,3 @@ func (this *ModelUser) User_Create(user *pb.DB_UserData) (err error) { _, err = this.DB.InsertOne(DB_UserTable, user) return err } - -//更新用户数据到DB -func (this *ModelUser) User_Update(data *pb.DB_UserData) (err error) { - err = this.DB.FindOneAndUpdate( - DB_UserTable, - bson.M{"uid": data.Uid}, - bson.M{"$set": bson.M{ - "name": data.Name, - }}, - options.FindOneAndUpdate().SetUpsert(true), - ).Err() - return err -} diff --git a/modules/user/user_test.go b/modules/user/user_test.go new file mode 100644 index 000000000..965f37907 --- /dev/null +++ b/modules/user/user_test.go @@ -0,0 +1,68 @@ +package user + +import ( + "fmt" + "go_dreamfactory/comm" + "go_dreamfactory/lego" + "go_dreamfactory/lego/base/rpcx" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/services" + "go_dreamfactory/sys/cache" + "go_dreamfactory/sys/configure" + "go_dreamfactory/sys/db" + "os" + "testing" + "time" +) + +var service core.IService +var s_gateComp comm.ISC_GateRouteComp = services.NewGateRouteComp() + +var module = new(User) + +type TestService struct { + rpcx.RPCXService +} + +func newService(ops ...rpcx.Option) core.IService { + s := new(TestService) + s.Configure(ops...) + return s +} + +//初始化相关系统 +func (this *TestService) InitSys() { + this.RPCXService.InitSys() + if err := cache.OnInit(this.GetSettings().Sys["cache"]); err != nil { + panic(fmt.Sprintf("init sys.cache err: %s", err.Error())) + } else { + log.Infof("init sys.cache success!") + } + if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil { + panic(fmt.Sprintf("init sys.db err: %s", err.Error())) + } else { + log.Infof("init sys.db success!") + } + if err := configure.OnInit(this.GetSettings().Sys["configure"], configure.SetConfigPath("E:\\projects\\workspace\\go_dreamfactory\\bin\\json")); err != nil { + panic(fmt.Sprintf("init sys.configure err: %s", err.Error())) + } else { + log.Infof("init sys.configure success!") + } +} + +func TestMain(m *testing.M) { + service = newService( + rpcx.SetConfPath("../../bin/conf/worker_2.yaml"), + ) + service.OnInstallComp( //装备组件 + s_gateComp, //此服务需要接受用户的消息 需要装备网关组件 + ) + go func() { + lego.Run(service, //运行模块 + module, + ) + }() + time.Sleep(time.Second * 2) + defer os.Exit(m.Run()) +} diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 1e4921219..2176bbd0b 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -41,6 +41,7 @@ const ( ErrorCode_Unknown ErrorCode = 101 //未知错误 ErrorCode_ResNoEnough ErrorCode = 102 //资源不足 ErrorCode_ConfigurationException ErrorCode = 103 //配置异常 + ErrorCode_ConfigNoFound ErrorCode = 104 //配置未找到 // user ErrorCode_SecKeyInvalid ErrorCode = 1000 //秘钥无效 ErrorCode_SecKey ErrorCode = 1001 //秘钥格式错误 @@ -65,7 +66,7 @@ const ( ErrorCode_ItemsGirdAmountUpper ErrorCode = 1203 //背包格子容量已达上限 // hero ErrorCode_HeroNoExist ErrorCode = 1300 //英雄不存在 - //equipment + // equipment ErrorCode_EquipmentOnFoundEquipment ErrorCode = 1400 // 未找到武器 ErrorCode_EquipmentLvlimitReached ErrorCode = 1401 // 武器等级已达上限 ) @@ -91,6 +92,7 @@ var ( 101: "Unknown", 102: "ResNoEnough", 103: "ConfigurationException", + 104: "ConfigNoFound", 1000: "SecKeyInvalid", 1001: "SecKey", 1002: "BindUser", @@ -133,6 +135,7 @@ var ( "Unknown": 101, "ResNoEnough": 102, "ConfigurationException": 103, + "ConfigNoFound": 104, "SecKeyInvalid": 1000, "SecKey": 1001, "BindUser": 1002, @@ -189,7 +192,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0xdc, 0x06, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xef, 0x06, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, @@ -212,38 +215,40 @@ var file_errorcode_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x66, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x10, 0x67, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x10, 0xe8, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x4b, 0x65, - 0x79, 0x10, 0xe9, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x10, 0xea, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x74, - 0x53, 0x65, 0x6c, 0x66, 0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x10, 0xce, - 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4e, - 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xd0, - 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, 0x74, 0x10, 0xd1, - 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x59, 0x65, 0x74, 0x10, 0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x53, 0x65, 0x6c, 0x66, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd3, 0x08, 0x12, - 0x19, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, - 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd5, - 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, - 0x4d, 0x61, 0x78, 0x10, 0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, - 0xd7, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, - 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, - 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, - 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, - 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, - 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, - 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, - 0x94, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, - 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, - 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, - 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x10, 0x67, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x6f, 0x46, + 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x68, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x4b, 0x65, 0x79, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0xe8, 0x07, 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x65, + 0x63, 0x4b, 0x65, 0x79, 0x10, 0xe9, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x42, 0x69, 0x6e, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x10, 0xea, 0x07, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x10, 0xcc, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x4d, 0x61, 0x78, 0x10, 0xcd, 0x08, 0x12, 0x14, + 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x61, + 0x78, 0x10, 0xce, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, + 0x6c, 0x66, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xcf, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x44, 0x61, 0x74, + 0x61, 0x10, 0xd0, 0x08, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x59, 0x65, + 0x74, 0x10, 0xd1, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x59, 0x65, 0x74, 0x10, 0xd2, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, + 0xd3, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x59, 0x65, 0x74, 0x10, 0xd4, 0x08, 0x12, 0x15, 0x0a, + 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0xd5, 0x08, 0x12, 0x13, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, + 0x61, 0x63, 0x6b, 0x4d, 0x61, 0x78, 0x10, 0xd6, 0x08, 0x12, 0x1a, 0x0a, 0x15, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x10, 0xd7, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, + 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, + 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, + 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, + 0x10, 0xb3, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, + 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, + 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, + 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, + 0x10, 0xf9, 0x0a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/pb/hero_db.pb.go b/pb/hero_db.pb.go index c2611e1a0..72b05d480 100644 --- a/pb/hero_db.pb.go +++ b/pb/hero_db.pb.go @@ -286,49 +286,50 @@ 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, 0x22, 0x3f, 0x0a, 0x09, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0xd6, 0x06, 0x0a, 0x0b, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, - 0x6f, 0x44, 0x61, 0x74, 0x61, 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, 0x05, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, - 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x75, 0x65, 0x78, 0x69, 0x6e, 0x67, - 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x75, 0x65, 0x78, 0x69, 0x6e, - 0x67, 0x4c, 0x76, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x74, 0x61, - 0x69, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x2c, 0x0a, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, - 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x53, - 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, - 0x6f, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x3f, 0x0a, - 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, - 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1c, - 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x63, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x53, - 0x6b, 0x69, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, - 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, - 0x6e, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, - 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, - 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x30, - 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x3f, 0x0a, 0x09, 0x53, 0x6b, 0x69, 0x6c, + 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0xe2, 0x06, 0x0a, 0x0b, 0x44, 0x42, + 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 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, 0x05, 0x52, 0x06, 0x68, 0x65, 0x72, + 0x6f, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x75, 0x65, + 0x78, 0x69, 0x6e, 0x67, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x75, + 0x65, 0x78, 0x69, 0x6e, 0x67, 0x4c, 0x76, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x74, 0x61, + 0x69, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, + 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x2f, 0x0a, 0x0b, 0x6e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x39, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x64, + 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x72, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, 0x69, 0x6e, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x53, 0x6b, 0x69, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x71, + 0x75, 0x69, 0x70, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, + 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, + 0x6e, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x32, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x65, + 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, @@ -361,17 +362,17 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte { var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_hero_hero_db_proto_goTypes = []interface{}{ - (*SkillData)(nil), // 0: SkillData - (*DB_HeroData)(nil), // 1: DB_HeroData - nil, // 2: DB_HeroData.PropertyEntry - nil, // 3: DB_HeroData.AddPropertyEntry - nil, // 4: DB_HeroData.EnergyEntry + (*SkillData)(nil), // 0: pb.SkillData + (*DB_HeroData)(nil), // 1: pb.DB_HeroData + nil, // 2: pb.DB_HeroData.PropertyEntry + nil, // 3: pb.DB_HeroData.AddPropertyEntry + nil, // 4: pb.DB_HeroData.EnergyEntry } var file_hero_hero_db_proto_depIdxs = []int32{ - 0, // 0: DB_HeroData.normalSkill:type_name -> SkillData - 2, // 1: DB_HeroData.property:type_name -> DB_HeroData.PropertyEntry - 3, // 2: DB_HeroData.addProperty:type_name -> DB_HeroData.AddPropertyEntry - 4, // 3: DB_HeroData.energy:type_name -> DB_HeroData.EnergyEntry + 0, // 0: pb.DB_HeroData.normalSkill:type_name -> pb.SkillData + 2, // 1: pb.DB_HeroData.property:type_name -> pb.DB_HeroData.PropertyEntry + 3, // 2: pb.DB_HeroData.addProperty:type_name -> pb.DB_HeroData.AddPropertyEntry + 4, // 3: pb.DB_HeroData.energy:type_name -> pb.DB_HeroData.EnergyEntry 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 diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 2b690c9c4..adfba6795 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -20,6 +20,187 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +//英雄基础信息 +type Hero_Info_Req struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeroId string `protobuf:"bytes,1,opt,name=heroId,proto3" json:"heroId"` //英雄唯一ID +} + +func (x *Hero_Info_Req) Reset() { + *x = Hero_Info_Req{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hero_Info_Req) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hero_Info_Req) ProtoMessage() {} + +func (x *Hero_Info_Req) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hero_Info_Req.ProtoReflect.Descriptor instead. +func (*Hero_Info_Req) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{0} +} + +func (x *Hero_Info_Req) GetHeroId() string { + if x != nil { + return x.HeroId + } + return "" +} + +type Hero_Info_Rsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Base *DB_HeroData `protobuf:"bytes,1,opt,name=base,proto3" json:"base"` +} + +func (x *Hero_Info_Rsp) Reset() { + *x = Hero_Info_Rsp{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hero_Info_Rsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hero_Info_Rsp) ProtoMessage() {} + +func (x *Hero_Info_Rsp) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hero_Info_Rsp.ProtoReflect.Descriptor instead. +func (*Hero_Info_Rsp) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *Hero_Info_Rsp) GetBase() *DB_HeroData { + if x != nil { + return x.Base + } + return nil +} + +//英雄列表 +type Hero_List_Req struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Hero_List_Req) Reset() { + *x = Hero_List_Req{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hero_List_Req) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hero_List_Req) ProtoMessage() {} + +func (x *Hero_List_Req) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hero_List_Req.ProtoReflect.Descriptor instead. +func (*Hero_List_Req) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{2} +} + +type Hero_List_Rsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*DB_HeroData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (x *Hero_List_Rsp) Reset() { + *x = Hero_List_Rsp{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hero_List_Rsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hero_List_Rsp) ProtoMessage() {} + +func (x *Hero_List_Rsp) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hero_List_Rsp.ProtoReflect.Descriptor instead. +func (*Hero_List_Rsp) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *Hero_List_Rsp) GetList() []*DB_HeroData { + if x != nil { + return x.List + } + return nil +} + type ItemData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -32,7 +213,7 @@ type ItemData struct { func (x *ItemData) Reset() { *x = ItemData{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[0] + mi := &file_hero_hero_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -45,7 +226,7 @@ func (x *ItemData) String() string { func (*ItemData) ProtoMessage() {} func (x *ItemData) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[0] + mi := &file_hero_hero_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -58,7 +239,7 @@ func (x *ItemData) ProtoReflect() protoreflect.Message { // Deprecated: Use ItemData.ProtoReflect.Descriptor instead. func (*ItemData) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{0} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{4} } func (x *ItemData) GetItemId() int32 { @@ -89,7 +270,7 @@ type Hero_StrengthenUplv_Req struct { func (x *Hero_StrengthenUplv_Req) Reset() { *x = Hero_StrengthenUplv_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[1] + mi := &file_hero_hero_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -102,7 +283,7 @@ func (x *Hero_StrengthenUplv_Req) String() string { func (*Hero_StrengthenUplv_Req) ProtoMessage() {} func (x *Hero_StrengthenUplv_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[1] + mi := &file_hero_hero_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -115,7 +296,7 @@ func (x *Hero_StrengthenUplv_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_StrengthenUplv_Req.ProtoReflect.Descriptor instead. func (*Hero_StrengthenUplv_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{1} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{5} } func (x *Hero_StrengthenUplv_Req) GetHeroObjID() string { @@ -151,7 +332,7 @@ type Hero_StrengthenUplv_Resp struct { func (x *Hero_StrengthenUplv_Resp) Reset() { *x = Hero_StrengthenUplv_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[2] + mi := &file_hero_hero_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -164,7 +345,7 @@ func (x *Hero_StrengthenUplv_Resp) String() string { func (*Hero_StrengthenUplv_Resp) ProtoMessage() {} func (x *Hero_StrengthenUplv_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[2] + mi := &file_hero_hero_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -177,7 +358,7 @@ func (x *Hero_StrengthenUplv_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_StrengthenUplv_Resp.ProtoReflect.Descriptor instead. func (*Hero_StrengthenUplv_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{2} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{6} } func (x *Hero_StrengthenUplv_Resp) GetHero() *DB_HeroData { @@ -199,7 +380,7 @@ type CostCardData struct { func (x *CostCardData) Reset() { *x = CostCardData{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[3] + mi := &file_hero_hero_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -212,7 +393,7 @@ func (x *CostCardData) String() string { func (*CostCardData) ProtoMessage() {} func (x *CostCardData) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[3] + mi := &file_hero_hero_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -225,7 +406,7 @@ func (x *CostCardData) ProtoReflect() protoreflect.Message { // Deprecated: Use CostCardData.ProtoReflect.Descriptor instead. func (*CostCardData) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{3} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{7} } func (x *CostCardData) GetCostCardObj() string { @@ -255,7 +436,7 @@ type Hero_StrengthenUpStar_Req struct { func (x *Hero_StrengthenUpStar_Req) Reset() { *x = Hero_StrengthenUpStar_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[4] + mi := &file_hero_hero_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -268,7 +449,7 @@ func (x *Hero_StrengthenUpStar_Req) String() string { func (*Hero_StrengthenUpStar_Req) ProtoMessage() {} func (x *Hero_StrengthenUpStar_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[4] + mi := &file_hero_hero_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -281,7 +462,7 @@ func (x *Hero_StrengthenUpStar_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_StrengthenUpStar_Req.ProtoReflect.Descriptor instead. func (*Hero_StrengthenUpStar_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{4} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{8} } func (x *Hero_StrengthenUpStar_Req) GetHeroObjID() string { @@ -310,7 +491,7 @@ type Hero_StrengthenUpStar_Resp struct { func (x *Hero_StrengthenUpStar_Resp) Reset() { *x = Hero_StrengthenUpStar_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[5] + mi := &file_hero_hero_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -323,7 +504,7 @@ func (x *Hero_StrengthenUpStar_Resp) String() string { func (*Hero_StrengthenUpStar_Resp) ProtoMessage() {} func (x *Hero_StrengthenUpStar_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[5] + mi := &file_hero_hero_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -336,7 +517,7 @@ func (x *Hero_StrengthenUpStar_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_StrengthenUpStar_Resp.ProtoReflect.Descriptor instead. func (*Hero_StrengthenUpStar_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{5} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{9} } func (x *Hero_StrengthenUpStar_Resp) GetHero() *DB_HeroData { @@ -360,7 +541,7 @@ type Hero_StrengthenUpSkill_Req struct { func (x *Hero_StrengthenUpSkill_Req) Reset() { *x = Hero_StrengthenUpSkill_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[6] + mi := &file_hero_hero_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -373,7 +554,7 @@ func (x *Hero_StrengthenUpSkill_Req) String() string { func (*Hero_StrengthenUpSkill_Req) ProtoMessage() {} func (x *Hero_StrengthenUpSkill_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[6] + mi := &file_hero_hero_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -386,7 +567,7 @@ func (x *Hero_StrengthenUpSkill_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_StrengthenUpSkill_Req.ProtoReflect.Descriptor instead. func (*Hero_StrengthenUpSkill_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{6} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{10} } func (x *Hero_StrengthenUpSkill_Req) GetHeroObjID() string { @@ -422,7 +603,7 @@ type Hero_StrengthenUpSkill_Resp struct { func (x *Hero_StrengthenUpSkill_Resp) Reset() { *x = Hero_StrengthenUpSkill_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[7] + mi := &file_hero_hero_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -435,7 +616,7 @@ func (x *Hero_StrengthenUpSkill_Resp) String() string { func (*Hero_StrengthenUpSkill_Resp) ProtoMessage() {} func (x *Hero_StrengthenUpSkill_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[7] + mi := &file_hero_hero_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -448,7 +629,7 @@ func (x *Hero_StrengthenUpSkill_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_StrengthenUpSkill_Resp.ProtoReflect.Descriptor instead. func (*Hero_StrengthenUpSkill_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{7} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{11} } func (x *Hero_StrengthenUpSkill_Resp) GetHero() *DB_HeroData { @@ -471,7 +652,7 @@ type Hero_Gongming_Req struct { func (x *Hero_Gongming_Req) Reset() { *x = Hero_Gongming_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[8] + mi := &file_hero_hero_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -484,7 +665,7 @@ func (x *Hero_Gongming_Req) String() string { func (*Hero_Gongming_Req) ProtoMessage() {} func (x *Hero_Gongming_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[8] + mi := &file_hero_hero_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -497,7 +678,7 @@ func (x *Hero_Gongming_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_Gongming_Req.ProtoReflect.Descriptor instead. func (*Hero_Gongming_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{8} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{12} } func (x *Hero_Gongming_Req) GetHeroObjID() string { @@ -527,7 +708,7 @@ type Hero_Gongming_Resp struct { func (x *Hero_Gongming_Resp) Reset() { *x = Hero_Gongming_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[9] + mi := &file_hero_hero_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -540,7 +721,7 @@ func (x *Hero_Gongming_Resp) String() string { func (*Hero_Gongming_Resp) ProtoMessage() {} func (x *Hero_Gongming_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[9] + mi := &file_hero_hero_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -553,7 +734,7 @@ func (x *Hero_Gongming_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_Gongming_Resp.ProtoReflect.Descriptor instead. func (*Hero_Gongming_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{9} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{13} } func (x *Hero_Gongming_Resp) GetHero() *DB_HeroData { @@ -589,7 +770,7 @@ type Hero_GongmingReset_Req struct { func (x *Hero_GongmingReset_Req) Reset() { *x = Hero_GongmingReset_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[10] + mi := &file_hero_hero_msg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -602,7 +783,7 @@ func (x *Hero_GongmingReset_Req) String() string { func (*Hero_GongmingReset_Req) ProtoMessage() {} func (x *Hero_GongmingReset_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[10] + mi := &file_hero_hero_msg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -615,7 +796,7 @@ func (x *Hero_GongmingReset_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_GongmingReset_Req.ProtoReflect.Descriptor instead. func (*Hero_GongmingReset_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{10} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{14} } func (x *Hero_GongmingReset_Req) GetHeroObjID() string { @@ -637,7 +818,7 @@ type Hero_GongmingReset_Resp struct { func (x *Hero_GongmingReset_Resp) Reset() { *x = Hero_GongmingReset_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[11] + mi := &file_hero_hero_msg_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -650,7 +831,7 @@ func (x *Hero_GongmingReset_Resp) String() string { func (*Hero_GongmingReset_Resp) ProtoMessage() {} func (x *Hero_GongmingReset_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[11] + mi := &file_hero_hero_msg_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -663,7 +844,7 @@ func (x *Hero_GongmingReset_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_GongmingReset_Resp.ProtoReflect.Descriptor instead. func (*Hero_GongmingReset_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{11} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{15} } func (x *Hero_GongmingReset_Resp) GetHero() *DB_HeroData { @@ -694,7 +875,7 @@ type Hero_GongmingUseEnergy_Req struct { func (x *Hero_GongmingUseEnergy_Req) Reset() { *x = Hero_GongmingUseEnergy_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[12] + mi := &file_hero_hero_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -707,7 +888,7 @@ func (x *Hero_GongmingUseEnergy_Req) String() string { func (*Hero_GongmingUseEnergy_Req) ProtoMessage() {} func (x *Hero_GongmingUseEnergy_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[12] + mi := &file_hero_hero_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -720,7 +901,7 @@ func (x *Hero_GongmingUseEnergy_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_GongmingUseEnergy_Req.ProtoReflect.Descriptor instead. func (*Hero_GongmingUseEnergy_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{12} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{16} } func (x *Hero_GongmingUseEnergy_Req) GetHeroObjID() string { @@ -755,7 +936,7 @@ type Hero_GongmingUseEnergy_Resp struct { func (x *Hero_GongmingUseEnergy_Resp) Reset() { *x = Hero_GongmingUseEnergy_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[13] + mi := &file_hero_hero_msg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -768,7 +949,7 @@ func (x *Hero_GongmingUseEnergy_Resp) String() string { func (*Hero_GongmingUseEnergy_Resp) ProtoMessage() {} func (x *Hero_GongmingUseEnergy_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[13] + mi := &file_hero_hero_msg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -781,7 +962,7 @@ func (x *Hero_GongmingUseEnergy_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_GongmingUseEnergy_Resp.ProtoReflect.Descriptor instead. func (*Hero_GongmingUseEnergy_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{13} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{17} } func (x *Hero_GongmingUseEnergy_Resp) GetHero() *DB_HeroData { @@ -804,7 +985,7 @@ type Hero_Juexing_Req struct { func (x *Hero_Juexing_Req) Reset() { *x = Hero_Juexing_Req{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[14] + mi := &file_hero_hero_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -817,7 +998,7 @@ func (x *Hero_Juexing_Req) String() string { func (*Hero_Juexing_Req) ProtoMessage() {} func (x *Hero_Juexing_Req) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[14] + mi := &file_hero_hero_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -830,7 +1011,7 @@ func (x *Hero_Juexing_Req) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_Juexing_Req.ProtoReflect.Descriptor instead. func (*Hero_Juexing_Req) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{14} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{18} } func (x *Hero_Juexing_Req) GetHeroObjID() string { @@ -859,7 +1040,7 @@ type Hero_Juexing_Resp struct { func (x *Hero_Juexing_Resp) Reset() { *x = Hero_Juexing_Resp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[15] + mi := &file_hero_hero_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -872,7 +1053,7 @@ func (x *Hero_Juexing_Resp) String() string { func (*Hero_Juexing_Resp) ProtoMessage() {} func (x *Hero_Juexing_Resp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[15] + mi := &file_hero_hero_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -885,7 +1066,7 @@ func (x *Hero_Juexing_Resp) ProtoReflect() protoreflect.Message { // Deprecated: Use Hero_Juexing_Resp.ProtoReflect.Descriptor instead. func (*Hero_Juexing_Resp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{15} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{19} } func (x *Hero_Juexing_Resp) GetHero() *DB_HeroData { @@ -899,93 +1080,105 @@ var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ 0x0a, 0x13, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, - 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x08, 0x49, 0x74, 0x65, - 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6d, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, - 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x5f, 0x52, 0x65, 0x71, - 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, - 0x0a, 0x09, 0x65, 0x78, 0x70, 0x43, 0x61, 0x72, 0x64, 0x49, 0x44, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, 0x43, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3c, 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x5f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, - 0x72, 0x6f, 0x22, 0x48, 0x0a, 0x0c, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, - 0x6a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, - 0x64, 0x4f, 0x62, 0x6a, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5e, 0x0a, 0x19, - 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, - 0x70, 0x53, 0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, - 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, - 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x23, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3e, 0x0a, 0x1a, - 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, - 0x70, 0x53, 0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, - 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, - 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x7f, 0x0a, 0x1a, - 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, - 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, + 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, + 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x49, 0x6e, 0x66, 0x6f, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x49, + 0x6e, 0x66, 0x6f, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, + 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d, + 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, + 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x23, + 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, + 0x69, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x6d, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x65, 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, - 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x23, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, - 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3f, 0x0a, - 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, - 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, - 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x5f, - 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4f, - 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, - 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, - 0x7c, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, - 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, - 0x2c, 0x0a, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x36, 0x0a, - 0x16, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, - 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x53, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, - 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, - 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x72, 0x0a, 0x1a, 0x48, 0x65, - 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x45, 0x6e, - 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, - 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, - 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, - 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3f, - 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55, - 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, - 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, + 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x43, + 0x61, 0x72, 0x64, 0x49, 0x44, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, + 0x43, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3f, + 0x0a, 0x18, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, + 0x6e, 0x55, 0x70, 0x6c, 0x76, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, + 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, - 0x59, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x5f, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, - 0x44, 0x12, 0x27, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x6d, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x6d, 0x65, 0x73, 0x22, 0x35, 0x0a, 0x11, 0x48, 0x65, - 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, - 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x48, 0x0a, 0x0c, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, + 0x6a, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x61, 0x0a, 0x19, 0x48, 0x65, 0x72, + 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74, + 0x61, 0x72, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, + 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, + 0x62, 0x6a, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x41, 0x0a, 0x1a, + 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, + 0x70, 0x53, 0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, + 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, + 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, + 0x82, 0x01, 0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, + 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x48, 0x65, + 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x2f, 0x0a, + 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x36, + 0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, + 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, + 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, + 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x72, + 0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55, + 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, + 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, + 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, + 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, + 0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, + 0x75, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, + 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, + 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, + 0x49, 0x74, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, + 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, + 0x74, 0x6d, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, + 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, + 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1000,43 +1193,49 @@ func file_hero_hero_msg_proto_rawDescGZIP() []byte { return file_hero_hero_msg_proto_rawDescData } -var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_hero_hero_msg_proto_goTypes = []interface{}{ - (*ItemData)(nil), // 0: ItemData - (*Hero_StrengthenUplv_Req)(nil), // 1: Hero_StrengthenUplv_Req - (*Hero_StrengthenUplv_Resp)(nil), // 2: Hero_StrengthenUplv_Resp - (*CostCardData)(nil), // 3: CostCardData - (*Hero_StrengthenUpStar_Req)(nil), // 4: Hero_StrengthenUpStar_Req - (*Hero_StrengthenUpStar_Resp)(nil), // 5: Hero_StrengthenUpStar_Resp - (*Hero_StrengthenUpSkill_Req)(nil), // 6: Hero_StrengthenUpSkill_Req - (*Hero_StrengthenUpSkill_Resp)(nil), // 7: Hero_StrengthenUpSkill_Resp - (*Hero_Gongming_Req)(nil), // 8: Hero_Gongming_Req - (*Hero_Gongming_Resp)(nil), // 9: Hero_Gongming_Resp - (*Hero_GongmingReset_Req)(nil), // 10: Hero_GongmingReset_Req - (*Hero_GongmingReset_Resp)(nil), // 11: Hero_GongmingReset_Resp - (*Hero_GongmingUseEnergy_Req)(nil), // 12: Hero_GongmingUseEnergy_Req - (*Hero_GongmingUseEnergy_Resp)(nil), // 13: Hero_GongmingUseEnergy_Resp - (*Hero_Juexing_Req)(nil), // 14: Hero_Juexing_Req - (*Hero_Juexing_Resp)(nil), // 15: Hero_Juexing_Resp - (*DB_HeroData)(nil), // 16: DB_HeroData + (*Hero_Info_Req)(nil), // 0: pb.Hero_Info_Req + (*Hero_Info_Rsp)(nil), // 1: pb.Hero_Info_Rsp + (*Hero_List_Req)(nil), // 2: pb.Hero_List_Req + (*Hero_List_Rsp)(nil), // 3: pb.Hero_List_Rsp + (*ItemData)(nil), // 4: pb.ItemData + (*Hero_StrengthenUplv_Req)(nil), // 5: pb.Hero_StrengthenUplv_Req + (*Hero_StrengthenUplv_Resp)(nil), // 6: pb.Hero_StrengthenUplv_Resp + (*CostCardData)(nil), // 7: pb.CostCardData + (*Hero_StrengthenUpStar_Req)(nil), // 8: pb.Hero_StrengthenUpStar_Req + (*Hero_StrengthenUpStar_Resp)(nil), // 9: pb.Hero_StrengthenUpStar_Resp + (*Hero_StrengthenUpSkill_Req)(nil), // 10: pb.Hero_StrengthenUpSkill_Req + (*Hero_StrengthenUpSkill_Resp)(nil), // 11: pb.Hero_StrengthenUpSkill_Resp + (*Hero_Gongming_Req)(nil), // 12: pb.Hero_Gongming_Req + (*Hero_Gongming_Resp)(nil), // 13: pb.Hero_Gongming_Resp + (*Hero_GongmingReset_Req)(nil), // 14: pb.Hero_GongmingReset_Req + (*Hero_GongmingReset_Resp)(nil), // 15: pb.Hero_GongmingReset_Resp + (*Hero_GongmingUseEnergy_Req)(nil), // 16: pb.Hero_GongmingUseEnergy_Req + (*Hero_GongmingUseEnergy_Resp)(nil), // 17: pb.Hero_GongmingUseEnergy_Resp + (*Hero_Juexing_Req)(nil), // 18: pb.Hero_Juexing_Req + (*Hero_Juexing_Resp)(nil), // 19: pb.Hero_Juexing_Resp + (*DB_HeroData)(nil), // 20: pb.DB_HeroData } var file_hero_hero_msg_proto_depIdxs = []int32{ - 16, // 0: Hero_StrengthenUplv_Resp.hero:type_name -> DB_HeroData - 3, // 1: Hero_StrengthenUpStar_Req.items:type_name -> CostCardData - 16, // 2: Hero_StrengthenUpStar_Resp.hero:type_name -> DB_HeroData - 3, // 3: Hero_StrengthenUpSkill_Req.items:type_name -> CostCardData - 16, // 4: Hero_StrengthenUpSkill_Resp.hero:type_name -> DB_HeroData - 16, // 5: Hero_Gongming_Resp.hero:type_name -> DB_HeroData - 16, // 6: Hero_Gongming_Resp.upStarCard:type_name -> DB_HeroData - 16, // 7: Hero_GongmingReset_Resp.hero:type_name -> DB_HeroData - 16, // 8: Hero_GongmingUseEnergy_Resp.hero:type_name -> DB_HeroData - 0, // 9: Hero_Juexing_Req.costItmes:type_name -> ItemData - 16, // 10: Hero_Juexing_Resp.hero:type_name -> DB_HeroData - 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 + 20, // 0: pb.Hero_Info_Rsp.base:type_name -> pb.DB_HeroData + 20, // 1: pb.Hero_List_Rsp.list:type_name -> pb.DB_HeroData + 20, // 2: pb.Hero_StrengthenUplv_Resp.hero:type_name -> pb.DB_HeroData + 7, // 3: pb.Hero_StrengthenUpStar_Req.items:type_name -> pb.CostCardData + 20, // 4: pb.Hero_StrengthenUpStar_Resp.hero:type_name -> pb.DB_HeroData + 7, // 5: pb.Hero_StrengthenUpSkill_Req.items:type_name -> pb.CostCardData + 20, // 6: pb.Hero_StrengthenUpSkill_Resp.hero:type_name -> pb.DB_HeroData + 20, // 7: pb.Hero_Gongming_Resp.hero:type_name -> pb.DB_HeroData + 20, // 8: pb.Hero_Gongming_Resp.upStarCard:type_name -> pb.DB_HeroData + 20, // 9: pb.Hero_GongmingReset_Resp.hero:type_name -> pb.DB_HeroData + 20, // 10: pb.Hero_GongmingUseEnergy_Resp.hero:type_name -> pb.DB_HeroData + 4, // 11: pb.Hero_Juexing_Req.costItmes:type_name -> pb.ItemData + 20, // 12: pb.Hero_Juexing_Resp.hero:type_name -> pb.DB_HeroData + 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_msg_proto_init() } @@ -1047,7 +1246,7 @@ func file_hero_hero_msg_proto_init() { file_hero_hero_db_proto_init() if !protoimpl.UnsafeEnabled { file_hero_hero_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ItemData); i { + switch v := v.(*Hero_Info_Req); i { case 0: return &v.state case 1: @@ -1059,7 +1258,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_StrengthenUplv_Req); i { + switch v := v.(*Hero_Info_Rsp); i { case 0: return &v.state case 1: @@ -1071,7 +1270,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_StrengthenUplv_Resp); i { + switch v := v.(*Hero_List_Req); i { case 0: return &v.state case 1: @@ -1083,7 +1282,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CostCardData); i { + switch v := v.(*Hero_List_Rsp); i { case 0: return &v.state case 1: @@ -1095,7 +1294,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_StrengthenUpStar_Req); i { + switch v := v.(*ItemData); i { case 0: return &v.state case 1: @@ -1107,7 +1306,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_StrengthenUpStar_Resp); i { + switch v := v.(*Hero_StrengthenUplv_Req); i { case 0: return &v.state case 1: @@ -1119,7 +1318,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_StrengthenUpSkill_Req); i { + switch v := v.(*Hero_StrengthenUplv_Resp); i { case 0: return &v.state case 1: @@ -1131,7 +1330,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_StrengthenUpSkill_Resp); i { + switch v := v.(*CostCardData); i { case 0: return &v.state case 1: @@ -1143,7 +1342,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_Gongming_Req); i { + switch v := v.(*Hero_StrengthenUpStar_Req); i { case 0: return &v.state case 1: @@ -1155,7 +1354,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_Gongming_Resp); i { + switch v := v.(*Hero_StrengthenUpStar_Resp); i { case 0: return &v.state case 1: @@ -1167,7 +1366,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_GongmingReset_Req); i { + switch v := v.(*Hero_StrengthenUpSkill_Req); i { case 0: return &v.state case 1: @@ -1179,7 +1378,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_GongmingReset_Resp); i { + switch v := v.(*Hero_StrengthenUpSkill_Resp); i { case 0: return &v.state case 1: @@ -1191,7 +1390,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_GongmingUseEnergy_Req); i { + switch v := v.(*Hero_Gongming_Req); i { case 0: return &v.state case 1: @@ -1203,7 +1402,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_GongmingUseEnergy_Resp); i { + switch v := v.(*Hero_Gongming_Resp); i { case 0: return &v.state case 1: @@ -1215,7 +1414,7 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Hero_Juexing_Req); i { + switch v := v.(*Hero_GongmingReset_Req); i { case 0: return &v.state case 1: @@ -1227,6 +1426,54 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hero_GongmingReset_Resp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hero_hero_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hero_GongmingUseEnergy_Req); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hero_hero_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hero_GongmingUseEnergy_Resp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hero_hero_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hero_Juexing_Req); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_hero_hero_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Hero_Juexing_Resp); i { case 0: return &v.state @@ -1245,7 +1492,7 @@ func file_hero_hero_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/proto/errorcode.proto b/pb/proto/errorcode.proto index d98406364..9ea1f02ce 100644 --- a/pb/proto/errorcode.proto +++ b/pb/proto/errorcode.proto @@ -20,7 +20,8 @@ enum ErrorCode { Unknown = 101; //未知错误 ResNoEnough = 102; //资源不足 ConfigurationException = 103; //配置异常 - + ConfigNoFound = 104; //配置未找到 + // user SecKeyInvalid = 1000; //秘钥无效 SecKey = 1001; //秘钥格式错误 @@ -49,7 +50,7 @@ enum ErrorCode { // hero HeroNoExist = 1300; //英雄不存在 - //equipment + // equipment EquipmentOnFoundEquipment = 1400; // 未找到武器 EquipmentLvlimitReached = 1401; // 武器等级已达上限 } \ No newline at end of file diff --git a/pb/proto/hero/hero_db.proto b/pb/proto/hero/hero_db.proto index d24df6c5e..45d8efec8 100644 --- a/pb/proto/hero/hero_db.proto +++ b/pb/proto/hero/hero_db.proto @@ -1,5 +1,6 @@ syntax = "proto3"; option go_package = ".;pb"; +package pb; // enum PropertyType{ // Hp = 0; //血量 @@ -14,25 +15,28 @@ message SkillData{ int32 skillLv = 2; } message DB_HeroData { - string id = 1; //@go_tags(`bson:"_id"`) ID - string uid = 2; - int32 heroID = 3; //@go_tags(`bson:"heroID"`) 英雄的配置表ID - int32 star = 4; // 英雄星级 - int32 lv = 5; // 英雄等级 - int32 exp = 6; // 英雄经验 - int32 juexingLv = 7; //@go_tags(`bson:"juexingLv"`) 觉醒等级 - int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`) 队长技能 - repeated SkillData normalSkill= 9; //@go_tags(`bson:"normalSkill"`) 普通技能 - map property = 10; // 属性相关 - map addProperty = 11; //@go_tags(`bson:"addProperty"`) 附加属性相关 - int32 formation = 12; // 阵型类型 - int32 cardType = 13; //@go_tags(`bson:"cardType"`) 卡片类型(升星卡、经验卡、技能升级卡) - int32 curSkin = 14; //@go_tags(`bson:"curSkin"`) 当前装备的皮肤ID - repeated int32 skins = 15; // 所有皮肤ID - bool block = 16; // 锁定 - repeated string equipID = 17; //@go_tags(`bson:"equipID"`) 装备 objID - int32 resonateNum = 18; //@go_tags(`bson:"resonateNum"`) 共鸣次数 - int32 distributionResonate = 19; //@go_tags(`bson:"distributionResonate"`) 分配的共鸣能量 - map energy = 20; // 能量分配到哪里 - int32 count = 21; // 数量 + string id = 1; //@go_tags(`bson:"_id"`) ID + string uid = 2; + int32 heroID = 3; //@go_tags(`bson:"heroID"`) 英雄的配置表ID + int32 star = 4; // 英雄星级 + int32 lv = 5; // 英雄等级 + int32 exp = 6; // 英雄经验 + int32 juexingLv = 7; //@go_tags(`bson:"juexingLv"`) 觉醒等级 + int32 captainSkill = 8; //@go_tags(`bson:"captainSkill"`) 队长技能 + repeated SkillData normalSkill = 9; //@go_tags(`bson:"normalSkill"`) 普通技能 + map property = 10; // 属性相关 + map addProperty = + 11; //@go_tags(`bson:"addProperty"`) 附加属性相关 + int32 formation = 12; // 阵型类型 + int32 cardType = + 13; //@go_tags(`bson:"cardType"`) 卡片类型(升星卡、经验卡、技能升级卡) + int32 curSkin = 14; //@go_tags(`bson:"curSkin"`) 当前装备的皮肤ID + repeated int32 skins = 15; // 所有皮肤ID + bool block = 16; // 锁定 + repeated string equipID = 17; //@go_tags(`bson:"equipID"`) 装备 objID + int32 resonateNum = 18; //@go_tags(`bson:"resonateNum"`) 共鸣次数 + int32 distributionResonate = + 19; //@go_tags(`bson:"distributionResonate"`) 分配的共鸣能量 + map energy = 20; // 能量分配到哪里 + int32 count = 21; // 数量 } \ No newline at end of file diff --git a/pb/proto/hero/hero_msg.proto b/pb/proto/hero/hero_msg.proto index 361ce6c00..91809e1a0 100644 --- a/pb/proto/hero/hero_msg.proto +++ b/pb/proto/hero/hero_msg.proto @@ -1,95 +1,107 @@ syntax = "proto3"; option go_package = ".;pb"; +package pb; import "hero/hero_db.proto"; -/// 卡牌养成: 强化(卡牌升级、卡牌升星、技能升级) -/// 卡牌养成: 共鸣(共鸣消耗、材料返回、能量点使用) -/// 卡牌养成: 觉醒(英雄觉醒、材料消耗) +//英雄基础信息 +message Hero_Info_Req { + string heroId = 1; //英雄唯一ID +} +message Hero_Info_Rsp { DB_HeroData base = 1; } -message ItemData{ - int32 itemId = 2; //物品Id - int32 amount = 3; //数量 +//英雄列表 +message Hero_List_Req {} + +message Hero_List_Rsp { repeated DB_HeroData list = 1; } + +/// 卡牌养成: 强化(卡牌升级、卡牌升星、技能升级) +/// 卡牌养成: 共鸣(共鸣消耗、材料返回、能量点使用) +/// 卡牌养成: 觉醒(英雄觉醒、材料消耗) + +message ItemData { + int32 itemId = 2; //物品Id + int32 amount = 3; //数量 } // 卡牌升级 message Hero_StrengthenUplv_Req { - string heroObjID = 1; // 英雄对象ID - repeated string expCardID = 2; // 经验卡对象ID - int32 amount = 3; // 消耗经验卡数量 + string heroObjID = 1; // 英雄对象ID + repeated string expCardID = 2; // 经验卡对象ID + int32 amount = 3; // 消耗经验卡数量 } // 卡牌升级返回 message Hero_StrengthenUplv_Resp { - DB_HeroData hero = 1; // 英雄对象 + DB_HeroData hero = 1; // 英雄对象 } -message CostCardData{ - string costCardObj = 1; // 对象ID - int32 amount = 2; // 数量 +message CostCardData { + string costCardObj = 1; // 对象ID + int32 amount = 2; // 数量 } // 卡牌升星 message Hero_StrengthenUpStar_Req { - string heroObjID = 1; // 英雄对象ID - repeated CostCardData items = 2; // 消耗卡牌对象ID + string heroObjID = 1; // 英雄对象ID + repeated CostCardData items = 2; // 消耗卡牌对象ID } // 卡牌升星返回 message Hero_StrengthenUpStar_Resp { - DB_HeroData hero = 1; // 英雄对象 + DB_HeroData hero = 1; // 英雄对象 } // 卡牌技能升级 message Hero_StrengthenUpSkill_Req { - string heroObjID = 1; // 英雄对象ID - int32 skillIndex = 2; // 英雄技能索引 - CostCardData items = 3; // 消耗技能升级卡 + string heroObjID = 1; // 英雄对象ID + int32 skillIndex = 2; // 英雄技能索引 + CostCardData items = 3; // 消耗技能升级卡 } // 卡牌技能升级返回 message Hero_StrengthenUpSkill_Resp { - DB_HeroData hero = 1; // 英雄对象 + DB_HeroData hero = 1; // 英雄对象 } // 共鸣英雄 -message Hero_Gongming_Req{ - string heroObjID = 1; // 英雄对象ID - string costObjID = 2; // 消耗对象 +message Hero_Gongming_Req { + string heroObjID = 1; // 英雄对象ID + string costObjID = 2; // 消耗对象 } -message Hero_Gongming_Resp{ - DB_HeroData hero = 1; // 英雄对象 - int32 energy = 2; // 共鸣成功 获得的能量点数 - DB_HeroData upStarCard = 3; //共鸣成功 获得的升星卡 +message Hero_Gongming_Resp { + DB_HeroData hero = 1; // 英雄对象 + int32 energy = 2; // 共鸣成功 获得的能量点数 + DB_HeroData upStarCard = 3; //共鸣成功 获得的升星卡 } // 重置共鸣属性 -message Hero_GongmingReset_Req{ - string heroObjID = 1; // 英雄对象ID +message Hero_GongmingReset_Req { + string heroObjID = 1; // 英雄对象ID } -message Hero_GongmingReset_Resp{ - DB_HeroData hero = 1; // 英雄对象 - int32 energy = 2; // 能量点数 +message Hero_GongmingReset_Resp { + DB_HeroData hero = 1; // 英雄对象 + int32 energy = 2; // 能量点数 } // 使用能量点数 -message Hero_GongmingUseEnergy_Req{ - string heroObjID = 1; // 英雄对象ID - int32 useEnergy = 2; // 使用的能量点数 - int32 useType = 3; // 使用的类型 (攻击、血量、防御) +message Hero_GongmingUseEnergy_Req { + string heroObjID = 1; // 英雄对象ID + int32 useEnergy = 2; // 使用的能量点数 + int32 useType = 3; // 使用的类型 (攻击、血量、防御) } -message Hero_GongmingUseEnergy_Resp{ - DB_HeroData hero = 1; // 英雄对象 +message Hero_GongmingUseEnergy_Resp { + DB_HeroData hero = 1; // 英雄对象 } // 觉醒 message Hero_Juexing_Req { - string heroObjID = 1; // 英雄对象ID - ItemData costItmes = 2; // 觉醒消耗待定 + string heroObjID = 1; // 英雄对象ID + ItemData costItmes = 2; // 觉醒消耗待定 } // 觉醒返回 message Hero_Juexing_Resp { - DB_HeroData hero = 1; // 英雄对象 + DB_HeroData hero = 1; // 英雄对象 } \ No newline at end of file diff --git a/pb/proto/user/user_db.proto b/pb/proto/user/user_db.proto index 6edeb7ce0..d43502004 100644 --- a/pb/proto/user/user_db.proto +++ b/pb/proto/user/user_db.proto @@ -21,4 +21,6 @@ message DB_UserData { int64 logintime = 10; //@go_tags(`bson:"logintime"`) 最后一次登录时间 int32 friendPoint = 11; //@go_tags(`bson:"friendPoint"`) 友情点 int32 avatar = 12; //@go_tags(`bson:"avatar"`) 头像 + int32 gold = 13; //@go_tags(`bson:"gold"`) 金币 + int32 exp = 14; //@go_tags(`bson:"exp"`) 经验 } \ No newline at end of file diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index a0f3253e7..9ce4a4872 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -100,6 +100,8 @@ type DB_UserData struct { Logintime int64 `protobuf:"varint,10,opt,name=logintime,proto3" json:"logintime" bson:"logintime"` //最后一次登录时间 FriendPoint int32 `protobuf:"varint,11,opt,name=friendPoint,proto3" json:"friendPoint" bson:"friendPoint"` //友情点 Avatar int32 `protobuf:"varint,12,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像 + Gold int32 `protobuf:"varint,13,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币 + Exp int32 `protobuf:"varint,14,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验 } func (x *DB_UserData) Reset() { @@ -218,6 +220,20 @@ func (x *DB_UserData) GetAvatar() int32 { return 0 } +func (x *DB_UserData) GetGold() int32 { + if x != nil { + return x.Gold + } + return 0 +} + +func (x *DB_UserData) GetExp() int32 { + if x != nil { + return x.Exp + } + return 0 +} + var File_user_user_db_proto protoreflect.FileDescriptor var file_user_user_db_proto_rawDesc = []byte{ @@ -229,7 +245,7 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x64, 0x22, 0xaf, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, + 0x49, 0x64, 0x22, 0xd5, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 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, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, @@ -248,8 +264,10 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x76, - 0x61, 0x74, 0x61, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sys/configure/structs/game.hero.go b/sys/configure/structs/game.hero.go new file mode 100644 index 000000000..090ab7371 --- /dev/null +++ b/sys/configure/structs/game.hero.go @@ -0,0 +1,42 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ +package cfg + +type Game_hero struct { + _dataMap map[int32]*Game_heroData + _dataList []*Game_heroData +} + +func NewGame_hero(_buf []map[string]interface{}) (*Game_hero, error) { + _dataList := make([]*Game_heroData, 0, len(_buf)) + dataMap := make(map[int32]*Game_heroData) + for _, _ele_ := range _buf { + if _v, err2 := NewGame_heroData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &Game_hero{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *Game_hero) GetDataMap() map[int32]*Game_heroData { + return table._dataMap +} + +func (table *Game_hero) GetDataList() []*Game_heroData { + return table._dataList +} + +func (table *Game_hero) Get(key int32) *Game_heroData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/game.heroData.go b/sys/configure/structs/game.heroData.go new file mode 100644 index 000000000..c68fa15ad --- /dev/null +++ b/sys/configure/structs/game.heroData.go @@ -0,0 +1,95 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ +package cfg + +import "errors" +import "bright/math" + +type Game_heroData struct { + Id int32 + Name string + Star int32 + Color int32 + Race int32 + Job int32 + Type int32 + Prefab string + Icon int32 + Sound int32 + Tujing []int32 + Intr string + Events string + Cite string + Effectstay []string + Hpspace math.Vector3 + Skill1 int32 + Skill2 int32 + Skill3 int32 +} + +func (Game_heroData) GetTypeId() int { + return 650222912 +} + +func NewGame_heroData(_buf map[string]interface{}) (_v *Game_heroData, err error) { + _v = &Game_heroData{} + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } + { var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["color"].(float64); !_ok_ { err = errors.New("color error"); return }; _v.Color = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["race"].(float64); !_ok_ { err = errors.New("race error"); return }; _v.Race = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["job"].(float64); !_ok_ { err = errors.New("job error"); return }; _v.Job = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) } + { var _ok_ bool; if _v.Prefab, _ok_ = _buf["prefab"].(string); !_ok_ { err = errors.New("prefab error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["icon"].(float64); !_ok_ { err = errors.New("icon error"); return }; _v.Icon = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["sound"].(float64); !_ok_ { err = errors.New("sound error"); return }; _v.Sound = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["tujing"].([]interface{}); !_ok_ { err = errors.New("tujing error"); return } + + _v.Tujing = make([]int32, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ int32 + { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } + _v.Tujing = append(_v.Tujing, _list_v_) + } + } + + { var _ok_ bool; if _v.Intr, _ok_ = _buf["intr"].(string); !_ok_ { err = errors.New("intr error"); return } } + { var _ok_ bool; if _v.Events, _ok_ = _buf["events"].(string); !_ok_ { err = errors.New("events error"); return } } + { var _ok_ bool; if _v.Cite, _ok_ = _buf["cite"].(string); !_ok_ { err = errors.New("cite error"); return } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["effectstay"].([]interface{}); !_ok_ { err = errors.New("effectstay error"); return } + + _v.Effectstay = make([]string, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ string + { if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } } + _v.Effectstay = append(_v.Effectstay, _list_v_) + } + } + + { var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["hpspace"].(map[string]interface{}); !_ok_ { err = errors.New("hpspace error"); return } + var _x_, _y_, _z_ float32; + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) } + _v.Hpspace = math.NewVector3(_x_, _y_, _z_) + } + + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill1"].(float64); !_ok_ { err = errors.New("skill1 error"); return }; _v.Skill1 = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill2"].(float64); !_ok_ { err = errors.New("skill2 error"); return }; _v.Skill2 = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["skill3"].(float64); !_ok_ { err = errors.New("skill3 error"); return }; _v.Skill3 = int32(_tempNum_) } + return +} diff --git a/utils/math_test.go b/utils/math_test.go new file mode 100644 index 000000000..d4b585bf7 --- /dev/null +++ b/utils/math_test.go @@ -0,0 +1 @@ +package utils