diff --git a/modules/hero/api_starUp.go b/modules/hero/api_starUp.go index 3dba0db0a..82669d2f7 100644 --- a/modules/hero/api_starUp.go +++ b/modules/hero/api_starUp.go @@ -69,7 +69,16 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr } for _, value := range tagHeroConfig.GetDataList() { - if _hero.HeroID == value.Id && _hero.Star == value.Star { //&& _hero.Lv >= value.Maxlevel { // 找到了 满足升星条件 + if _hero.HeroID == value.Id && _hero.Star == value.Star { + // 校验等级 + if _hero.Lv < _hero.Star*comm.HeroStarLvRatio { + code = pb.ErrorCode_HeroStarLvErr + return + } + if value.Needhero == 0 && value.Needracenum == 0 && value.Gold == 0 { // 不能再升星了 + code = pb.ErrorCode_HeroMaxStarLv + return + } target = value break } @@ -102,12 +111,15 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr } for _, value := range target.Needrace { // 阵营校验 - if tagHero.Formation == value { - bCheckRacehero = true - break + // 获取配置表英雄阵营 + cfg := this.module.configure.GetHero(tagHero.HeroID) + if cfg != nil { + if cfg.Race == value { + bCheckRacehero = true + break + } } } - this.module.Debugf("指定英雄校验结果:%b,种族英雄校验结果:%b", bCheckNeedhero, bCheckRacehero) } } diff --git a/modules/hero/api_strengthen.go b/modules/hero/api_strengthen.go index a51764a51..ae34fb473 100644 --- a/modules/hero/api_strengthen.go +++ b/modules/hero/api_strengthen.go @@ -101,7 +101,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren code = pb.ErrorCode_HeroMaxLv return } - _hero.Exp += addExp // 先把经验加上 + curExp += addExp // 先把经验加上 for { if maxLv <= _hero.Lv && curExp >= _data.Heroexp[0].N { // 设置最大经验和等级 // 超过的经验值 diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index b870ccc67..a33603bf6 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -9,17 +9,19 @@ import ( ) const ( - 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_heroexp.json" // 升级 - hero_skillup = "game_heroskilllevel.json" // 英雄技能升级 - game_skillatk = "game_skillatk.json" // 英雄技能 - hero_resonance = "game_heroresonance.json" // 英雄共鸣 - hero_comatn = "game_comatn.json" // 英雄共鸣重置 - hero_awaken = "game_heroawaken.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_heroexp.json" // 升级 + hero_skillup = "game_heroskilllevel.json" // 英雄技能升级 + game_skillatk = "game_skillatk.json" // 英雄技能 + hero_resonance = "game_heroresonance.json" // 英雄共鸣 + hero_comatn = "game_comatn.json" // 英雄共鸣重置 + hero_awaken = "game_heroawaken.json" // 英雄觉醒 + hero_drawcard = "game_drawcard.json" // 抽卡 + hero_drawupdraw = "game_drawupdraw.json" // 抽卡概率调整 ) ///配置管理组件 @@ -32,17 +34,19 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp err = this.MCompConfigure.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, - hero_skillup: cfg.NewGame_heroSkillLevel, - game_skillatk: cfg.NewGame_skillAtk, - hero_resonance: cfg.NewGame_heroResonance, - hero_comatn: cfg.NewGame_comAtn, - hero_awaken: cfg.NewGame_heroAwaken, + 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, + hero_skillup: cfg.NewGame_heroSkillLevel, + game_skillatk: cfg.NewGame_skillAtk, + hero_resonance: cfg.NewGame_heroResonance, + hero_comatn: cfg.NewGame_comAtn, + hero_awaken: cfg.NewGame_heroAwaken, + hero_drawcard: cfg.NewGame_drawCard, + hero_drawupdraw: cfg.NewGame_drawUpdraw, }) return @@ -345,3 +349,37 @@ func (this *configureComp) GetHeroAwakenConfig() (configure *cfg.Game_heroAwaken return } + +func (this *configureComp) GetHeroDrawConfig() (configure *cfg.Game_drawCard, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(hero_stargrow); err == nil { + if configure, ok = v.(*cfg.Game_drawCard); !ok { + err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) + return + } + } else { + err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) + } + + return +} + +func (this *configureComp) GetDrawUpDrawConfig() (configure *cfg.Game_drawUpdraw, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(hero_stargrow); err == nil { + if configure, ok = v.(*cfg.Game_drawUpdraw); !ok { + err = fmt.Errorf("%T no is *cfg.Game_drawUpdraw", v) + return + } + } else { + err = fmt.Errorf("%T no is *cfg.Game_drawUpdraw", v) + } + + return +} diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index ae475f5f6..86424b06b 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -369,7 +369,7 @@ func (this *ModelHero) PushHeroProperty(session comm.IUserSession, heroId string func (this *ModelHero) HeroStarUp(session comm.IUserSession, hero *pb.DBHero) (code pb.ErrorCode) { _heroMap := map[string]interface{}{ - "star": hero.Star, + "star": hero.Star + 1, "isOverlying": false, } // 保存数据 diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index cddb495d0..969aee751 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -89,6 +89,8 @@ const ( ErrorCode_HeroTypeErr ErrorCode = 1317 // 升级英雄类型不对 ErrorCode_HeroExpTypeErr ErrorCode = 1318 // 技能升级卡类型不对 ErrorCode_HeroAddMaxExp ErrorCode = 1319 // 升级经验卡溢出 检查传入的数量 + ErrorCode_HeroStarLvErr ErrorCode = 1320 // 升星等级不够 + ErrorCode_HeroMaxStarLv ErrorCode = 1321 // 达到最大升星等级 // equipment ErrorCode_EquipmentOnFoundEquipment ErrorCode = 1400 // 未找到武器 ErrorCode_EquipmentLvlimitReached ErrorCode = 1401 // 武器等级已达上限 @@ -172,6 +174,8 @@ var ( 1317: "HeroTypeErr", 1318: "HeroExpTypeErr", 1319: "HeroAddMaxExp", + 1320: "HeroStarLvErr", + 1321: "HeroMaxStarLv", 1400: "EquipmentOnFoundEquipment", 1401: "EquipmentLvlimitReached", 1500: "MainlineNotFindChapter", @@ -249,6 +253,8 @@ var ( "HeroTypeErr": 1317, "HeroExpTypeErr": 1318, "HeroAddMaxExp": 1319, + "HeroStarLvErr": 1320, + "HeroMaxStarLv": 1321, "EquipmentOnFoundEquipment": 1400, "EquipmentLvlimitReached": 1401, "MainlineNotFindChapter": 1500, @@ -296,7 +302,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, 0x98, 0x0c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xad, 0x0c, 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, @@ -375,26 +381,28 @@ var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, - 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 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, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, - 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, - 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, - 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, - 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, - 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, - 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, - 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, - 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, - 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, + 0x6f, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, + 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, + 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, 0x12, + 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, + 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, + 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, + 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, + 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, + 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, + 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, + 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, + 0x0c, 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 e4b177c6f..0576db91b 100644 --- a/pb/hero_db.pb.go +++ b/pb/hero_db.pb.go @@ -91,19 +91,18 @@ type DBHero struct { NormalSkill []*SkillData `protobuf:"bytes,9,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能 Property map[string]int32 `protobuf:"bytes,10,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 属性相关 AddProperty map[string]int32 `protobuf:"bytes,11,rep,name=addProperty,proto3" json:"addProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"addProperty"` //附加属性相关 - Formation int32 `protobuf:"varint,12,opt,name=formation,proto3" json:"formation"` // 阵型类型 - CardType int32 `protobuf:"varint,13,opt,name=cardType,proto3" json:"cardType" bson:"cardType"` //卡片类型(升星卡、经验卡、技能升级卡) - CurSkin int32 `protobuf:"varint,14,opt,name=curSkin,proto3" json:"curSkin" bson:"curSkin"` //当前装备的皮肤ID - Skins []int32 `protobuf:"varint,15,rep,packed,name=skins,proto3" json:"skins"` // 所有皮肤ID - Block bool `protobuf:"varint,16,opt,name=block,proto3" json:"block"` // 锁定 - EquipID []string `protobuf:"bytes,17,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID - ResonateNum int32 `protobuf:"varint,18,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数 - DistributionResonate int32 `protobuf:"varint,19,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量 - Energy map[int32]int32 `protobuf:"bytes,20,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[1,0] - SameCount int32 `protobuf:"varint,21,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量 - SuiteId int32 `protobuf:"varint,22,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id - SuiteExtId int32 `protobuf:"varint,23,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id - IsOverlying bool `protobuf:"varint,24,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true + CardType int32 `protobuf:"varint,12,opt,name=cardType,proto3" json:"cardType" bson:"cardType"` //卡片类型(升星卡、经验卡、技能升级卡) + CurSkin int32 `protobuf:"varint,13,opt,name=curSkin,proto3" json:"curSkin" bson:"curSkin"` //当前装备的皮肤ID + Skins []int32 `protobuf:"varint,14,rep,packed,name=skins,proto3" json:"skins"` // 所有皮肤ID + Block bool `protobuf:"varint,15,opt,name=block,proto3" json:"block"` // 锁定 + EquipID []string `protobuf:"bytes,16,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID + ResonateNum int32 `protobuf:"varint,17,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数 + DistributionResonate int32 `protobuf:"varint,18,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量 + Energy map[int32]int32 `protobuf:"bytes,19,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[1,0] + SameCount int32 `protobuf:"varint,20,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量 + SuiteId int32 `protobuf:"varint,21,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id + SuiteExtId int32 `protobuf:"varint,22,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id + IsOverlying bool `protobuf:"varint,23,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true } func (x *DBHero) Reset() { @@ -215,13 +214,6 @@ func (x *DBHero) GetAddProperty() map[string]int32 { return nil } -func (x *DBHero) GetFormation() int32 { - if x != nil { - return x.Formation - } - return 0 -} - func (x *DBHero) GetCardType() int32 { if x != nil { return x.CardType @@ -314,7 +306,7 @@ var file_hero_hero_db_proto_rawDesc = []byte{ 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, 0xa6, 0x07, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, + 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x88, 0x07, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, @@ -336,44 +328,42 @@ var file_hero_hero_db_proto_rawDesc = []byte{ 0x74, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 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, - 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x73, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x69, - 0x74, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x45, 0x78, 0x74, - 0x49, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x45, - 0x78, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x79, - 0x69, 0x6e, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4f, 0x76, 0x65, - 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0c, 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, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, + 0x72, 0x53, 0x6b, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x18, 0x0e, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x18, 0x10, 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, 0x11, 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, 0x12, 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, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x13, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, + 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, + 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x45, + 0x78, 0x74, 0x49, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x69, 0x74, + 0x65, 0x45, 0x78, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x4f, 0x76, 0x65, 0x72, + 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x4f, + 0x76, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index b88b7b999..c765af553 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -1537,6 +1537,100 @@ func (x *HeroDelHeroPush) GetHeros() map[string]int32 { return nil } +type HeroDrawReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DrawCount int32 `protobuf:"varint,1,opt,name=drawCount,proto3" json:"drawCount"` // 抽卡次数, 只能是单抽和十抽 +} + +func (x *HeroDrawReq) Reset() { + *x = HeroDrawReq{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeroDrawReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeroDrawReq) ProtoMessage() {} + +func (x *HeroDrawReq) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[29] + 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 HeroDrawReq.ProtoReflect.Descriptor instead. +func (*HeroDrawReq) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{29} +} + +func (x *HeroDrawReq) GetDrawCount() int32 { + if x != nil { + return x.DrawCount + } + return 0 +} + +type HeroDrawResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Heroes []*DBHero `protobuf:"bytes,1,rep,name=heroes,proto3" json:"heroes"` +} + +func (x *HeroDrawResp) Reset() { + *x = HeroDrawResp{} + if protoimpl.UnsafeEnabled { + mi := &file_hero_hero_msg_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeroDrawResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeroDrawResp) ProtoMessage() {} + +func (x *HeroDrawResp) ProtoReflect() protoreflect.Message { + mi := &file_hero_hero_msg_proto_msgTypes[30] + 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 HeroDrawResp.ProtoReflect.Descriptor instead. +func (*HeroDrawResp) Descriptor() ([]byte, []int) { + return file_hero_hero_msg_proto_rawDescGZIP(), []int{30} +} + +func (x *HeroDrawResp) GetHeroes() []*DBHero { + if x != nil { + return x.Heroes + } + return nil +} + var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ @@ -1686,8 +1780,14 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x68, 0x65, 0x72, 0x6f, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x2b, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x12, 0x1c, + 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x0c, + 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x06, + 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, + 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1702,7 +1802,7 @@ 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, 33) +var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 35) var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroInfoReq)(nil), // 0: HeroInfoReq (*HeroInfoResp)(nil), // 1: HeroInfoResp @@ -1733,38 +1833,41 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroGetSpecifiedReq)(nil), // 26: HeroGetSpecifiedReq (*HeroGetSpecifiedResp)(nil), // 27: HeroGetSpecifiedResp (*HeroDelHeroPush)(nil), // 28: HeroDelHeroPush - nil, // 29: HeroStrengthenUplvReq.ExpCardsEntry - nil, // 30: HeroPropertyPush.PropertyEntry - nil, // 31: HeroPropertyPush.AddPropertyEntry - nil, // 32: HeroDelHeroPush.HerosEntry - (*DBHero)(nil), // 33: DBHero + (*HeroDrawReq)(nil), // 29: HeroDrawReq + (*HeroDrawResp)(nil), // 30: HeroDrawResp + nil, // 31: HeroStrengthenUplvReq.ExpCardsEntry + nil, // 32: HeroPropertyPush.PropertyEntry + nil, // 33: HeroPropertyPush.AddPropertyEntry + nil, // 34: HeroDelHeroPush.HerosEntry + (*DBHero)(nil), // 35: DBHero } var file_hero_hero_msg_proto_depIdxs = []int32{ - 33, // 0: HeroInfoResp.base:type_name -> DBHero - 33, // 1: HeroListResp.list:type_name -> DBHero - 29, // 2: HeroStrengthenUplvReq.expCards:type_name -> HeroStrengthenUplvReq.ExpCardsEntry - 33, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero + 35, // 0: HeroInfoResp.base:type_name -> DBHero + 35, // 1: HeroListResp.list:type_name -> DBHero + 31, // 2: HeroStrengthenUplvReq.expCards:type_name -> HeroStrengthenUplvReq.ExpCardsEntry + 35, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero 7, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData 7, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData - 33, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero - 33, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero - 33, // 8: HeroResonanceResp.hero:type_name -> DBHero - 33, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero - 33, // 10: HeroResonanceResetResp.hero:type_name -> DBHero - 33, // 11: HeroResonanceUseEnergyResp.hero:type_name -> DBHero - 33, // 12: HeroAwakenResp.hero:type_name -> DBHero - 33, // 13: HeroChoukaResp.heroes:type_name -> DBHero - 30, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry - 31, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry - 33, // 16: HeroLockResp.hero:type_name -> DBHero - 33, // 17: HeroAddNewHeroPush.hero:type_name -> DBHero - 33, // 18: HeroGetSpecifiedResp.hero:type_name -> DBHero - 32, // 19: HeroDelHeroPush.heros:type_name -> HeroDelHeroPush.HerosEntry - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 35, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero + 35, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero + 35, // 8: HeroResonanceResp.hero:type_name -> DBHero + 35, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero + 35, // 10: HeroResonanceResetResp.hero:type_name -> DBHero + 35, // 11: HeroResonanceUseEnergyResp.hero:type_name -> DBHero + 35, // 12: HeroAwakenResp.hero:type_name -> DBHero + 35, // 13: HeroChoukaResp.heroes:type_name -> DBHero + 32, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry + 33, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry + 35, // 16: HeroLockResp.hero:type_name -> DBHero + 35, // 17: HeroAddNewHeroPush.hero:type_name -> DBHero + 35, // 18: HeroGetSpecifiedResp.hero:type_name -> DBHero + 34, // 19: HeroDelHeroPush.heros:type_name -> HeroDelHeroPush.HerosEntry + 35, // 20: HeroDrawResp.heroes:type_name -> DBHero + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_hero_hero_msg_proto_init() } @@ -2122,6 +2225,30 @@ func file_hero_hero_msg_proto_init() { return nil } } + file_hero_hero_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeroDrawReq); 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[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeroDrawResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2129,7 +2256,7 @@ func file_hero_hero_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 33, + NumMessages: 35, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/proto/errorcode.proto b/pb/proto/errorcode.proto index 974a1ed31..763cea068 100644 --- a/pb/proto/errorcode.proto +++ b/pb/proto/errorcode.proto @@ -72,6 +72,8 @@ enum ErrorCode { HeroTypeErr = 1317; // 升级英雄类型不对 HeroExpTypeErr = 1318; // 技能升级卡类型不对 HeroAddMaxExp = 1319; // 升级经验卡溢出 检查传入的数量 + HeroStarLvErr = 1320; // 升星等级不够 + HeroMaxStarLv = 1321; // 达到最大升星等级 // equipment EquipmentOnFoundEquipment = 1400; // 未找到武器 diff --git a/pb/proto/hero/hero_db.proto b/pb/proto/hero/hero_db.proto index 0a12ead31..fd36e2976 100644 --- a/pb/proto/hero/hero_db.proto +++ b/pb/proto/hero/hero_db.proto @@ -17,21 +17,17 @@ message DBHero { 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; // @go_tags(`bson:"energy"`)能量分配到哪里[1,0] - int32 sameCount = 21; // @go_tags(`bson:"sameCount"`) 卡片叠加数量 - int32 suiteId = 22; //@go_tags(`bson:"suiteId"`) 套装Id - int32 suiteExtId = 23; // go_tags(`bson:"suiteExtId"`) 扩展套装Id - bool isOverlying = 24; // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true + map addProperty = 11; //@go_tags(`bson:"addProperty"`) 附加属性相关 + int32 cardType = 12; //@go_tags(`bson:"cardType"`) 卡片类型(升星卡、经验卡、技能升级卡) + int32 curSkin = 13; //@go_tags(`bson:"curSkin"`) 当前装备的皮肤ID + repeated int32 skins = 14; // 所有皮肤ID + bool block = 15; // 锁定 + repeated string equipID = 16; //@go_tags(`bson:"equipID"`) 装备 objID + int32 resonateNum = 17; //@go_tags(`bson:"resonateNum"`) 共鸣次数 + int32 distributionResonate = 18; //@go_tags(`bson:"distributionResonate"`) 分配的共鸣能量 + map energy = 19; // @go_tags(`bson:"energy"`)能量分配到哪里[1,0] + int32 sameCount = 20; // @go_tags(`bson:"sameCount"`) 卡片叠加数量 + int32 suiteId = 21; //@go_tags(`bson:"suiteId"`) 套装Id + int32 suiteExtId = 22; // go_tags(`bson:"suiteExtId"`) 扩展套装Id + bool isOverlying = 23; // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true } \ No newline at end of file diff --git a/pb/proto/hero/hero_msg.proto b/pb/proto/hero/hero_msg.proto index ae1a45efd..7131cb88d 100644 --- a/pb/proto/hero/hero_msg.proto +++ b/pb/proto/hero/hero_msg.proto @@ -143,4 +143,10 @@ message HeroGetSpecifiedResp { message HeroDelHeroPush { map heros = 1; -} \ No newline at end of file +} + +message HeroDrawReq { + int32 drawCount = 1; // 抽卡次数, 只能是单抽和十抽 +} + +message HeroDrawResp { repeated DBHero heroes = 1; } \ No newline at end of file