上传月子秘境代码
This commit is contained in:
parent
9ad0ff2a48
commit
4678cbd83e
@ -88,7 +88,7 @@ func (this *apiComp) Ask(session comm.IUserSession, req *pb.MoonfantasyAskReq) (
|
|||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
mdata.Join = append(mdata.Join, &pb.UserInfo{Uid: user.Uid, Name: user.Name, Avatar: user.Avatar})
|
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.Change(mdata.Id, map[string]interface{}{
|
||||||
"join": mdata.Join,
|
"join": mdata.Join,
|
||||||
})
|
})
|
||||||
|
@ -114,7 +114,7 @@ func (this *modelDreamComp) trigger(session comm.IUserSession, source *pb.Battle
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if mdata, err = this.module.modelDream.addDreamData(&pb.UserInfo{Uid: user.Uid, Name: user.Name, Avatar: user.Avatar}, boss); err != nil {
|
if mdata, err = this.module.modelDream.addDreamData(&pb.UserInfo{Uid: user.Uid, Name: user.Name, Avatar: user.Avatar, Lv: user.Lv}, boss); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
umfantasy.Mfantasys = append(umfantasy.Mfantasys, mdata.Id)
|
umfantasy.Mfantasys = append(umfantasy.Mfantasys, mdata.Id)
|
||||||
|
@ -25,9 +25,10 @@ type UserInfo struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id
|
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id
|
||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //昵称
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //昵称
|
||||||
Avatar string `protobuf:"bytes,12,opt,name=avatar,proto3" json:"avatar"` // 头像
|
Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar"` // 头像
|
||||||
|
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"` //等级
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserInfo) Reset() {
|
func (x *UserInfo) Reset() {
|
||||||
@ -83,6 +84,13 @@ func (x *UserInfo) GetAvatar() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *UserInfo) GetLv() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Lv
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
//月之秘境
|
//月之秘境
|
||||||
type DBMoonFantasy struct {
|
type DBMoonFantasy struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -288,11 +296,12 @@ var File_moonfantasy_moonfantasy_db_proto protoreflect.FileDescriptor
|
|||||||
var file_moonfantasy_moonfantasy_db_proto_rawDesc = []byte{
|
var file_moonfantasy_moonfantasy_db_proto_rawDesc = []byte{
|
||||||
0x0a, 0x20, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x2f, 0x6d, 0x6f,
|
0x0a, 0x20, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x2f, 0x6d, 0x6f,
|
||||||
0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f,
|
0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x6f, 0x22, 0x48, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10,
|
0x74, 0x6f, 0x22, 0x58, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10,
|
||||||
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
|
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c,
|
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x9f, 0x02, 0x0a,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02,
|
||||||
|
0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x9f, 0x02, 0x0a,
|
||||||
0x0d, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x46, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x12, 0x0e,
|
0x0d, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x46, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x12, 0x0e,
|
||||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
|
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,
|
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
|
||||||
|
Loading…
Reference in New Issue
Block a user