From 56a013a5c4caa308ebe211928646cac7b86461aa Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 21 Jul 2022 16:04:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=B6=88=E6=81=AF=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/comp_model.go | 26 +++ modules/hero/api_resonance.go | 15 +- modules/hero/api_strengthenUpSkill.go | 9 +- modules/hero/api_strengthenUpStar.go | 42 +++- modules/hero/api_strengthenUplv.go | 10 +- modules/hero/model_hero.go | 60 ++---- modules/hero/module.go | 14 +- modules/modulebase.go | 11 +- pb/hero_msg.pb.go | 291 +++++++------------------- pb/mainline_msg.pb.go | 39 ++-- pb/proto/hero/hero_msg.proto | 10 - pb/proto/mainline/mainline_msg.proto | 1 - 12 files changed, 194 insertions(+), 334 deletions(-) diff --git a/modules/comp_model.go b/modules/comp_model.go index ece4fd735..5264280ae 100644 --- a/modules/comp_model.go +++ b/modules/comp_model.go @@ -641,3 +641,29 @@ func (this *MCompModel) logOpt(uid string, data interface{}, attrs ...*cache.Ope } return nil } + +//获取用户通过扩展表 +func (this *MCompModel) GetUserRecord(uid string) (result *pb.DBUserRecord, err error) { + result = &pb.DBUserRecord{} + key := fmt.Sprintf("userrecord:%s", uid) + if err = this.Redis.HGetAll(key, result); err != nil && err != redis.RedisNil { + return + } + if err == redis.RedisNil { + if err = this.DB.FindOne(core.SqlTable("userrecord"), bson.M{"uid": uid}).Decode(result); err != nil { + return + } + err = this.Redis.HMSet(key, result) + } + return +} + +//修改用户扩展数据 +func (this *MCompModel) ChangeUserRecord(uid string, value map[string]interface{}) (err error) { + key := fmt.Sprintf("userrecord:%s", uid) + if err = this.Redis.HMSet(key, value); err != nil && err != redis.RedisNil { + return + } + err = this.UpdateModelLogs("userrecord", uid, bson.M{"uid": uid}, value) + return +} diff --git a/modules/hero/api_resonance.go b/modules/hero/api_resonance.go index e2f892e52..e47a0d605 100644 --- a/modules/hero/api_resonance.go +++ b/modules/hero/api_resonance.go @@ -25,7 +25,9 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR totalCostCard int32 //消耗卡总数量 _hero *pb.DBHero _costHero *pb.DBHero + changeHero []*pb.DBHero // 变化的英雄数据 ) + changeHero = make([]*pb.DBHero, 0) szCostHero = make(map[string]int32, 0) code = this.ResonanceCheck(session, req) // check if code != pb.ErrorCode_Success { @@ -80,11 +82,13 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR code = pb.ErrorCode_HeroNoEnough // 消耗数量不对应 return } - for _, v := range req.CostObjID { - code = this.module.DelCard(session.GetUserId(), v, 1) // 删除材料卡 - if code != pb.ErrorCode_Success { + for k, v := range szCostHero { + _delhero, c := this.module.DelCard(session.GetUserId(), k, v) + if c != pb.ErrorCode_Success { + code = c return } + changeHero = append(changeHero, _delhero) } resonConfig, err1 := this.module.configure.GetHeroResonanceConfig(_hero.HeroID) @@ -123,11 +127,12 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR } } - session.SendMsg(string(this.module.GetType()), "delhero", &pb.HeroDelHeroPush{Heros: szCostHero}) // 推送删除的英雄 - err1 = this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 + err1 = this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 if err1 != nil { this.module.Errorf("PushHeroProperty err!") } + + session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: changeHero}) session.SendMsg(string(this.module.GetType()), Resonance, &pb.HeroResonanceResp{Hero: _hero}) return } diff --git a/modules/hero/api_strengthenUpSkill.go b/modules/hero/api_strengthenUpSkill.go index 7131cf199..11f6322d3 100644 --- a/modules/hero/api_strengthenUpSkill.go +++ b/modules/hero/api_strengthenUpSkill.go @@ -125,14 +125,13 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt return } // 扣除材料 - code = this.module.DelCard(session.GetUserId(), req.CostCardObj, 1) - if code != pb.ErrorCode_Success { + delcard, c := this.module.DelCard(session.GetUserId(), req.CostCardObj, 1) + if c != pb.ErrorCode_Success { code = pb.ErrorCode_DBError return } - - session.SendMsg(string(this.module.GetType()), "delhero", &pb.HeroDelHeroPush{Heros: map[string]int32{req.CostCardObj: 1}}) // 推送删除的英雄 - err1 = this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 + session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: []*pb.DBHero{delcard}}) + err1 = this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 if err1 != nil { this.module.Errorf("PushHeroProperty err!") } diff --git a/modules/hero/api_strengthenUpStar.go b/modules/hero/api_strengthenUpStar.go index 82669d2f7..20f337158 100644 --- a/modules/hero/api_strengthenUpStar.go +++ b/modules/hero/api_strengthenUpStar.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" + "math" "google.golang.org/protobuf/proto" ) @@ -41,6 +42,7 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr mapCostHero map[string]int32 // 所有消耗英雄分类 bCheckNeedhero bool // 指定英雄校验 bCheckRacehero bool // 种族英雄校验 + chanegCard []*pb.DBHero // 变化的英雄数据 ) mapCostHero = make(map[string]int32, 0) for _, v := range req.Hero { @@ -143,18 +145,48 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr return } for k, v := range mapCostHero { - code = this.module.DelCard(session.GetUserId(), k, v) - if code != pb.ErrorCode_Success { + _delcard, c := this.module.DelCard(session.GetUserId(), k, v) + if c != pb.ErrorCode_Success { code = pb.ErrorCode_DBError this.module.Errorf("del hero err card:%s,count = %d", k, v) return } + chanegCard = append(chanegCard, _delcard) } - session.SendMsg(string(this.module.GetType()), "delhero", &pb.HeroDelHeroPush{Heros: mapCostHero}) - code = this.module.modelHero.HeroStarUp(session, _hero) // 执行升星操作 - if code != pb.ErrorCode_Success { + + _heroMap := map[string]interface{}{ + "star": _hero.Star + 1, + "isOverlying": false, + } + // 触发星级任务 + this.module.ModuleTask.SendToTask(session.GetUserId(), comm.TaskTypeGetHero, &pb.TaskParam{First: _hero.Star + 1}) + // 保存数据 + err1 = this.module.modelHero.modifyHeroData(session.GetUserId(), _hero.Id, _heroMap) + if err1 != nil { + code = pb.ErrorCode_DBError + this.module.Errorf("update hero skill failed:%v", err1) + } + // 计算属性 + data1 := make(map[string]int32, 0) + newConfig := this.module.configure.GetHeroStar(_hero.Star - 1) + if newConfig == nil { + + code = pb.ErrorCode_ConfigurationException return } + + data1[comm.Hp] = int32(math.Floor((1.0 + float64(newConfig.StarupHp)) * float64(_hero.Property[comm.Hp]) / 100)) + data1[comm.Atk] = int32(math.Floor((1.0 + float64(newConfig.StarupAtk)) * float64(_hero.Property[comm.Atk]) / 100)) + data1[comm.Def] = int32(math.Floor((1.0 + float64(newConfig.StarupDef)) * float64(_hero.Property[comm.Def]) / 100)) + data1[comm.Speed] = int32(math.Floor((1.0 + float64(newConfig.StarupSpeed)) * float64(_hero.Property[comm.Speed]) / 100)) + this.module.modelHero.mergeMainProperty(session.GetUserId(), _hero.Id, data1) + + err1 = this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 + if err1 != nil { + code = pb.ErrorCode_Unknown + this.module.Errorf("PushHeroProperty err!") + } + session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: chanegCard}) session.SendMsg(string(this.module.GetType()), StrengthenUpStar, &pb.HeroStrengthenUpStarResp{Hero: _hero}) return } diff --git a/modules/hero/api_strengthenUplv.go b/modules/hero/api_strengthenUplv.go index 6d6ae7f09..3f6a52376 100644 --- a/modules/hero/api_strengthenUplv.go +++ b/modules/hero/api_strengthenUplv.go @@ -34,6 +34,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren _hero *pb.DBHero // 目标英雄 _expHero *pb.DBHero // 消耗英雄 minAddExp int32 + _costHero []*pb.DBHero // 删除的英雄 ) code = this.StrengthenUplvCheck(session, req) // check @@ -160,21 +161,22 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren // 删除经验卡 for k, v := range req.ExpCards { - err1 := this.module.modelHero.consumeHeroCard(session.GetUserId(), k, v) + costHero, err1 := this.module.modelHero.consumeHeroCard(session.GetUserId(), k, v) if err1 != nil { code = pb.ErrorCode_HeroNoEnough this.module.Errorf("delete err failed err:%T!", err1) return } + _costHero = append(_costHero, costHero) } - - session.SendMsg(string(this.module.GetType()), "delhero", &pb.HeroDelHeroPush{Heros: req.ExpCards}) // 推送删除的英雄 - err1 := this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 + session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: _costHero}) + err1 := this.module.modelHero.PushHeroProperty(session, _hero.Id) // 推送属性变化 if err1 != nil { this.module.Errorf("PushHeroProperty err!") } _hero.Lv = curLv _hero.Exp = curExp + session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero}) return } diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index e8f18ad88..e78e56a9a 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -195,27 +195,29 @@ func (this *ModelHero) getOneHero(uid, heroId string) *pb.DBHero { } //消耗英雄卡 -func (this *ModelHero) consumeHeroCard(uid, heroId string, count int32) (err error) { +func (this *ModelHero) consumeHeroCard(uid, heroId string, count int32) (hero *pb.DBHero, err error) { if count == 0 { return } - hero := this.getOneHero(uid, heroId) + hero = this.getOneHero(uid, heroId) if hero == nil { - return errors.New("hero no exist") + err = errors.New("hero no exist") + return } if hero.SameCount < count { - return errors.New("hero card no enough") + err = errors.New("hero card no enough") + return } - - if hero.SameCount-count == 0 { + hero.SameCount -= count + if hero.SameCount == 0 { if err := this.moduleHero.modelHero.DelListlds(uid, heroId); err != nil { this.moduleHero.Errorf("%v", err) } } else { update := map[string]interface{}{ - "sameCount": hero.SameCount - count, + "sameCount": hero.SameCount, } err = this.modifyHeroData(uid, heroId, update) } @@ -292,7 +294,10 @@ func (this *ModelHero) setEquipment(hero *pb.DBHero) (newHero *pb.DBHero, err er update["equipID"] = hero.EquipID update["isoverlying"] = false } - + // 打印 + for _, v := range hero.EquipID { + this.moduleHero.Debugf("设置装备%s\n", v) + } this.modifyHeroData(hero.Uid, hero.Id, update) return } @@ -409,45 +414,6 @@ func (this *ModelHero) PushHeroProperty(session comm.IUserSession, heroId string } return session.SendMsg("hero", "property", &pb.HeroPropertyPush{Property: m}) } - -// 英雄升星 -func (this *ModelHero) HeroStarUp(session comm.IUserSession, hero *pb.DBHero) (code pb.ErrorCode) { - - _heroMap := map[string]interface{}{ - "star": hero.Star + 1, - "isOverlying": false, - } - // 触发星级任务 - this.moduleHero.ModuleTask.SendToTask(session.GetUserId(), comm.TaskTypeGetHero, &pb.TaskParam{First: hero.Star + 1}) - // 保存数据 - err1 := this.modifyHeroData(session.GetUserId(), hero.Id, _heroMap) - if err1 != nil { - code = pb.ErrorCode_DBError - this.moduleHero.Errorf("update hero skill failed:%v", err1) - } - // 计算属性 - data := make(map[string]int32, 0) - newConfig := this.moduleHero.configure.GetHeroStar(hero.Star - 1) - if newConfig == nil { - - code = pb.ErrorCode_ConfigurationException - return - } - - data[comm.Hp] = int32(math.Floor((1.0 + float64(newConfig.StarupHp)) * float64(hero.Property[comm.Hp]) / 100)) - data[comm.Atk] = int32(math.Floor((1.0 + float64(newConfig.StarupAtk)) * float64(hero.Property[comm.Atk]) / 100)) - data[comm.Def] = int32(math.Floor((1.0 + float64(newConfig.StarupDef)) * float64(hero.Property[comm.Def]) / 100)) - data[comm.Speed] = int32(math.Floor((1.0 + float64(newConfig.StarupSpeed)) * float64(hero.Property[comm.Speed]) / 100)) - this.mergeMainProperty(session.GetUserId(), hero.Id, data) - - err1 = this.PushHeroProperty(session, hero.Id) // 推送属性变化 - if err1 != nil { - code = pb.ErrorCode_Unknown - this.moduleHero.Errorf("PushHeroProperty err!") - } - return -} - func (this *ModelHero) cleanData(uid string) { userList := this.moduleHero.GetHeroList(uid) for _, v := range userList { diff --git a/modules/hero/module.go b/modules/hero/module.go index f400642ad..f7e553599 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -76,14 +76,12 @@ func (this *Hero) UpdateEquipment(session comm.IUserSession, hero *pb.DBHero, eq list = append(list, hero) session.SendMsg("hero", "change", &pb.HeroChangePush{List: list}) } - this.modelHero.setEquipProperty(hero, equip) - err1 := this.modelHero.PushHeroProperty(session, hero.Id) // 推送属性变化 if err1 != nil { code = pb.ErrorCode_Unknown this.Errorf("PushHeroProperty err!") } - + this.modelHero.setEquipProperty(hero, equip) return } @@ -180,10 +178,14 @@ func (this *Hero) AddCardExp(uid string, heroId string, exp int32) (code pb.Erro } // 删除指定卡牌 -func (this *Hero) DelCard(udi string, cardid string, amount int32) (code pb.ErrorCode) { - err := this.modelHero.consumeHeroCard(udi, cardid, amount) +func (this *Hero) DelCard(udi string, cardid string, amount int32) (hero *pb.DBHero, code pb.ErrorCode) { + var ( + err error + ) + hero, err = this.modelHero.consumeHeroCard(udi, cardid, amount) if err != nil { - return pb.ErrorCode_DBError + code = pb.ErrorCode_DBError + return } return } diff --git a/modules/modulebase.go b/modules/modulebase.go index 36be3cf8c..357de0361 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -278,17 +278,10 @@ func (this *ModuleBase) DispenseRes(session comm.IUserSession, res []*cfg.Game_a hero, err := this.ModuleHero.CreateRepeatHero(session.GetUserId(), int32(resID), v.N) if err != nil { code = pb.ErrorCode_HeroMaxCount + return } - // 创建英雄成功 向客户端推送数据 - session.SendMsg("hero", "addnewhero", &pb.HeroAddNewHeroPush{Hero: hero, Count: v.N}) - // if bPush { - // if session, ok := this.GetUserSession(uid); ok { - // session.SendMsg("hero", "addnewhero", &pb.HeroAddNewHeroPush{Hero: hero, Count: v.N}) - // err = session.Push() - // } - // } - + session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{hero}}) } else if v.A == comm.EquipmentType { resID, _ = strconv.Atoi(v.T) code = this.ModuleEquipment.AddNewEquipments(source, session, map[int32]uint32{int32(resID): uint32(v.N)}, bPush) diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 8475f2462..0d1138cd7 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -1315,62 +1315,6 @@ func (x *HeroLockResp) GetHero() *DBHero { return nil } -// 增加新英雄推送 -type HeroAddNewHeroPush struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hero *DBHero `protobuf:"bytes,1,opt,name=hero,proto3" json:"hero"` // 英雄对象 - Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count"` //数量 -} - -func (x *HeroAddNewHeroPush) Reset() { - *x = HeroAddNewHeroPush{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroAddNewHeroPush) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroAddNewHeroPush) ProtoMessage() {} - -func (x *HeroAddNewHeroPush) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[25] - 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 HeroAddNewHeroPush.ProtoReflect.Descriptor instead. -func (*HeroAddNewHeroPush) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{25} -} - -func (x *HeroAddNewHeroPush) GetHero() *DBHero { - if x != nil { - return x.Hero - } - return nil -} - -func (x *HeroAddNewHeroPush) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - // 测试用(获取指定星级等级的英雄) type HeroGetSpecifiedReq struct { state protoimpl.MessageState @@ -1386,7 +1330,7 @@ type HeroGetSpecifiedReq struct { func (x *HeroGetSpecifiedReq) Reset() { *x = HeroGetSpecifiedReq{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[26] + mi := &file_hero_hero_msg_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1399,7 +1343,7 @@ func (x *HeroGetSpecifiedReq) String() string { func (*HeroGetSpecifiedReq) ProtoMessage() {} func (x *HeroGetSpecifiedReq) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[26] + mi := &file_hero_hero_msg_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1412,7 +1356,7 @@ func (x *HeroGetSpecifiedReq) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroGetSpecifiedReq.ProtoReflect.Descriptor instead. func (*HeroGetSpecifiedReq) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{26} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{25} } func (x *HeroGetSpecifiedReq) GetHeroCoinfigID() int32 { @@ -1454,7 +1398,7 @@ type HeroGetSpecifiedResp struct { func (x *HeroGetSpecifiedResp) Reset() { *x = HeroGetSpecifiedResp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[27] + mi := &file_hero_hero_msg_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1467,7 +1411,7 @@ func (x *HeroGetSpecifiedResp) String() string { func (*HeroGetSpecifiedResp) ProtoMessage() {} func (x *HeroGetSpecifiedResp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[27] + mi := &file_hero_hero_msg_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1480,7 +1424,7 @@ func (x *HeroGetSpecifiedResp) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroGetSpecifiedResp.ProtoReflect.Descriptor instead. func (*HeroGetSpecifiedResp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{27} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{26} } func (x *HeroGetSpecifiedResp) GetHero() *DBHero { @@ -1490,53 +1434,6 @@ func (x *HeroGetSpecifiedResp) GetHero() *DBHero { return nil } -type HeroDelHeroPush struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Heros map[string]int32 `protobuf:"bytes,1,rep,name=heros,proto3" json:"heros" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (x *HeroDelHeroPush) Reset() { - *x = HeroDelHeroPush{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroDelHeroPush) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroDelHeroPush) ProtoMessage() {} - -func (x *HeroDelHeroPush) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[28] - 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 HeroDelHeroPush.ProtoReflect.Descriptor instead. -func (*HeroDelHeroPush) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{28} -} - -func (x *HeroDelHeroPush) GetHeros() map[string]int32 { - if x != nil { - return x.Heros - } - return nil -} - // 抽卡 type HeroDrawCardReq struct { state protoimpl.MessageState @@ -1549,7 +1446,7 @@ type HeroDrawCardReq struct { func (x *HeroDrawCardReq) Reset() { *x = HeroDrawCardReq{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[29] + mi := &file_hero_hero_msg_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1562,7 +1459,7 @@ func (x *HeroDrawCardReq) String() string { func (*HeroDrawCardReq) ProtoMessage() {} func (x *HeroDrawCardReq) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[29] + mi := &file_hero_hero_msg_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1575,7 +1472,7 @@ func (x *HeroDrawCardReq) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroDrawCardReq.ProtoReflect.Descriptor instead. func (*HeroDrawCardReq) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{29} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{27} } func (x *HeroDrawCardReq) GetDrawType() int32 { @@ -1596,7 +1493,7 @@ type HeroDrawCardResp struct { func (x *HeroDrawCardResp) Reset() { *x = HeroDrawCardResp{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[30] + mi := &file_hero_hero_msg_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1609,7 +1506,7 @@ func (x *HeroDrawCardResp) String() string { func (*HeroDrawCardResp) ProtoMessage() {} func (x *HeroDrawCardResp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[30] + mi := &file_hero_hero_msg_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1622,7 +1519,7 @@ func (x *HeroDrawCardResp) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroDrawCardResp.ProtoReflect.Descriptor instead. func (*HeroDrawCardResp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{30} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{28} } func (x *HeroDrawCardResp) GetHeroes() []int32 { @@ -1644,7 +1541,7 @@ type HeroChangePush struct { func (x *HeroChangePush) Reset() { *x = HeroChangePush{} if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[31] + mi := &file_hero_hero_msg_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1657,7 +1554,7 @@ func (x *HeroChangePush) String() string { func (*HeroChangePush) ProtoMessage() {} func (x *HeroChangePush) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[31] + mi := &file_hero_hero_msg_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1670,7 +1567,7 @@ func (x *HeroChangePush) ProtoReflect() protoreflect.Message { // Deprecated: Use HeroChangePush.ProtoReflect.Descriptor instead. func (*HeroChangePush) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{31} + return file_hero_hero_msg_proto_rawDescGZIP(), []int{29} } func (x *HeroChangePush) GetList() []*DBHero { @@ -1806,40 +1703,27 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, - 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x47, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, - 0x41, 0x64, 0x64, 0x4e, 0x65, 0x77, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, - 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, - 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x77, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x65, 0x72, 0x6f, - 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, 0x12, 0x16, - 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x33, 0x0a, 0x14, 0x48, 0x65, - 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, - 0x7e, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x65, 0x6c, 0x48, 0x65, 0x72, 0x6f, 0x50, 0x75, - 0x73, 0x68, 0x12, 0x31, 0x0a, 0x05, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x65, 0x6c, 0x48, 0x65, 0x72, 0x6f, 0x50, - 0x75, 0x73, 0x68, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, - 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, 0x22, - 0x2d, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, 0x61, 0x77, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2a, - 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, - 0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x77, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, + 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x24, 0x0a, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x69, 0x6e, + 0x66, 0x69, 0x67, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, + 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, + 0x76, 0x22, 0x33, 0x0a, 0x14, 0x48, 0x65, 0x72, 0x6f, 0x47, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, + 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x2d, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, + 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, + 0x77, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, 0x61, + 0x77, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2a, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, + 0x77, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, + 0x6f, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x65, + 0x73, 0x22, 0x2d, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, + 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1854,7 +1738,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, 36) +var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroInfoReq)(nil), // 0: HeroInfoReq (*HeroInfoResp)(nil), // 1: HeroInfoResp @@ -1881,46 +1765,41 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroPropertyPush)(nil), // 22: HeroPropertyPush (*HeroLockReq)(nil), // 23: HeroLockReq (*HeroLockResp)(nil), // 24: HeroLockResp - (*HeroAddNewHeroPush)(nil), // 25: HeroAddNewHeroPush - (*HeroGetSpecifiedReq)(nil), // 26: HeroGetSpecifiedReq - (*HeroGetSpecifiedResp)(nil), // 27: HeroGetSpecifiedResp - (*HeroDelHeroPush)(nil), // 28: HeroDelHeroPush - (*HeroDrawCardReq)(nil), // 29: HeroDrawCardReq - (*HeroDrawCardResp)(nil), // 30: HeroDrawCardResp - (*HeroChangePush)(nil), // 31: HeroChangePush - nil, // 32: HeroStrengthenUplvReq.ExpCardsEntry - nil, // 33: HeroPropertyPush.PropertyEntry - nil, // 34: HeroPropertyPush.AddPropertyEntry - nil, // 35: HeroDelHeroPush.HerosEntry - (*DBHero)(nil), // 36: DBHero + (*HeroGetSpecifiedReq)(nil), // 25: HeroGetSpecifiedReq + (*HeroGetSpecifiedResp)(nil), // 26: HeroGetSpecifiedResp + (*HeroDrawCardReq)(nil), // 27: HeroDrawCardReq + (*HeroDrawCardResp)(nil), // 28: HeroDrawCardResp + (*HeroChangePush)(nil), // 29: HeroChangePush + nil, // 30: HeroStrengthenUplvReq.ExpCardsEntry + nil, // 31: HeroPropertyPush.PropertyEntry + nil, // 32: HeroPropertyPush.AddPropertyEntry + (*DBHero)(nil), // 33: DBHero } var file_hero_hero_msg_proto_depIdxs = []int32{ - 36, // 0: HeroInfoResp.base:type_name -> DBHero - 36, // 1: HeroListResp.list:type_name -> DBHero - 32, // 2: HeroStrengthenUplvReq.expCards:type_name -> HeroStrengthenUplvReq.ExpCardsEntry - 36, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero + 33, // 0: HeroInfoResp.base:type_name -> DBHero + 33, // 1: HeroListResp.list:type_name -> DBHero + 30, // 2: HeroStrengthenUplvReq.expCards:type_name -> HeroStrengthenUplvReq.ExpCardsEntry + 33, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero 7, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData 7, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData - 36, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero - 36, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero - 36, // 8: HeroResonanceResp.hero:type_name -> DBHero - 36, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero - 36, // 10: HeroResonanceResetResp.hero:type_name -> DBHero - 36, // 11: HeroResonanceUseEnergyResp.hero:type_name -> DBHero - 36, // 12: HeroAwakenResp.hero:type_name -> DBHero - 36, // 13: HeroChoukaResp.heroes:type_name -> DBHero - 33, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry - 34, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry - 36, // 16: HeroLockResp.hero:type_name -> DBHero - 36, // 17: HeroAddNewHeroPush.hero:type_name -> DBHero - 36, // 18: HeroGetSpecifiedResp.hero:type_name -> DBHero - 35, // 19: HeroDelHeroPush.heros:type_name -> HeroDelHeroPush.HerosEntry - 36, // 20: HeroChangePush.list: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 + 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 + 31, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry + 32, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry + 33, // 16: HeroLockResp.hero:type_name -> DBHero + 33, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero + 33, // 18: HeroChangePush.list:type_name -> DBHero + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_hero_hero_msg_proto_init() } @@ -2231,18 +2110,6 @@ func file_hero_hero_msg_proto_init() { } } file_hero_hero_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroAddNewHeroPush); 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[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeroGetSpecifiedReq); i { case 0: return &v.state @@ -2254,7 +2121,7 @@ func file_hero_hero_msg_proto_init() { return nil } } - file_hero_hero_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_hero_hero_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeroGetSpecifiedResp); i { case 0: return &v.state @@ -2266,19 +2133,7 @@ func file_hero_hero_msg_proto_init() { return nil } } - file_hero_hero_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroDelHeroPush); 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[29].Exporter = func(v interface{}, i int) interface{} { + file_hero_hero_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeroDrawCardReq); i { case 0: return &v.state @@ -2290,7 +2145,7 @@ func file_hero_hero_msg_proto_init() { return nil } } - file_hero_hero_msg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_hero_hero_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeroDrawCardResp); i { case 0: return &v.state @@ -2302,7 +2157,7 @@ func file_hero_hero_msg_proto_init() { return nil } } - file_hero_hero_msg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_hero_hero_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HeroChangePush); i { case 0: return &v.state @@ -2321,7 +2176,7 @@ func file_hero_hero_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 36, + NumMessages: 33, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/mainline_msg.pb.go b/pb/mainline_msg.pb.go index 40e03c577..9a1b05269 100644 --- a/pb/mainline_msg.pb.go +++ b/pb/mainline_msg.pb.go @@ -114,7 +114,6 @@ type MainlineGetRewrdReq struct { unknownFields protoimpl.UnknownFields ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID - BoxId uint32 `protobuf:"varint,2,opt,name=boxId,proto3" json:"boxId"` // 宝箱ID } func (x *MainlineGetRewrdReq) Reset() { @@ -156,13 +155,6 @@ func (x *MainlineGetRewrdReq) GetChapterId() uint32 { return 0 } -func (x *MainlineGetRewrdReq) GetBoxId() uint32 { - if x != nil { - return x.BoxId - } - return 0 -} - type MainlineGetRewrdResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -324,25 +316,24 @@ var file_mainline_mainline_msg_proto_rawDesc = []byte{ 0x36, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x49, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, + 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x33, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x62, 0x6f, 0x78, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x6f, 0x78, - 0x49, 0x64, 0x22, 0x37, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x77, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x54, 0x0a, 0x14, 0x4d, + 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x14, + 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x54, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, + 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, - 0x64, 0x22, 0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, - 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/proto/hero/hero_msg.proto b/pb/proto/hero/hero_msg.proto index d67875f60..4c92bc3cc 100644 --- a/pb/proto/hero/hero_msg.proto +++ b/pb/proto/hero/hero_msg.proto @@ -123,12 +123,6 @@ message HeroLockResp { DBHero hero = 1; // 英雄对象 } -// 增加新英雄推送 -message HeroAddNewHeroPush { - DBHero hero = 1; // 英雄对象 - int32 count = 2; //数量 -} - // 测试用(获取指定星级等级的英雄) message HeroGetSpecifiedReq { int32 heroCoinfigID = 1; // 英雄配置ID @@ -141,10 +135,6 @@ message HeroGetSpecifiedResp { DBHero hero = 1; // 英雄对象 } -message HeroDelHeroPush { - map heros = 1; -} - // 抽卡 message HeroDrawCardReq { int32 drawType = 1; // 抽卡类型 见drawCardCost表 diff --git a/pb/proto/mainline/mainline_msg.proto b/pb/proto/mainline/mainline_msg.proto index a133eefa8..c37be523c 100644 --- a/pb/proto/mainline/mainline_msg.proto +++ b/pb/proto/mainline/mainline_msg.proto @@ -14,7 +14,6 @@ message MainlineGetListResp { // 领取关卡宝箱 message MainlineGetRewrdReq { uint32 chapterId = 1; // 章节ID - uint32 boxId = 2; // 宝箱ID } message MainlineGetRewrdResp {