From 986bc3a397febc12f2014a044bb0d0b133bde032 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 23 Sep 2022 15:32:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=A4=9A=E4=B8=AA=E7=BE=81?= =?UTF-8?q?=E7=BB=8A=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/library/api_getlist.go | 13 +-- modules/library/api_getstoryreward.go | 4 + modules/library/comp_configure.go | 23 +++- modules/library/module.go | 38 +++++++ pb/chat_db.pb.go | 10 +- pb/library_db.pb.go | 16 +-- pb/rtask_msg.pb.go | 34 +++--- pb/user_msg.pb.go | 148 +++++++++++++++----------- 8 files changed, 177 insertions(+), 109 deletions(-) diff --git a/modules/library/api_getlist.go b/modules/library/api_getlist.go index 5ec155b04..f1ee0d830 100644 --- a/modules/library/api_getlist.go +++ b/modules/library/api_getlist.go @@ -8,24 +8,21 @@ import ( ) //参数校验 -func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.DBHero) (code pb.ErrorCode) { +func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.LibraryGetListReq) (code pb.ErrorCode) { return } -func (this *apiComp) GetList(session comm.IUserSession, req *pb.DBHero) (code pb.ErrorCode, data proto.Message) { +func (this *apiComp) GetList(session comm.IUserSession, req *pb.LibraryGetListReq) (code pb.ErrorCode, data proto.Message) { code = this.GetListCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } + rsp := &pb.LibraryGetListResp{} - // list, err := this.module.modelLibrary.getLibraryList(session.GetUserId()) - // if err != nil { - // code = pb.ErrorCode_DBError - // return - // } + rsp.Data = this.module.GetLibraryList(session.GetUserId()) + session.SendMsg(string(this.module.GetType()), LibraryGetListResp, rsp) - //session.SendMsg(string(this.module.GetType()), LibraryGetListResp, &pb.LibraryGetListResp{Data: list}) return } diff --git a/modules/library/api_getstoryreward.go b/modules/library/api_getstoryreward.go index b22c68617..21ec7d4eb 100644 --- a/modules/library/api_getstoryreward.go +++ b/modules/library/api_getstoryreward.go @@ -1,5 +1,9 @@ package library +/* +* 单个英雄剧情id 奖励 + */ + import ( "go_dreamfactory/comm" "go_dreamfactory/pb" diff --git a/modules/library/comp_configure.go b/modules/library/comp_configure.go index 59bfbd778..df5b197ee 100644 --- a/modules/library/comp_configure.go +++ b/modules/library/comp_configure.go @@ -9,7 +9,8 @@ import ( ) const ( - game_libraryhero = "game_libraryhero.json" + game_libraryhero = "game_libraryhero.json" + game_libraryfetter = "game_libraryfetter.json" ) ///配置管理基础组件 @@ -21,8 +22,11 @@ type configureComp struct { func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompConfigure.Init(service, module, comp, options) - err = this.LoadConfigure(game_libraryhero, cfg.NewGameLibraryHero) - + //err = this.LoadConfigure(game_libraryhero, cfg.NewGameLibraryHero) + err = this.LoadMultiConfigure(map[string]interface{}{ + game_libraryhero: cfg.NewGameLibraryHero, + game_libraryfetter: cfg.NewGameLibraryFetter, + }) return } @@ -52,6 +56,17 @@ func (this *configureComp) GetLibraryHero(hid string) (data *cfg.GameLibraryHero } else { log.Errorf("get game_challenge conf err:%v", err) } - + return +} + +func (this *configureComp) GetLibraryFetter(fid int32) (data *cfg.GameLibraryFetterData) { + if v, err := this.GetConfigure(game_libraryfetter); err == nil { + if configure, ok := v.(*cfg.GameLibraryFetter); ok { + data = configure.Get(fid) + return + } + } else { + log.Errorf("get game_challenge conf err:%v", err) + } return } diff --git a/modules/library/module.go b/modules/library/module.go index 4666c2039..3a5094307 100644 --- a/modules/library/module.go +++ b/modules/library/module.go @@ -5,6 +5,8 @@ import ( "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/bson/primitive" ) type Library struct { @@ -44,3 +46,39 @@ func (this *Library) ModifyLibraryData(uid string, data map[string]interface{}) } return } + +//英雄列表 +func (this *Library) GetLibraryList(uid string) []*pb.DBLibrary { + return this.modelLibrary.getLibraryList(uid) +} + +//通过羁绊id 创建多个羁绊信息 +func (this *Library) CreateLibrary(uid string, fids []int32, heroConfId string) (code pb.ErrorCode, objLibrary []*pb.DBLibrary) { + for _, fid := range fids { + obj := &pb.DBLibrary{ + Id: primitive.NewObjectID().Hex(), + Uid: uid, + Fid: fid, + Hero: map[string]int32{}, + Prize: false, + Fetterlv: 0, + } + + conf := this.configure.GetLibraryFetter(fid) + if conf == nil { + for _, v := range conf.Hid { + obj.Hero[v] = 0 + if v == heroConfId { + obj.Hero[heroConfId] = 1 + } + } + if err := this.modelLibrary.createLibrary(uid, obj); err != nil { + code = pb.ErrorCode_DBError + break + } + objLibrary = append(objLibrary, obj) + } + } + + return +} diff --git a/pb/chat_db.pb.go b/pb/chat_db.pb.go index 91241c9c6..7d01192b9 100644 --- a/pb/chat_db.pb.go +++ b/pb/chat_db.pb.go @@ -84,7 +84,6 @@ const ( ChatType_Share ChatType = 2 //分享类型 ChatType_HeroShare ChatType = 3 //英雄分享 ChatType_EquipmentShare ChatType = 4 //装备分享 - ChatType_ItemShare ChatType = 5 //道具分享 ) // Enum value maps for ChatType. @@ -95,7 +94,6 @@ var ( 2: "Share", 3: "HeroShare", 4: "EquipmentShare", - 5: "ItemShare", } ChatType_value = map[string]int32{ "Text": 0, @@ -103,7 +101,6 @@ var ( "Share": 2, "HeroShare": 3, "EquipmentShare": 4, - "ItemShare": 5, } ) @@ -346,14 +343,13 @@ var file_chat_chat_db_proto_rawDesc = []byte{ 0x6c, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a, 0x0a, - 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x2a, 0x62, 0x0a, 0x08, 0x43, 0x68, 0x61, + 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x2a, 0x53, 0x0a, 0x08, 0x43, 0x68, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x71, - 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x49, 0x74, 0x65, 0x6d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x05, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x72, 0x65, 0x10, 0x04, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/library_db.pb.go b/pb/library_db.pb.go index 93dd5c8ac..35d3754d1 100644 --- a/pb/library_db.pb.go +++ b/pb/library_db.pb.go @@ -80,12 +80,12 @@ type DBLibrary struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id - Hero map[int32]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: favorlv - Prize bool `protobuf:"varint,5,opt,name=prize,proto3" json:"prize"` //是否领奖 - Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id + Hero map[string]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: favorlv + Prize bool `protobuf:"varint,5,opt,name=prize,proto3" json:"prize"` //是否领奖 + Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级 } func (x *DBLibrary) Reset() { @@ -141,7 +141,7 @@ func (x *DBLibrary) GetFid() int32 { return 0 } -func (x *DBLibrary) GetHero() map[int32]int32 { +func (x *DBLibrary) GetHero() map[string]int32 { if x != nil { return x.Hero } @@ -180,7 +180,7 @@ var file_library_library_db_proto_rawDesc = []byte{ 0x08, 0x52, 0x05, 0x70, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6c, 0x76, 0x1a, 0x37, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/pb/rtask_msg.pb.go b/pb/rtask_msg.pb.go index 9a3a04546..077259d1d 100644 --- a/pb/rtask_msg.pb.go +++ b/pb/rtask_msg.pb.go @@ -622,7 +622,6 @@ type RtaskBattleFinishReq struct { unknownFields protoimpl.UnknownFields RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID - IsWin bool `protobuf:"varint,2,opt,name=isWin,proto3" json:"isWin"` //战斗结果 Report *BattleReport `protobuf:"bytes,4,opt,name=report,proto3" json:"report"` //战报 } @@ -665,13 +664,6 @@ func (x *RtaskBattleFinishReq) GetRtaskId() int32 { return 0 } -func (x *RtaskBattleFinishReq) GetIsWin() bool { - if x != nil { - return x.IsWin - } - return false -} - func (x *RtaskBattleFinishReq) GetReport() *BattleReport { if x != nil { return x.Report @@ -685,6 +677,7 @@ type RtaskBattleFinishResp struct { unknownFields protoimpl.UnknownFields RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID + IsWin bool `protobuf:"varint,2,opt,name=isWin,proto3" json:"isWin"` //战斗结果 } func (x *RtaskBattleFinishResp) Reset() { @@ -726,6 +719,13 @@ func (x *RtaskBattleFinishResp) GetRtaskId() int32 { return 0 } +func (x *RtaskBattleFinishResp) GetIsWin() bool { + if x != nil { + return x.IsWin + } + return false +} + //获取玩家任务记录 type RtaskGetrecordReq struct { state protoimpl.MessageState @@ -979,17 +979,17 @@ var file_rtask_rtask_msg_proto_rawDesc = []byte{ 0x22, 0x37, 0x0a, 0x14, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x6d, 0x0a, 0x14, 0x52, 0x74, 0x61, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x57, 0x0a, 0x14, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x73, 0x57, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x57, 0x69, - 0x6e, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x31, 0x0a, 0x15, 0x52, 0x74, 0x61, 0x73, - 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x52, + 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x22, 0x47, 0x0a, 0x15, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, + 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x12, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, diff --git a/pb/user_msg.pb.go b/pb/user_msg.pb.go index c82f5667c..eceee096f 100644 --- a/pb/user_msg.pb.go +++ b/pb/user_msg.pb.go @@ -564,19 +564,21 @@ func (x *UserCreateResp) GetIsSucc() bool { } // 玩家资源变更推送 -type UserResChangedPush struct { +type UserResChangePush struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Gold int32 `protobuf:"varint,1,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币 Exp int32 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验 + Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 + Vip int32 `protobuf:"varint,4,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip Diamond int32 `protobuf:"varint,5,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石 Friend int32 `protobuf:"varint,6,opt,name=friend,proto3" json:"friend" bson:"frined"` //友情点 } -func (x *UserResChangedPush) Reset() { - *x = UserResChangedPush{} +func (x *UserResChangePush) Reset() { + *x = UserResChangePush{} if protoimpl.UnsafeEnabled { mi := &file_user_user_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -584,13 +586,13 @@ func (x *UserResChangedPush) Reset() { } } -func (x *UserResChangedPush) String() string { +func (x *UserResChangePush) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserResChangedPush) ProtoMessage() {} +func (*UserResChangePush) ProtoMessage() {} -func (x *UserResChangedPush) ProtoReflect() protoreflect.Message { +func (x *UserResChangePush) ProtoReflect() protoreflect.Message { mi := &file_user_user_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -602,33 +604,47 @@ func (x *UserResChangedPush) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserResChangedPush.ProtoReflect.Descriptor instead. -func (*UserResChangedPush) Descriptor() ([]byte, []int) { +// Deprecated: Use UserResChangePush.ProtoReflect.Descriptor instead. +func (*UserResChangePush) Descriptor() ([]byte, []int) { return file_user_user_msg_proto_rawDescGZIP(), []int{11} } -func (x *UserResChangedPush) GetGold() int32 { +func (x *UserResChangePush) GetGold() int32 { if x != nil { return x.Gold } return 0 } -func (x *UserResChangedPush) GetExp() int32 { +func (x *UserResChangePush) GetExp() int32 { if x != nil { return x.Exp } return 0 } -func (x *UserResChangedPush) GetDiamond() int32 { +func (x *UserResChangePush) GetLv() int32 { + if x != nil { + return x.Lv + } + return 0 +} + +func (x *UserResChangePush) GetVip() int32 { + if x != nil { + return x.Vip + } + return 0 +} + +func (x *UserResChangePush) GetDiamond() int32 { if x != nil { return x.Diamond } return 0 } -func (x *UserResChangedPush) GetFriend() int32 { +func (x *UserResChangePush) GetFriend() int32 { if x != nil { return x.Friend } @@ -1195,7 +1211,7 @@ func (x *UserGetTujianResp) GetHeroids() []string { } //玩家等级经验变化推送 -type UserLvChangedPush struct { +type UserChangedPush struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1205,8 +1221,8 @@ type UserLvChangedPush struct { Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"` } -func (x *UserLvChangedPush) Reset() { - *x = UserLvChangedPush{} +func (x *UserChangedPush) Reset() { + *x = UserChangedPush{} if protoimpl.UnsafeEnabled { mi := &file_user_user_msg_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1214,13 +1230,13 @@ func (x *UserLvChangedPush) Reset() { } } -func (x *UserLvChangedPush) String() string { +func (x *UserChangedPush) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserLvChangedPush) ProtoMessage() {} +func (*UserChangedPush) ProtoMessage() {} -func (x *UserLvChangedPush) ProtoReflect() protoreflect.Message { +func (x *UserChangedPush) ProtoReflect() protoreflect.Message { mi := &file_user_user_msg_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1232,26 +1248,26 @@ func (x *UserLvChangedPush) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserLvChangedPush.ProtoReflect.Descriptor instead. -func (*UserLvChangedPush) Descriptor() ([]byte, []int) { +// Deprecated: Use UserChangedPush.ProtoReflect.Descriptor instead. +func (*UserChangedPush) Descriptor() ([]byte, []int) { return file_user_user_msg_proto_rawDescGZIP(), []int{24} } -func (x *UserLvChangedPush) GetUid() string { +func (x *UserChangedPush) GetUid() string { if x != nil { return x.Uid } return "" } -func (x *UserLvChangedPush) GetExp() int32 { +func (x *UserChangedPush) GetExp() int32 { if x != nil { return x.Exp } return 0 } -func (x *UserLvChangedPush) GetLv() int32 { +func (x *UserChangedPush) GetLv() int32 { if x != nil { return x.Lv } @@ -1555,47 +1571,49 @@ var file_user_user_msg_proto_rawDesc = []byte{ 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, - 0x63, 0x22, 0x6c, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, + 0x63, 0x22, 0x8d, 0x01, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, - 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, - 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x07, + 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, + 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, + 0x03, 0x76, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x22, 0x13, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x22, 0x3e, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, 0x0a, 0x0f, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x73, 0x65, - 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, - 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, - 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, - 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, - 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x47, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x4c, - 0x76, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x40, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, + 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x29, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x22, 0x26, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, + 0x72, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x25, + 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x24, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x69, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x47, 0x65, + 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x2d, 0x0a, 0x11, 0x55, 0x73, + 0x65, 0x72, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x73, 0x22, 0x45, 0x0a, 0x0f, 0x55, 0x73, 0x65, + 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, @@ -1653,7 +1671,7 @@ var file_user_user_msg_proto_goTypes = []interface{}{ (*UserLoadResp)(nil), // 8: UserLoadResp (*UserCreateReq)(nil), // 9: UserCreateReq (*UserCreateResp)(nil), // 10: UserCreateResp - (*UserResChangedPush)(nil), // 11: UserResChangedPush + (*UserResChangePush)(nil), // 11: UserResChangePush (*UserGetSettingReq)(nil), // 12: UserGetSettingReq (*UserGetSettingResp)(nil), // 13: UserGetSettingResp (*UserUpdateSettingReq)(nil), // 14: UserUpdateSettingReq @@ -1666,7 +1684,7 @@ var file_user_user_msg_proto_goTypes = []interface{}{ (*UserModifynameResp)(nil), // 21: UserModifynameResp (*UserGetTujianReq)(nil), // 22: UserGetTujianReq (*UserGetTujianResp)(nil), // 23: UserGetTujianResp - (*UserLvChangedPush)(nil), // 24: UserLvChangedPush + (*UserChangedPush)(nil), // 24: UserChangedPush (*UserFigureReq)(nil), // 25: UserFigureReq (*UserFigureResp)(nil), // 26: UserFigureResp (*UserModifysignReq)(nil), // 27: UserModifysignReq @@ -1847,7 +1865,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserResChangedPush); i { + switch v := v.(*UserResChangePush); i { case 0: return &v.state case 1: @@ -2003,7 +2021,7 @@ func file_user_user_msg_proto_init() { } } file_user_user_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserLvChangedPush); i { + switch v := v.(*UserChangedPush); i { case 0: return &v.state case 1: