技能升级 请求参数支持一次消耗多个技能卡

This commit is contained in:
meixiongfeng 2022-08-03 14:05:06 +08:00
parent e54b34c550
commit 5277ca09cf
3 changed files with 139 additions and 121 deletions

View File

@ -11,7 +11,7 @@ import (
//参数校验
func (this *apiComp) StrengthenUpSkillCheck(session comm.IUserSession, req *pb.HeroStrengthenUpSkillReq) (code pb.ErrorCode) {
if req.HeroObjID == "" || req.CostCardObj == "" {
if req.HeroObjID == "" || len(req.CostCardObj) == 0 {
code = pb.ErrorCode_ReqParameterError
return
}
@ -28,103 +28,119 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
totalprobability int32 // 所有技能总权重
tmpValue int32 // 临时对象 存放累加权重
tagColor int32 // 目标卡品质
costColor int32 // 消耗卡品质
_hero *pb.DBHero // 操作的英雄
_costHero *pb.DBHero // 消耗的英雄
ChangeList []*pb.DBHero // 推送 改变的英雄
_hero *pb.DBHero // 操作的英雄
ChangeList []*pb.DBHero // 推送 改变的英雄
mapCostHero map[string]int32 // 消耗的技能卡
mapCostObj map[string]*pb.DBHero // 消耗的技能卡对象
)
mapCostHero = make(map[string]int32, 0)
mapCostObj = make(map[string]*pb.DBHero, 0)
ChangeList = make([]*pb.DBHero, 0)
tmpUpSkillID = make(map[int32]*pb.SkillData, 0)
probability = make(map[int32]int32, 0)
code = this.StrengthenUpSkillCheck(session, req) // check
if code != pb.ErrorCode_Success {
return
}
_hero, code = this.module.GetHeroByObjID(session.GetUserId(), req.HeroObjID) // 查询目标卡是否存在
if code != pb.ErrorCode_Success {
return
}
_costHero, code = this.module.GetHeroByObjID(session.GetUserId(), req.CostCardObj) // 查询消耗卡是否存在
if code != pb.ErrorCode_Success {
return
}
if _costHero.Block { // 锁定的卡不允许被消耗
code = pb.ErrorCode_HeroIsLock
return
}
// 查询配置表 找出原始品质
tmp := this.module.configure.GetHero(_hero.HeroID)
if tmp == nil {
heroCfg := this.module.configure.GetHero(_hero.HeroID)
if heroCfg == nil {
code = pb.ErrorCode_HeroNoExist
return
}
tagColor = tmp.Color
tmp = this.module.configure.GetHero(_costHero.HeroID)
if tmp == nil {
code = pb.ErrorCode_HeroNoExist
return
tagColor = heroCfg.Color
for _, v := range req.CostCardObj { // 数组转 map
mapCostHero[v]++
}
if tmp.Type != comm.CardTypeSkill {
code = pb.ErrorCode_HeroTypeErr
return
}
costColor = tmp.Color
if costColor != tagColor {
code = pb.ErrorCode_HeroColorErr
return
}
config, err1 := this.module.configure.GetHeroSkillUpConfig()
if err1 != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
for index, skill := range _hero.NormalSkill {
skillMaxLv := this.module.configure.GetHeroSkillMaxLvConfig(uint32(skill.SkillID))
if skill.SkillLv < skillMaxLv { // 找到没有满级的技能id
tmpUpSkillID[int32(index)] = skill
for k, v := range mapCostHero {
costHero, c := this.module.GetHeroByObjID(session.GetUserId(), k) // 查询消耗卡是否存在
if c != pb.ErrorCode_Success {
code = c
return
}
if costHero.Block { // 锁定的卡不允许被消耗
code = pb.ErrorCode_HeroIsLock
return
}
if costHero.SameCount < v { // 数量校验
code = pb.ErrorCode_HeroNoEnough
return
}
tmp := this.module.configure.GetHero(costHero.HeroID) // 星级校验
if tmp.Color != tagColor {
code = pb.ErrorCode_HeroColorErr
return
}
if tmp.Type != comm.CardTypeSkill { // 查看是不是升级卡
code = pb.ErrorCode_HeroTypeErr
return
}
mapCostObj[k] = costHero
}
// 获取权重
for k, v := range tmpUpSkillID {
for _, v2 := range config.GetDataList() {
if v2.Hid == _hero.HeroID && (k+1) == v2.Skillpos && v.SkillLv == v2.Skilllevel {
probability[k] = v2.Probability // 设置权重
for range req.CostCardObj { // 升级技能
config, err1 := this.module.configure.GetHeroSkillUpConfig()
if err1 != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
for index, skill := range _hero.NormalSkill {
skillMaxLv := this.module.configure.GetHeroSkillMaxLvConfig(uint32(skill.SkillID))
if skill.SkillLv < skillMaxLv { // 找到没有满级的技能id
tmpUpSkillID[int32(index)] = skill
}
}
}
// 根据权重升级对应的技能
for _, v := range probability {
totalprobability += v
}
if totalprobability == 0 {
code = pb.ErrorCode_HeroSkillUpErr //技能升级失败
return
}
n, _ := rand.Int(rand.Reader, big.NewInt(int64(totalprobability)))
for k, v := range probability {
tmpValue += v
if int32(n.Int64()) < tmpValue { // 找到了
upSkillPos = k
break
if len(tmpUpSkillID) == 0 {
code = pb.ErrorCode_HeroMaxSkillLv
return
}
}
for index, skill := range _hero.NormalSkill {
if int32(index) == upSkillPos { // 找到指定位置技能并升级
skill.SkillLv += 1
break
probability = make(map[int32]int32, 0)
// 获取权重
for k, v := range tmpUpSkillID {
for _, v2 := range config.GetDataList() {
if v2.Hid == _hero.HeroID && (k+1) == v2.Skillpos && v.SkillLv == v2.Skilllevel {
probability[k] = v2.Probability // 设置权重
}
}
}
}
totalprobability = 0
// 根据权重升级对应的技能
for _, v := range probability {
totalprobability += v
}
if totalprobability == 0 {
code = pb.ErrorCode_HeroSkillUpErr //技能升级失败
return
}
n, _ := rand.Int(rand.Reader, big.NewInt(int64(totalprobability)))
// 扣除材料
code = this.module.DelCard(session.GetUserId(), _costHero, 1)
if code != pb.ErrorCode_Success {
return
for k, v := range probability {
tmpValue += v
if int32(n.Int64()) < tmpValue { // 找到了
upSkillPos = k
break
}
}
for index, skill := range _hero.NormalSkill {
if int32(index) == upSkillPos { // 找到指定位置技能并升级
skill.SkillLv += 1
break
}
}
}
for k, v := range mapCostObj {
code = this.module.DelCard(session.GetUserId(), v, mapCostHero[k])
if code != pb.ErrorCode_Success {
return
}
ChangeList = append(ChangeList, v)
}
// 堆叠情况
if _hero.SameCount > 1 {
@ -138,17 +154,15 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
"sameCount": 1,
}
_hero.SameCount = 1
err1 = this.module.modelHero.ChangeList(session.GetUserId(), req.HeroObjID, _heroMap) // 修改英雄信息
err1 := this.module.modelHero.ChangeList(session.GetUserId(), req.HeroObjID, _heroMap) // 修改英雄信息
if err1 != nil {
this.module.Errorf("update hero skill failed:%v", err1)
code = pb.ErrorCode_DBError
return
}
ChangeList = append(ChangeList, _costHero)
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: ChangeList})
this.module.modelHero.ChangeHeroProperty(session, _hero) // 推送属性变化
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}})
ChangeList = append(ChangeList, _hero)
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: ChangeList})
session.SendMsg(string(this.module.GetType()), StrengthenUpSkill, &pb.HeroStrengthenUpSkillResp{Hero: _hero})
return
}

View File

@ -103,6 +103,7 @@ const (
ErrorCode_HeroStarLvErr ErrorCode = 1320 // 升星等级不够
ErrorCode_HeroMaxStarLv ErrorCode = 1321 // 达到最大升星等级
ErrorCode_DrawCardTypeNotFound ErrorCode = 1322 // 抽卡类型不匹配
ErrorCode_HeroMaxSkillLv ErrorCode = 1323 // 达到最大技能等级
// equipment
ErrorCode_EquipmentOnFoundEquipment ErrorCode = 1400 // 未找到武器
ErrorCode_EquipmentLvlimitReached ErrorCode = 1401 // 武器等级已达上限
@ -213,6 +214,7 @@ var (
1320: "HeroStarLvErr",
1321: "HeroMaxStarLv",
1322: "DrawCardTypeNotFound",
1323: "HeroMaxSkillLv",
1400: "EquipmentOnFoundEquipment",
1401: "EquipmentLvlimitReached",
1402: "EquipmentIsWorn",
@ -315,6 +317,7 @@ var (
"HeroStarLvErr": 1320,
"HeroMaxStarLv": 1321,
"DrawCardTypeNotFound": 1322,
"HeroMaxSkillLv": 1323,
"EquipmentOnFoundEquipment": 1400,
"EquipmentLvlimitReached": 1401,
"EquipmentIsWorn": 1402,
@ -373,7 +376,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, 0xc6, 0x10, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xdb, 0x10, 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,
@ -471,42 +474,43 @@ var file_errorcode_proto_rawDesc = []byte{
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, 0x19, 0x0a, 0x14, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65,
0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 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, 0x14, 0x0a, 0x0f, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x73, 0x57, 0x6f, 0x72, 0x6e, 0x10, 0xfa, 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, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e,
0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x4d, 0x61,
0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe0, 0x0b, 0x12,
0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
0x65, 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe1, 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, 0x12, 0x11, 0x0a,
0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xc9, 0x0c,
0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10,
0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75,
0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f,
0x64, 0x73, 0x49, 0x73, 0x53, 0x6f, 0x6c, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xa4, 0x0d, 0x12, 0x1c,
0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12, 0x0c, 0x0a, 0x07,
0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72, 0x72, 0x10, 0x88, 0x0e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48,
0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x10, 0xab, 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, 0x14,
0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x73, 0x57, 0x6f, 0x72,
0x6e, 0x10, 0xfa, 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, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e,
0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xde, 0x0b, 0x12,
0x18, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x65, 0x4e, 0x6f,
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72,
0x64, 0x10, 0xe0, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe1,
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, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x10, 0xc9, 0x0c, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x10, 0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4e,
0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68,
0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x73, 0x53, 0x6f, 0x6c, 0x64, 0x4f, 0x75, 0x74,
0x10, 0xa4, 0x0d, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x6f, 0x53, 0x75, 0x72,
0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x10, 0xa5,
0x0d, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72, 0x72, 0x10, 0x88, 0x0e, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -588,8 +588,8 @@ type HeroStrengthenUpSkillReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
CostCardObj string `protobuf:"bytes,2,opt,name=costCardObj,proto3" json:"costCardObj"` // 消耗技能升级卡
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
CostCardObj []string `protobuf:"bytes,2,rep,name=costCardObj,proto3" json:"costCardObj"` // 消耗技能升级卡
}
func (x *HeroStrengthenUpSkillReq) Reset() {
@ -631,11 +631,11 @@ func (x *HeroStrengthenUpSkillReq) GetHeroObjID() string {
return ""
}
func (x *HeroStrengthenUpSkillReq) GetCostCardObj() string {
func (x *HeroStrengthenUpSkillReq) GetCostCardObj() []string {
if x != nil {
return x.CostCardObj
}
return ""
return nil
}
// 卡牌技能升级返回
@ -1685,7 +1685,7 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
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,
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62,
0x6a, 0x22, 0x38, 0x0a, 0x19, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b,
0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44,