跨服查好友

This commit is contained in:
wh_zcy 2022-10-17 18:33:28 +08:00
parent f3c8c8f52c
commit 85bb6f5391
10 changed files with 272 additions and 62 deletions

View File

@ -143,6 +143,8 @@ const (
TableLibrary = "library" TableLibrary = "library"
TableFetter = "herofetter" TableFetter = "herofetter"
TableCrossSession = "crosssession"
) )
//RPC服务接口定义处 //RPC服务接口定义处

View File

@ -85,6 +85,8 @@ type (
ChangeUserExpand(uid string, value map[string]interface{}) error ChangeUserExpand(uid string, value map[string]interface{}) error
// 本服在线玩家列表 // 本服在线玩家列表
UserOnlineList() ([]*pb.CacheUser, error) UserOnlineList() ([]*pb.CacheUser, error)
// 跨服在线玩家列表
CrossUserOnlineList() ([]*pb.CacheUser, error)
} }
//武器模块 //武器模块
IEquipment interface { IEquipment interface {

View File

@ -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 { if err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
return return

View File

@ -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) { func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options) err = this.ModuleBase.Init(service, module, options)
return return
} }

View File

@ -4,7 +4,6 @@ import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"go_dreamfactory/utils" "go_dreamfactory/utils"
"time" "time"
@ -30,7 +29,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
user *pb.DBUser user *pb.DBUser
) )
// t := time.Now()
rsp := &pb.UserLoginResp{} rsp := &pb.UserLoginResp{}
defer func() { defer func() {
if user != nil && code == pb.ErrorCode_Success { 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 code = pb.ErrorCode_SystemError
return return
} }
// log.Debugf("登录耗时:%v", time.Since(t))
} }
}() }()
@ -84,21 +81,16 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
//bind user //bind user
err = session.Bind(user.Uid, this.service.GetId()) err = session.Bind(user.Uid, this.service.GetId())
if err != nil { if err != nil {
this.module.Errorf("err:%v", err) this.module.Errorf("user bind err:%v", err)
code = pb.ErrorCode_BindUser code = pb.ErrorCode_BindUser
return return
} }
//缓存user session //缓存user session
err = this.module.modelSession.AddList(comm.RDS_SESSION, user.Uid, map[string]interface{}{ err = this.module.modelSession.setUserSession(user.Uid, session)
"uid": user.Uid,
"sessionId": session.GetSessionId(),
"serviceTag": session.GetServiecTag(),
"gatewayServiceId": session.GetGatewayServiceId(),
"ip": session.GetIP(),
}, db.SetDBMgoLog(false))
if err != nil { if err != nil {
code = pb.ErrorCode_DBError this.module.Errorf("set user session err:%v", err)
code = pb.ErrorCode_UserSessionNobeing
return return
} }

View File

@ -1,2 +0,0 @@
package user

View File

@ -6,6 +6,7 @@ import (
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/sys/db"
) )
type ModelSession struct { type ModelSession struct {
@ -32,6 +33,24 @@ func (this *ModelSession) getUserSession(uid string) (user *pb.CacheUser) {
return user 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 // 启动时清理session
func (this *ModelSession) clean() { func (this *ModelSession) clean() {
keys, err := this.Redis.Keys("session:*") keys, err := this.Redis.Keys("session:*")

View File

@ -1,6 +1,7 @@
package user package user
import ( import (
"context"
"fmt" "fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/modules" "go_dreamfactory/modules"
@ -15,6 +16,10 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
) )
const (
Rpc_GetAllOnlineUser string = "Rpc_GetAllOnlineUser"
)
var _ comm.IUser = (*User)(nil) var _ comm.IUser = (*User)(nil)
func NewModule() core.IModule { 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) { func (this *User) Start() (err error) {
err = this.ModuleBase.Start() err = this.ModuleBase.Start()
event.RegisterGO(comm.EventUserOffline, this.CleanSession) event.RegisterGO(comm.EventUserOffline, this.CleanSession)
this.service.RegisterFunctionName(Rpc_GetAllOnlineUser, this.GetAllOnlineUser)
return return
} }
@ -92,6 +98,14 @@ func (this *User) UserOnlineList() ([]*pb.CacheUser, error) {
return cache, nil 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) { func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
user := this.modelUser.GetUser(uid) 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 { func (this *User) ChangeUserExpand(uid string, value map[string]interface{}) error {
return this.modelExpand.ChangeUserExpand(uid, value) 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
}

View File

@ -1020,6 +1020,82 @@ func (x *RtaskParam) GetParam3() int32 {
return 0 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 protoreflect.FileDescriptor
var file_comm_proto_rawDesc = []byte{ 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, 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, 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, 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, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65,
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x71, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x2a, 0x43,
0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x70, 0x65, 0x65, 0x64, 0x10, 0x03, 0x54, 0x79, 0x70, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x48, 0x70, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03,
0x12, 0x08, 0x0a, 0x04, 0x43, 0x72, 0x69, 0x74, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x41, 0x74, 0x6b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x65, 0x66, 0x10, 0x02, 0x12, 0x09,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -1155,7 +1233,7 @@ func file_comm_proto_rawDescGZIP() []byte {
} }
var file_comm_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 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{}{ var file_comm_proto_goTypes = []interface{}{
(HeroAttributesType)(0), // 0: HeroAttributesType (HeroAttributesType)(0), // 0: HeroAttributesType
(*UserMessage)(nil), // 1: UserMessage (*UserMessage)(nil), // 1: UserMessage
@ -1172,18 +1250,20 @@ var file_comm_proto_goTypes = []interface{}{
(*UserAssets)(nil), // 12: UserAssets (*UserAssets)(nil), // 12: UserAssets
(*TaskParam)(nil), // 13: TaskParam (*TaskParam)(nil), // 13: TaskParam
(*RtaskParam)(nil), // 14: RtaskParam (*RtaskParam)(nil), // 14: RtaskParam
(*anypb.Any)(nil), // 15: google.protobuf.Any (*EmptyReq)(nil), // 15: EmptyReq
(ErrorCode)(0), // 16: ErrorCode (*EmptyResp)(nil), // 16: EmptyResp
(*anypb.Any)(nil), // 17: google.protobuf.Any
(ErrorCode)(0), // 18: ErrorCode
} }
var file_comm_proto_depIdxs = []int32{ var file_comm_proto_depIdxs = []int32{
15, // 0: UserMessage.data:type_name -> google.protobuf.Any 17, // 0: UserMessage.data:type_name -> google.protobuf.Any
15, // 1: AgentMessage.Message:type_name -> google.protobuf.Any 17, // 1: AgentMessage.Message:type_name -> google.protobuf.Any
16, // 2: RPCMessageReply.Code:type_name -> ErrorCode 18, // 2: RPCMessageReply.Code:type_name -> ErrorCode
15, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any 17, // 3: RPCMessageReply.ErrorData:type_name -> google.protobuf.Any
1, // 4: RPCMessageReply.Reply:type_name -> UserMessage 1, // 4: RPCMessageReply.Reply:type_name -> UserMessage
1, // 5: AgentSendMessageReq.Reply:type_name -> UserMessage 1, // 5: AgentSendMessageReq.Reply:type_name -> UserMessage
15, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any 17, // 6: BatchMessageReq.Data:type_name -> google.protobuf.Any
15, // 7: BroadCastMessageReq.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 output_type
8, // [8:8] is the sub-list for method input_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 type_name
@ -1366,6 +1446,30 @@ func file_comm_proto_init() {
return nil 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{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -1373,7 +1477,7 @@ func file_comm_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_comm_proto_rawDesc, RawDescriptor: file_comm_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 14, NumMessages: 16,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -1970,6 +1970,54 @@ func (x *UserShowteamResp) GetHeroObjIds() []string {
return nil 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 protoreflect.FileDescriptor
var file_user_user_msg_proto_rawDesc = []byte{ 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, 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, 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, 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, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x73, 0x22, 0x32, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -2132,7 +2183,7 @@ func file_user_user_msg_proto_rawDescGZIP() []byte {
return file_user_user_msg_proto_rawDescData 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{}{ var file_user_user_msg_proto_goTypes = []interface{}{
(*UserLoginReq)(nil), // 0: UserLoginReq (*UserLoginReq)(nil), // 0: UserLoginReq
(*UserLoginResp)(nil), // 1: UserLoginResp (*UserLoginResp)(nil), // 1: UserLoginResp
@ -2173,34 +2224,36 @@ var file_user_user_msg_proto_goTypes = []interface{}{
(*UserSettingteamResp)(nil), // 36: UserSettingteamResp (*UserSettingteamResp)(nil), // 36: UserSettingteamResp
(*UserShowteamReq)(nil), // 37: UserShowteamReq (*UserShowteamReq)(nil), // 37: UserShowteamReq
(*UserShowteamResp)(nil), // 38: UserShowteamResp (*UserShowteamResp)(nil), // 38: UserShowteamResp
(*DBUser)(nil), // 39: DBUser (*UserOnlineResp)(nil), // 39: UserOnlineResp
(*DBUserExpand)(nil), // 40: DBUserExpand (*DBUser)(nil), // 40: DBUser
(ErrorCode)(0), // 41: ErrorCode (*DBUserExpand)(nil), // 41: DBUserExpand
(*CacheUser)(nil), // 42: CacheUser (ErrorCode)(0), // 42: ErrorCode
(*DBUserSetting)(nil), // 43: DBUserSetting (*CacheUser)(nil), // 43: CacheUser
(*DBPagodaRecord)(nil), // 44: DBPagodaRecord (*DBUserSetting)(nil), // 44: DBUserSetting
(*DBHuntingRank)(nil), // 45: DBHuntingRank (*DBPagodaRecord)(nil), // 45: DBPagodaRecord
(*DBVikingRank)(nil), // 46: DBVikingRank (*DBHuntingRank)(nil), // 46: DBHuntingRank
(*DBVikingRank)(nil), // 47: DBVikingRank
} }
var file_user_user_msg_proto_depIdxs = []int32{ var file_user_user_msg_proto_depIdxs = []int32{
39, // 0: UserLoginResp.data:type_name -> DBUser 40, // 0: UserLoginResp.data:type_name -> DBUser
40, // 1: UserLoginResp.ex:type_name -> DBUserExpand 41, // 1: UserLoginResp.ex:type_name -> DBUserExpand
39, // 2: UserInfoResp.data:type_name -> DBUser 40, // 2: UserInfoResp.data:type_name -> DBUser
40, // 3: UserInfoResp.ex:type_name -> DBUserExpand 41, // 3: UserInfoResp.ex:type_name -> DBUserExpand
41, // 4: UserRegisterResp.Code:type_name -> ErrorCode 42, // 4: UserRegisterResp.Code:type_name -> ErrorCode
42, // 5: UserLoadResp.data:type_name -> CacheUser 43, // 5: UserLoadResp.data:type_name -> CacheUser
43, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting 44, // 6: UserGetSettingResp.setting:type_name -> DBUserSetting
43, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting 44, // 7: UserUpdateSettingReq.setting:type_name -> DBUserSetting
39, // 8: UserBattlerecordResp.data:type_name -> DBUser 40, // 8: UserBattlerecordResp.data:type_name -> DBUser
40, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand 41, // 9: UserBattlerecordResp.ex:type_name -> DBUserExpand
44, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord 45, // 10: UserBattlerecordResp.pagodaRecord:type_name -> DBPagodaRecord
45, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank 46, // 11: UserBattlerecordResp.huntingRecord:type_name -> DBHuntingRank
46, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank 47, // 12: UserBattlerecordResp.vikingRecord:type_name -> DBVikingRank
13, // [13:13] is the sub-list for method output_type 43, // 13: UserOnlineResp.users:type_name -> CacheUser
13, // [13:13] is the sub-list for method input_type 14, // [14:14] is the sub-list for method output_type
13, // [13:13] is the sub-list for extension type_name 14, // [14:14] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension extendee 14, // [14:14] is the sub-list for extension type_name
0, // [0:13] is the sub-list for field 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() } func init() { file_user_user_msg_proto_init() }
@ -2683,6 +2736,18 @@ func file_user_user_msg_proto_init() {
return nil 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{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
@ -2690,7 +2755,7 @@ func file_user_user_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_user_msg_proto_rawDesc, RawDescriptor: file_user_user_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 39, NumMessages: 40,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },