This commit is contained in:
liwei1dao 2022-10-24 18:00:01 +08:00
commit 06601537cc
8 changed files with 459 additions and 83 deletions

View File

@ -160,5 +160,11 @@
"open": true,
"routrules": "~/worker",
"describe": "好友助战英雄列表"
},
{
"msgid": "gourmet.getranduser",
"open": true,
"routrules": "~/worker",
"describe": "获取在线玩家数据"
}
]

View File

@ -5,7 +5,9 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"go_dreamfactory/utils"
"time"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/options"
@ -24,15 +26,17 @@ func (this *apiComp) GetRandUserCheck(session comm.IUserSession, req *pb.Gourmet
/// 获取一些玩家数据
func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.GourmetGetRandUserReq) (code pb.ErrorCode, data proto.Message) {
var (
szDbUser []*pb.DBUser
randOnlineUsers []string
szDbUser []*pb.DBUser
mapUser map[string]struct{}
)
mapUser = make(map[string]struct{}, 0)
code = this.GetRandUserCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
// 获取在线玩家信息
onlineList, err := this.module.ModuleUser.CrossUserOnlineList()
onlineList, err := this.module.ModuleUser.UserOnlineList()
if err != nil {
code = pb.ErrorCode_DBError
return
@ -43,42 +47,50 @@ func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.GourmetGetRa
if v.Uid == session.GetUserId() || v.Uid == "" { // 过滤自己信息
continue
}
mapUser[v.Uid] = struct{}{}
szUid = append(szUid, v.Uid)
}
// 随机在线玩家信息
if len(onlineList) > int(req.People) {
randArr := utils.Numbers(0, len(onlineList), int(req.People))
if len(szUid) > int(req.People) {
randArr := utils.Numbers(0, len(szUid), int(req.People))
for _, v := range randArr {
if onlineList[v].Uid != "" {
randOnlineUsers = append(randOnlineUsers, onlineList[v].Uid)
if szUid[v] != "" {
mapUser[szUid[v]] = struct{}{}
}
}
} else { // 数量不足 则有多少给多少
for _, v := range szUid {
randOnlineUsers = append(randOnlineUsers, v)
mapUser[v] = struct{}{}
}
left := int(req.People) - len(randOnlineUsers)
left := int(req.People) - len(mapUser)
if left > 0 { // 一个人也没有 那就从db 中随机取
//tag := session.GetServiecTag()
//if conn, err := db.ServerDBConn(tag); err == nil {
//dbModel := db.NewDBModel(comm.TableUser, time.Hour, conn)
if _data, err1 := this.module.modelGourmet.DB.Find(core.SqlTable(comm.TableUser), bson.M{}, options.Find().SetSort(bson.M{"lv": -1}).SetLimit(int64(left))); err1 == nil {
for _data.Next(context.TODO()) {
temp := &pb.DBUser{}
if err = _data.Decode(temp); err == nil {
randOnlineUsers = append(randOnlineUsers, temp.Uid)
tag, _, b := utils.UIdSplit(session.GetUserId())
if b {
if conn, err := db.ServerDBConn(tag); err == nil {
dbModel := db.NewDBModel(comm.TableHero, time.Hour, conn)
if _data, err1 := dbModel.DB.Find(core.SqlTable(comm.TableUser), bson.M{}, options.Find().SetSort(bson.M{"lv": -1}).SetLimit(int64(req.People))); err1 == nil {
for _data.Next(context.TODO()) {
temp := &pb.DBUser{}
if err = _data.Decode(temp); err == nil {
if len(mapUser) >= int(req.People) {
break
}
if _, ok := mapUser[temp.Uid]; !ok {
szDbUser = append(szDbUser, temp)
}
}
}
}
}
}
//}
}
}
for _, v := range randOnlineUsers {
user, _ := this.module.ModuleUser.GetCrossUser(v)
szDbUser = append(szDbUser, user) // 转成user对象
for k := range mapUser {
if user, err := this.module.ModuleUser.GetRmoteUser(k); err == nil && user.Uid != "" {
szDbUser = append(szDbUser, user) // 转成user对象
} else {
this.module.Errorf("%v", err)
}
}
session.SendMsg(string(this.module.GetType()), GourmetGetRandUserResp, &pb.GourmetGetRandUserResp{User: szDbUser})
return

View File

@ -79,7 +79,7 @@ func (this *apiComp) Ask(session comm.IUserSession, req *pb.MoonfantasyAskReq) (
return
}
mdata.Join = append(mdata.Join, &pb.UserInfo{Uid: user.Uid, Name: user.Name, Avatar: user.Avatar, Lv: user.Lv})
this.module.modelDream.Change(mdata.Id, map[string]interface{}{
this.module.modelDream.ChangeList("", mdata.Id, map[string]interface{}{
"join": mdata.Join,
})
}

View File

@ -30,7 +30,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
this.module.modelUserMF.Change(session.GetUserId(), map[string]interface{}{
"battleNum": umfantasy.BattleNum,
})
this.module.modelDream.Change(mdata.Id, map[string]interface{}{
this.module.modelDream.ChangeList("", mdata.Id, map[string]interface{}{
"record": mdata.Record,
})
session.SendMsg(string(this.module.GetType()), "battle", &pb.MoonfantasyBattleResp{

View File

@ -69,7 +69,7 @@ func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.SmithyGetRan
break
}
if _, ok := mapUser[temp.Uid]; !ok {
mapUser[temp.Uid] = struct{}{}
szDbUser = append(szDbUser, temp)
}
}
}
@ -77,7 +77,7 @@ func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.SmithyGetRan
}
}
for k := range mapUser {
user, _ := this.module.ModuleUser.GetCrossUser(k)
user, _ := this.module.ModuleUser.GetRmoteUser(k)
szDbUser = append(szDbUser, user) // 转成user对象
}
session.SendMsg(string(this.module.GetType()), SmithyGetRandUserResp, &pb.SmithyGetRandUserResp{User: szDbUser})

View File

@ -111,7 +111,9 @@ func (this *User) GetUserSession(uid string) *pb.CacheUser {
// 清除session
func (this *User) CleanSession(session comm.IUserSession) {
this.modelUser.updateOfflineTime(session.GetUserId())
if !this.IsCross() {
this.modelUser.updateOfflineTime(session.GetUserId())
}
sId := fmt.Sprintf("%s-%s", comm.RDS_SESSION, session.GetUserId())
this.modelSession.Del(sId, db.SetDBMgoLog(false))
this.modelSession.DelListlds(comm.RDS_SESSION, session.GetUserId())
@ -355,7 +357,7 @@ func (this *User) getUserFromRemoteDb(uid string, rsp *pb.DBUser) error {
return errors.New("sid split error")
}
conn, err := db.ServerDBConn(sid)
if err != nil {
if err != nil {
return err
}
model := db.NewDBModel(comm.TableUser, 0, conn)

View File

@ -543,6 +543,78 @@ func (x *DBHeroRecord) GetDrawcount() int32 {
return 0
}
// 英雄天赋系统
type HeroTalent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID 主键id
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
HeroId string `protobuf:"bytes,3,opt,name=heroId,proto3" json:"heroId"` // 英雄ID
Talnet map[int32]int32 `protobuf:"bytes,4,rep,name=talnet,proto3" json:"talnet" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 已经学习过的天赋
}
func (x *HeroTalent) Reset() {
*x = HeroTalent{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_db_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroTalent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroTalent) ProtoMessage() {}
func (x *HeroTalent) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_db_proto_msgTypes[4]
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 HeroTalent.ProtoReflect.Descriptor instead.
func (*HeroTalent) Descriptor() ([]byte, []int) {
return file_hero_hero_db_proto_rawDescGZIP(), []int{4}
}
func (x *HeroTalent) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *HeroTalent) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *HeroTalent) GetHeroId() string {
if x != nil {
return x.HeroId
}
return ""
}
func (x *HeroTalent) GetTalnet() map[int32]int32 {
if x != nil {
return x.Talnet
}
return nil
}
var File_hero_hero_db_proto protoreflect.FileDescriptor
var file_hero_hero_db_proto_rawDesc = []byte{
@ -645,11 +717,23 @@ var file_hero_hero_db_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x12, 0x14, 0x0a, 0x05, 0x6d,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2a,
0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x48,
0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e,
0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, 0x67, 0x46, 0x75, 0x10, 0x01,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22,
0xb2, 0x01, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x6e,
0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x54,
0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x6c, 0x6e, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x06, 0x74, 0x61, 0x6c, 0x6e, 0x65, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, 0x6c,
0x6e, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x2a, 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65,
0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10,
0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e,
0x67, 0x46, 0x75, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -665,32 +749,35 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte {
}
var file_hero_hero_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_hero_hero_db_proto_goTypes = []interface{}{
(HeroType)(0), // 0: HeroType
(*SkillData)(nil), // 1: SkillData
(*DBHero)(nil), // 2: DBHero
(*Floor)(nil), // 3: Floor
(*DBHeroRecord)(nil), // 4: DBHeroRecord
nil, // 5: DBHero.PropertyEntry
nil, // 6: DBHero.AddPropertyEntry
nil, // 7: DBHero.EnergyEntry
nil, // 8: DBHero.EnergyPropertyEntry
nil, // 9: DBHero.JuexPropertyEntry
(*HeroTalent)(nil), // 5: HeroTalent
nil, // 6: DBHero.PropertyEntry
nil, // 7: DBHero.AddPropertyEntry
nil, // 8: DBHero.EnergyEntry
nil, // 9: DBHero.EnergyPropertyEntry
nil, // 10: DBHero.JuexPropertyEntry
nil, // 11: HeroTalent.TalnetEntry
}
var file_hero_hero_db_proto_depIdxs = []int32{
1, // 0: DBHero.normalSkill:type_name -> SkillData
5, // 1: DBHero.property:type_name -> DBHero.PropertyEntry
6, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
7, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry
8, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry
9, // 5: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry
0, // 6: DBHero.status:type_name -> HeroType
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
1, // 0: DBHero.normalSkill:type_name -> SkillData
6, // 1: DBHero.property:type_name -> DBHero.PropertyEntry
7, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
8, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry
9, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry
10, // 5: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry
0, // 6: DBHero.status:type_name -> HeroType
11, // 7: HeroTalent.talnet:type_name -> HeroTalent.TalnetEntry
8, // [8:8] is the sub-list for method output_type
8, // [8:8] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_hero_hero_db_proto_init() }
@ -747,6 +834,18 @@ func file_hero_hero_db_proto_init() {
return nil
}
}
file_hero_hero_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroTalent); 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{
@ -754,7 +853,7 @@ func file_hero_hero_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hero_hero_db_proto_rawDesc,
NumEnums: 1,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -1805,6 +1805,195 @@ func (x *HeroFusionResp) GetHeroid() string {
return ""
}
// 天赋学习
type HeroTalentListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *HeroTalentListReq) Reset() {
*x = HeroTalentListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroTalentListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroTalentListReq) ProtoMessage() {}
func (x *HeroTalentListReq) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[34]
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 HeroTalentListReq.ProtoReflect.Descriptor instead.
func (*HeroTalentListReq) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{34}
}
type HeroTalentListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Telnet []*HeroTalent `protobuf:"bytes,1,rep,name=telnet,proto3" json:"telnet"`
}
func (x *HeroTalentListResp) Reset() {
*x = HeroTalentListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroTalentListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroTalentListResp) ProtoMessage() {}
func (x *HeroTalentListResp) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[35]
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 HeroTalentListResp.ProtoReflect.Descriptor instead.
func (*HeroTalentListResp) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{35}
}
func (x *HeroTalentListResp) GetTelnet() []*HeroTalent {
if x != nil {
return x.Telnet
}
return nil
}
// 天赋学习
type HeroTalentLearnReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TalentID int32 `protobuf:"varint,1,opt,name=talentID,proto3" json:"talentID"` // 天赋ID
Heroid string `protobuf:"bytes,2,opt,name=heroid,proto3" json:"heroid"` // 英雄id
}
func (x *HeroTalentLearnReq) Reset() {
*x = HeroTalentLearnReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroTalentLearnReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroTalentLearnReq) ProtoMessage() {}
func (x *HeroTalentLearnReq) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[36]
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 HeroTalentLearnReq.ProtoReflect.Descriptor instead.
func (*HeroTalentLearnReq) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{36}
}
func (x *HeroTalentLearnReq) GetTalentID() int32 {
if x != nil {
return x.TalentID
}
return 0
}
func (x *HeroTalentLearnReq) GetHeroid() string {
if x != nil {
return x.Heroid
}
return ""
}
type HeroTalentLearnResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Telnet *HeroTalent `protobuf:"bytes,1,opt,name=telnet,proto3" json:"telnet"`
}
func (x *HeroTalentLearnResp) Reset() {
*x = HeroTalentLearnResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroTalentLearnResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroTalentLearnResp) ProtoMessage() {}
func (x *HeroTalentLearnResp) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[37]
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 HeroTalentLearnResp.ProtoReflect.Descriptor instead.
func (*HeroTalentLearnResp) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{37}
}
func (x *HeroTalentLearnResp) GetTelnet() *HeroTalent {
if x != nil {
return x.Telnet
}
return nil
}
var File_hero_hero_msg_proto protoreflect.FileDescriptor
var file_hero_hero_msg_proto_rawDesc = []byte{
@ -1968,8 +2157,21 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x48, 0x65,
0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22,
0x39, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65,
0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x22, 0x48, 0x0a, 0x12, 0x48, 0x65,
0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x52, 0x65, 0x71,
0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06,
0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65,
0x72, 0x6f, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65,
0x6e, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x06, 0x74,
0x65, 0x6c, 0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x48, 0x65,
0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1984,7 +2186,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, 37)
var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 41)
var file_hero_hero_msg_proto_goTypes = []interface{}{
(*HeroInfoReq)(nil), // 0: HeroInfoReq
(*HeroInfoResp)(nil), // 1: HeroInfoResp
@ -2020,37 +2222,44 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{
(*HeroDrawCardFloorResp)(nil), // 31: HeroDrawCardFloorResp
(*HeroFusionReq)(nil), // 32: HeroFusionReq
(*HeroFusionResp)(nil), // 33: HeroFusionResp
nil, // 34: HeroPropertyPush.PropertyEntry
nil, // 35: HeroPropertyPush.AddPropertyEntry
nil, // 36: HeroFusionReq.HerosEntry
(*DBHero)(nil), // 37: DBHero
(*HeroTalentListReq)(nil), // 34: HeroTalentListReq
(*HeroTalentListResp)(nil), // 35: HeroTalentListResp
(*HeroTalentLearnReq)(nil), // 36: HeroTalentLearnReq
(*HeroTalentLearnResp)(nil), // 37: HeroTalentLearnResp
nil, // 38: HeroPropertyPush.PropertyEntry
nil, // 39: HeroPropertyPush.AddPropertyEntry
nil, // 40: HeroFusionReq.HerosEntry
(*DBHero)(nil), // 41: DBHero
(*HeroTalent)(nil), // 42: HeroTalent
}
var file_hero_hero_msg_proto_depIdxs = []int32{
37, // 0: HeroInfoResp.base:type_name -> DBHero
37, // 1: HeroListResp.list:type_name -> DBHero
41, // 0: HeroInfoResp.base:type_name -> DBHero
41, // 1: HeroListResp.list:type_name -> DBHero
5, // 2: HeroStrengthenUplvReq.expCards:type_name -> MapStringInt32
37, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
41, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
8, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData
8, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData
37, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero
37, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
37, // 8: HeroResonanceResp.hero:type_name -> DBHero
37, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero
37, // 10: HeroResonanceResetResp.hero:type_name -> DBHero
41, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero
41, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
41, // 8: HeroResonanceResp.hero:type_name -> DBHero
41, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero
41, // 10: HeroResonanceResetResp.hero:type_name -> DBHero
17, // 11: HeroResonanceUseEnergyReq.energy:type_name -> EnergyData
37, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero
37, // 13: HeroAwakenResp.hero:type_name -> DBHero
34, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
35, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
37, // 16: HeroLockResp.hero:type_name -> DBHero
37, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero
37, // 18: HeroChangePush.list:type_name -> DBHero
36, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.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
41, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero
41, // 13: HeroAwakenResp.hero:type_name -> DBHero
38, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
39, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
41, // 16: HeroLockResp.hero:type_name -> DBHero
41, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero
41, // 18: HeroChangePush.list:type_name -> DBHero
40, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry
42, // 20: HeroTalentListResp.telnet:type_name -> HeroTalent
42, // 21: HeroTalentLearnResp.telnet:type_name -> HeroTalent
22, // [22:22] is the sub-list for method output_type
22, // [22:22] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
22, // [22:22] is the sub-list for extension extendee
0, // [0:22] is the sub-list for field type_name
}
func init() { file_hero_hero_msg_proto_init() }
@ -2468,6 +2677,54 @@ func file_hero_hero_msg_proto_init() {
return nil
}
}
file_hero_hero_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroTalentListReq); 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[35].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroTalentListResp); 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[36].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroTalentLearnReq); 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[37].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroTalentLearnResp); 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{
@ -2475,7 +2732,7 @@ func file_hero_hero_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hero_hero_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 37,
NumMessages: 41,
NumExtensions: 0,
NumServices: 0,
},