diff --git a/comm/const.go b/comm/const.go index d4aedaa91..177ec6bef 100644 --- a/comm/const.go +++ b/comm/const.go @@ -143,6 +143,8 @@ const ( TableLibrary = "library" TableFetter = "herofetter" + + TableCrossSession = "crosssession" ) //RPC服务接口定义处 diff --git a/comm/imodule.go b/comm/imodule.go index 3d7066158..bb2097ee2 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -85,6 +85,8 @@ type ( ChangeUserExpand(uid string, value map[string]interface{}) error // 本服在线玩家列表 UserOnlineList() ([]*pb.CacheUser, error) + // 跨服在线玩家列表 + CrossUserOnlineList() ([]*pb.CacheUser, error) } //武器模块 IEquipment interface { diff --git a/modules/friend/api_randlist.go b/modules/friend/api_randlist.go index 150902df3..5c0c26b99 100644 --- a/modules/friend/api_randlist.go +++ b/modules/friend/api_randlist.go @@ -22,7 +22,7 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR } //在线玩家列表 - cuList, err := this.moduleFriend.ModuleUser.UserOnlineList() + cuList, err := this.moduleFriend.ModuleUser.CrossUserOnlineList() if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/friend/module.go b/modules/friend/module.go index c06d891e3..c57338819 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -30,7 +30,6 @@ func (this *Friend) GetType() core.M_Modules { func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) - return } diff --git a/modules/user/api_login.go b/modules/user/api_login.go index a603bb1a0..cc5770f23 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -4,7 +4,6 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/log" "go_dreamfactory/pb" - "go_dreamfactory/sys/db" "go_dreamfactory/utils" "time" @@ -30,7 +29,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod user *pb.DBUser ) - // t := time.Now() rsp := &pb.UserLoginResp{} defer func() { if user != nil && code == pb.ErrorCode_Success { @@ -41,7 +39,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod code = pb.ErrorCode_SystemError return } - // log.Debugf("登录耗时:%v", time.Since(t)) } }() @@ -84,21 +81,16 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod //bind user err = session.Bind(user.Uid, this.service.GetId()) if err != nil { - this.module.Errorf("err:%v", err) + this.module.Errorf("user bind err:%v", err) code = pb.ErrorCode_BindUser return } //缓存user session - err = this.module.modelSession.AddList(comm.RDS_SESSION, user.Uid, map[string]interface{}{ - "uid": user.Uid, - "sessionId": session.GetSessionId(), - "serviceTag": session.GetServiecTag(), - "gatewayServiceId": session.GetGatewayServiceId(), - "ip": session.GetIP(), - }, db.SetDBMgoLog(false)) + err = this.module.modelSession.setUserSession(user.Uid, session) if err != nil { - code = pb.ErrorCode_DBError + this.module.Errorf("set user session err:%v", err) + code = pb.ErrorCode_UserSessionNobeing return } diff --git a/modules/user/model_cross_session.go b/modules/user/model_cross_session.go deleted file mode 100644 index cb301e23e..000000000 --- a/modules/user/model_cross_session.go +++ /dev/null @@ -1,2 +0,0 @@ -package user - diff --git a/modules/user/model_session.go b/modules/user/model_session.go index fc505f6e5..b456fe138 100644 --- a/modules/user/model_session.go +++ b/modules/user/model_session.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/db" ) type ModelSession struct { @@ -32,6 +33,24 @@ func (this *ModelSession) getUserSession(uid string) (user *pb.CacheUser) { return user } +//设置用户session +func (this *ModelSession) setUserSession(uid string, session comm.IUserSession) (err error) { + if err = this.AddList(comm.RDS_SESSION, uid, map[string]interface{}{ + "uid": uid, + "sessionId": session.GetSessionId(), + "serviceTag": session.GetServiecTag(), + "gatewayServiceId": session.GetGatewayServiceId(), + "ip": session.GetIP(), + }, db.SetDBMgoLog(false)); err != nil { + log.Debugf("setUserSession err:%v", err) + return + } + + // this.module.service.AcrossClusterRpcGo(context.TODO(), + // this.module.service.GetTag(), comm.Service_Worker, serviceMethod string, args interface{}, reply interface{}) + return +} + // 启动时清理session func (this *ModelSession) clean() { keys, err := this.Redis.Keys("session:*") diff --git a/modules/user/module.go b/modules/user/module.go index 514ca63b4..d9a26f6b1 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -1,6 +1,7 @@ package user import ( + "context" "fmt" "go_dreamfactory/comm" "go_dreamfactory/modules" @@ -15,6 +16,10 @@ import ( "github.com/pkg/errors" ) +const ( + Rpc_GetAllOnlineUser string = "Rpc_GetAllOnlineUser" +) + var _ comm.IUser = (*User)(nil) func NewModule() core.IModule { @@ -46,6 +51,7 @@ func (this *User) Init(service core.IService, module core.IModule, options core. func (this *User) Start() (err error) { err = this.ModuleBase.Start() event.RegisterGO(comm.EventUserOffline, this.CleanSession) + this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.GetAllOnlineUser) return } @@ -92,6 +98,14 @@ func (this *User) UserOnlineList() ([]*pb.CacheUser, error) { return cache, nil } +// 跨服玩家列表 +func (this *User) CrossUserOnlineList() ([]*pb.CacheUser, error) { + reply := &pb.UserOnlineResp{} + err := this.service.AcrossClusterRpcCall(context.Background(), this.service.GetTag(), + comm.Service_Worker, Rpc_GetAllOnlineUser, nil, reply) + return reply.Users, err +} + //查询用户属性值 例如 金币 经验 func (this *User) QueryAttributeValue(uid string, attr string) (value int64) { user := this.modelUser.GetUser(uid) @@ -260,3 +274,18 @@ func (this *User) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) func (this *User) ChangeUserExpand(uid string, value map[string]interface{}) error { return this.modelExpand.ChangeUserExpand(uid, value) } + +func (this *User) GetAllOnlineUser(ctx context.Context, args *pb.EmptyReq, reply *pb.UserOnlineResp) error { + conn, err := db.Cross() + if err != nil { + log.Errorf("cross db err: %v", err) + return err + } + model := db.NewDBModel(comm.TableSession, 0, conn) + var cache []*pb.CacheUser + if err := model.GetList(comm.RDS_SESSION, &cache); err != nil { + return err + } + reply.Users = cache + return nil +} diff --git a/pb/comm.pb.go b/pb/comm.pb.go index 63e26ac16..e83278621 100644 --- a/pb/comm.pb.go +++ b/pb/comm.pb.go @@ -1020,6 +1020,82 @@ func (x *RtaskParam) GetParam3() int32 { return 0 } +type EmptyReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyReq) Reset() { + *x = EmptyReq{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyReq) ProtoMessage() {} + +func (x *EmptyReq) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[14] + 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 EmptyReq.ProtoReflect.Descriptor instead. +func (*EmptyReq) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{14} +} + +type EmptyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EmptyResp) Reset() { + *x = EmptyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_comm_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmptyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyResp) ProtoMessage() {} + +func (x *EmptyResp) ProtoReflect() protoreflect.Message { + mi := &file_comm_proto_msgTypes[15] + 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 EmptyResp.ProtoReflect.Descriptor instead. +func (*EmptyResp) Descriptor() ([]byte, []int) { + return file_comm_proto_rawDescGZIP(), []int{15} +} + var File_comm_proto protoreflect.FileDescriptor var file_comm_proto_rawDesc = []byte{ @@ -1134,12 +1210,14 @@ var file_comm_proto_rawDesc = []byte{ 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x33, 0x2a, 0x43, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, - 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, - 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43, + 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, + 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, + 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, + 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1155,7 +1233,7 @@ func file_comm_proto_rawDescGZIP() []byte { } var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_comm_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_comm_proto_goTypes = []interface{}{ (HeroAttributesType)(0), // 0: HeroAttributesType (*UserMessage)(nil), // 1: UserMessage @@ -1172,18 +1250,20 @@ var file_comm_proto_goTypes = []interface{}{ (*UserAssets)(nil), // 12: UserAssets (*TaskParam)(nil), // 13: TaskParam (*RtaskParam)(nil), // 14: RtaskParam - (*anypb.Any)(nil), // 15: google.protobuf.Any - (ErrorCode)(0), // 16: ErrorCode + (*EmptyReq)(nil), // 15: EmptyReq + (*EmptyResp)(nil), // 16: EmptyResp + (*anypb.Any)(nil), // 17: google.protobuf.Any + (ErrorCode)(0), // 18: ErrorCode } var file_comm_proto_depIdxs = []int32{ - 15, // 0: UserMessage.data:type_name -> google.protobuf.Any - 15, // 1: AgentMessage.Message:type_name -> google.protobuf.Any - 16, // 2: RPCMessageReply.Code:type_name -> ErrorCode - 15, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any + 17, // 0: UserMessage.data:type_name -> google.protobuf.Any + 17, // 1: AgentMessage.Message:type_name -> google.protobuf.Any + 18, // 2: RPCMessageReply.Code:type_name -> ErrorCode + 17, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any 1, // 4: RPCMessageReply.Reply:type_name -> UserMessage 1, // 5: AgentSendMessageReq.Reply:type_name -> UserMessage - 15, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any - 15, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any + 17, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any + 17, // 7: BroadCastMessageReq.Data:type_name -> google.protobuf.Any 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 @@ -1366,6 +1446,30 @@ func file_comm_proto_init() { return nil } } + file_comm_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_comm_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmptyResp); 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{ @@ -1373,7 +1477,7 @@ func file_comm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_comm_proto_rawDesc, NumEnums: 1, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index 10081ed9f..328029025 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -1970,6 +1970,54 @@ func (x *UserShowteamResp) GetHeroObjIds() []string { return nil } +// 全服在线玩家列表 +type UserOnlineResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Users []*CacheUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users"` +} + +func (x *UserOnlineResp) Reset() { + *x = UserOnlineResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_user_msg_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserOnlineResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserOnlineResp) ProtoMessage() {} + +func (x *UserOnlineResp) ProtoReflect() protoreflect.Message { + mi := &file_user_user_msg_proto_msgTypes[39] + 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 UserOnlineResp.ProtoReflect.Descriptor instead. +func (*UserOnlineResp) Descriptor() ([]byte, []int) { + return file_user_user_msg_proto_rawDescGZIP(), []int{39} +} + +func (x *UserOnlineResp) GetUsers() []*CacheUser { + if x != nil { + return x.Users + } + return nil +} + var File_user_user_msg_proto protoreflect.FileDescriptor var file_user_user_msg_proto_rawDesc = []byte{ @@ -2116,8 +2164,11 @@ var file_user_user_msg_proto_rawDesc = []byte{ 0x65, 0x71, 0x22, 0x32, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x77, 0x74, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x72, 0x6f, - 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2132,7 +2183,7 @@ func file_user_user_msg_proto_rawDescGZIP() []byte { return file_user_user_msg_proto_rawDescData } -var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_user_user_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_user_user_msg_proto_goTypes = []interface{}{ (*UserLoginReq)(nil), // 0: UserLoginReq (*UserLoginResp)(nil), // 1: UserLoginResp @@ -2173,34 +2224,36 @@ var file_user_user_msg_proto_goTypes = []interface{}{ (*UserSettingteamResp)(nil), // 36: UserSettingteamResp (*UserShowteamReq)(nil), // 37: UserShowteamReq (*UserShowteamResp)(nil), // 38: UserShowteamResp - (*DBUser)(nil), // 39: DBUser - (*DBUserExpand)(nil), // 40: DBUserExpand - (ErrorCode)(0), // 41: ErrorCode - (*CacheUser)(nil), // 42: CacheUser - (*DBUserSetting)(nil), // 43: DBUserSetting - (*DBPagodaRecord)(nil), // 44: DBPagodaRecord - (*DBHuntingRank)(nil), // 45: DBHuntingRank - (*DBVikingRank)(nil), // 46: DBVikingRank + (*UserOnlineResp)(nil), // 39: UserOnlineResp + (*DBUser)(nil), // 40: DBUser + (*DBUserExpand)(nil), // 41: DBUserExpand + (ErrorCode)(0), // 42: ErrorCode + (*CacheUser)(nil), // 43: CacheUser + (*DBUserSetting)(nil), // 44: DBUserSetting + (*DBPagodaRecord)(nil), // 45: DBPagodaRecord + (*DBHuntingRank)(nil), // 46: DBHuntingRank + (*DBVikingRank)(nil), // 47: DBVikingRank } var file_user_user_msg_proto_depIdxs = []int32{ - 39, // 0: UserLoginResp.data:type_name -> DBUser - 40, // 1: UserLoginResp.ex:type_name -> DBUserExpand - 39, // 2: UserInfoResp.data:type_name -> DBUser - 40, // 3: UserInfoResp.ex:type_name -> DBUserExpand - 41, // 4: UserRegisterResp.Code:type_name -> ErrorCode - 42, // 5: UserLoadResp.data:type_name -> CacheUser - 43, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting - 43, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting - 39, // 8: UserBattlerecordResp.data:type_name -> DBUser - 40, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand - 44, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord - 45, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank - 46, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 40, // 0: UserLoginResp.data:type_name -> DBUser + 41, // 1: UserLoginResp.ex:type_name -> DBUserExpand + 40, // 2: UserInfoResp.data:type_name -> DBUser + 41, // 3: UserInfoResp.ex:type_name -> DBUserExpand + 42, // 4: UserRegisterResp.Code:type_name -> ErrorCode + 43, // 5: UserLoadResp.data:type_name -> CacheUser + 44, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting + 44, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting + 40, // 8: UserBattlerecordResp.data:type_name -> DBUser + 41, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand + 45, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord + 46, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank + 47, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank + 43, // 13: UserOnlineResp.users:type_name -> CacheUser + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_user_user_msg_proto_init() } @@ -2683,6 +2736,18 @@ func file_user_user_msg_proto_init() { return nil } } + file_user_user_msg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserOnlineResp); 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{ @@ -2690,7 +2755,7 @@ func file_user_user_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_user_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 39, + NumMessages: 40, NumExtensions: 0, NumServices: 0, },