Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
f532b7d254
@ -132,6 +132,21 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
update["stageId"] = curChapter.StageId
|
||||
|
||||
if first { // 发奖
|
||||
if rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId()); err == nil { // 统计主线进度
|
||||
_mp := rst.Mline
|
||||
if v, ok := _mp[curChapter.CType]; ok {
|
||||
if v <= req.StageId {
|
||||
_mp[curChapter.CType] = req.StageId
|
||||
}
|
||||
} else {
|
||||
_mp = make(map[int32]int32, 0)
|
||||
_mp[curChapter.CType] = req.StageId
|
||||
}
|
||||
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
|
||||
"mline": _mp,
|
||||
})
|
||||
}
|
||||
|
||||
if code = this.module.DispenseRes(session, stageConf.Firstaward, true); code != pb.ErrorCode_Success {
|
||||
this.module.Debugf("Mline first DispenseRes err:+%v", stageConf.Firstaward)
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ type DBUserExpand struct {
|
||||
Recovertimeunifiedticket int64 `protobuf:"varint,31,opt,name=recovertimeunifiedticket,proto3" json:"recovertimeunifiedticket"` //@go_tags(`bson:"recovertimeunifiedticket"`)同意门票恢复时间
|
||||
SociatyTicketBuyNum int32 `protobuf:"varint,32,opt,name=sociatyTicketBuyNum,proto3" json:"sociatyTicketBuyNum" bson:"sociatyTicketBuyNum"` //公会boss挑战券购买次数
|
||||
SociatyTicket int32 `protobuf:"varint,33,opt,name=sociatyTicket,proto3" json:"sociatyTicket" bson:"sociatyTicket"` //公会boss挑战券数量
|
||||
Mline map[int32]int32 `protobuf:"bytes,34,rep,name=mline,proto3" json:"mline" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"mline"` //主线关卡最大进度
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) Reset() {
|
||||
@ -292,11 +293,18 @@ func (x *DBUserExpand) GetSociatyTicket() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) GetMline() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Mline
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_userexpand_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_userexpand_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x84, 0x09, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70,
|
||||
0x74, 0x6f, 0x22, 0xee, 0x09, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70,
|
||||
0x61, 0x6e, 0x64, 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, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61,
|
||||
@ -364,12 +372,19 @@ var file_userexpand_proto_rawDesc = []byte{
|
||||
0x01, 0x28, 0x05, 0x52, 0x13, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, 0x63, 0x69,
|
||||
0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0d, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x39,
|
||||
0x0d, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2e,
|
||||
0x0a, 0x05, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x22, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
||||
0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x2e, 0x4d, 0x6c, 0x69,
|
||||
0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x6d, 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0x39,
|
||||
0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 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,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x4d, 0x6c, 0x69,
|
||||
0x6e, 0x65, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -384,18 +399,20 @@ func file_userexpand_proto_rawDescGZIP() []byte {
|
||||
return file_userexpand_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_userexpand_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_userexpand_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_userexpand_proto_goTypes = []interface{}{
|
||||
(*DBUserExpand)(nil), // 0: DBUserExpand
|
||||
nil, // 1: DBUserExpand.TujianEntry
|
||||
nil, // 2: DBUserExpand.MlineEntry
|
||||
}
|
||||
var file_userexpand_proto_depIdxs = []int32{
|
||||
1, // 0: DBUserExpand.tujian:type_name -> DBUserExpand.TujianEntry
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
2, // 1: DBUserExpand.mline:type_name -> DBUserExpand.MlineEntry
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_userexpand_proto_init() }
|
||||
@ -423,7 +440,7 @@ func file_userexpand_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_userexpand_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user