This commit is contained in:
meixiongfeng 2023-08-11 18:45:05 +08:00
commit 378a891dbf
3 changed files with 15 additions and 4 deletions

View File

@ -45,6 +45,8 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
if _, ok := levels[conf.Param]; !ok { if _, ok := levels[conf.Param]; !ok {
return "" return ""
} }
} else {
return ""
} }
case 3: //世界任务ID case 3: //世界任务ID
d := this.moduleSys.wtask.InquireCompletes(uid) d := this.moduleSys.wtask.InquireCompletes(uid)

View File

@ -122,7 +122,7 @@ func (this *apiComp) CompleteTask(session comm.IUserSession, req *pb.WarorderCom
} }
for _, v := range condis { for _, v := range condis {
if v.State != pb.BuriedItemFinishState_buried_unfinish { if v.State == pb.BuriedItemFinishState_buried_unfinish {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError, Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(), Title: pb.ErrorCode_ReqParameterError.ToString(),
@ -157,6 +157,6 @@ func (this *apiComp) CompleteTask(session comm.IUserSession, req *pb.WarorderCom
} }
return return
} }
session.SendMsg(string(this.module.GetType()), "completetask", &pb.WarorderCompleteTaskResp{Rtype: req.Rtype, Tid: req.Tid, Exp: dwarorder.Exp}) session.SendMsg(string(this.module.GetType()), "completetask", &pb.WarorderCompleteTaskResp{Rtype: req.Rtype, Tid: req.Tid, Exp: dwarorder.Exp, Lv: dwarorder.Lv})
return return
} }

View File

@ -443,6 +443,7 @@ type WarorderCompleteTaskResp struct {
Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"` Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"`
Tid int32 `protobuf:"varint,2,opt,name=tid,proto3" json:"tid"` Tid int32 `protobuf:"varint,2,opt,name=tid,proto3" json:"tid"`
Exp int32 `protobuf:"varint,3,opt,name=exp,proto3" json:"exp"` Exp int32 `protobuf:"varint,3,opt,name=exp,proto3" json:"exp"`
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"`
} }
func (x *WarorderCompleteTaskResp) Reset() { func (x *WarorderCompleteTaskResp) Reset() {
@ -498,6 +499,13 @@ func (x *WarorderCompleteTaskResp) GetExp() int32 {
return 0 return 0
} }
func (x *WarorderCompleteTaskResp) GetLv() int32 {
if x != nil {
return x.Lv
}
return 0
}
var File_warorder_warorder_msg_proto protoreflect.FileDescriptor var File_warorder_warorder_msg_proto protoreflect.FileDescriptor
var file_warorder_warorder_msg_proto_rawDesc = []byte{ var file_warorder_warorder_msg_proto_rawDesc = []byte{
@ -546,13 +554,14 @@ var file_warorder_warorder_msg_proto_rawDesc = []byte{
0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b,
0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x54, 0x0a, 0x18, 0x57, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x18, 0x57,
0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54,
0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x74, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x03, 0x74, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12,
0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78,
0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c,
0x76, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33, 0x33,
} }