上传代码

This commit is contained in:
liwei1dao 2023-08-11 22:01:44 +08:00
parent 433f72c4e4
commit 885ea3da93
4 changed files with 42 additions and 22 deletions

View File

@ -95,7 +95,7 @@ func (this *apiComp) CompleteAllTask(session comm.IUserSession, req *pb.Warorder
for _, v := range condis {
condisMap[v.Conid] = v
}
completetasks = make(map[int32]bool)
for _, v := range dwarorder.Completetasks {
completetasks[v] = true
}
@ -161,6 +161,6 @@ func (this *apiComp) CompleteAllTask(session comm.IUserSession, req *pb.Warorder
}
return
}
session.SendMsg(string(this.module.GetType()), "completealltask", &pb.WarorderCompleteAllTaskResp{Rtype: req.Rtype, Completetasks: dwarorder.Completetasks, Exp: dwarorder.Exp, Lv: dwarorder.Lv})
session.SendMsg(string(this.module.GetType()), "completealltask", &pb.WarorderCompleteAllTaskResp{Rtype: req.Rtype, Completetasks: dwarorder.Completetasks, Exp: dwarorder.Exp, Lv: dwarorder.Lv, Weekexp: dwarorder.Weekexp})
return
}

View File

@ -157,6 +157,6 @@ func (this *apiComp) CompleteTask(session comm.IUserSession, req *pb.WarorderCom
}
return
}
session.SendMsg(string(this.module.GetType()), "completetask", &pb.WarorderCompleteTaskResp{Rtype: req.Rtype, Tid: req.Tid, Exp: dwarorder.Exp, Lv: dwarorder.Lv})
session.SendMsg(string(this.module.GetType()), "completetask", &pb.WarorderCompleteTaskResp{Rtype: req.Rtype, Tid: req.Tid, Exp: dwarorder.Exp, Lv: dwarorder.Lv, Weekexp: dwarorder.Weekexp})
return
}

View File

@ -179,8 +179,9 @@ func (this *configureComp) getWarorderLvByExp(exp int32, wtype int32) (conf *cfg
for _, v := range exps {
if exp < v.Parameter {
conf = v
return
} else {
conf = v
}
}
return

View File

@ -440,10 +440,11 @@ type WarorderCompleteTaskResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"`
Tid int32 `protobuf:"varint,2,opt,name=tid,proto3" json:"tid"`
Exp int32 `protobuf:"varint,3,opt,name=exp,proto3" json:"exp"`
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"`
Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"`
Tid int32 `protobuf:"varint,2,opt,name=tid,proto3" json:"tid"`
Exp int32 `protobuf:"varint,3,opt,name=exp,proto3" json:"exp"`
Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"`
Weekexp int32 `protobuf:"varint,5,opt,name=weekexp,proto3" json:"weekexp"`
}
func (x *WarorderCompleteTaskResp) Reset() {
@ -506,6 +507,13 @@ func (x *WarorderCompleteTaskResp) GetLv() int32 {
return 0
}
func (x *WarorderCompleteTaskResp) GetWeekexp() int32 {
if x != nil {
return x.Weekexp
}
return 0
}
//如梦战令 完成任务
type WarorderCompleteAllTaskReq struct {
state protoimpl.MessageState
@ -563,7 +571,8 @@ type WarorderCompleteAllTaskResp struct {
Rtype int32 `protobuf:"varint,1,opt,name=rtype,proto3" json:"rtype"`
Exp int32 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp"`
Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"`
Completetasks []int32 `protobuf:"varint,4,rep,packed,name=completetasks,proto3" json:"completetasks"`
Weekexp int32 `protobuf:"varint,4,opt,name=weekexp,proto3" json:"weekexp"`
Completetasks []int32 `protobuf:"varint,5,rep,packed,name=completetasks,proto3" json:"completetasks"`
}
func (x *WarorderCompleteAllTaskResp) Reset() {
@ -619,6 +628,13 @@ func (x *WarorderCompleteAllTaskResp) GetLv() int32 {
return 0
}
func (x *WarorderCompleteAllTaskResp) GetWeekexp() int32 {
if x != nil {
return x.Weekexp
}
return 0
}
func (x *WarorderCompleteAllTaskResp) GetCompletetasks() []int32 {
if x != nil {
return x.Completetasks
@ -674,26 +690,29 @@ var file_warorder_warorder_msg_proto_rawDesc = []byte{
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,
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, 0x64, 0x0a, 0x18, 0x57,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x22, 0x7e, 0x0a, 0x18, 0x57,
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,
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,
0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78,
0x70, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c,
0x76, 0x22, 0x32, 0x0a, 0x1a, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d,
0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12,
0x76, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x65, 0x6b, 0x65, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x77, 0x65, 0x65, 0x6b, 0x65, 0x78, 0x70, 0x22, 0x32, 0x0a, 0x1a, 0x57,
0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41,
0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 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, 0x22,
0x95, 0x01, 0x0a, 0x1b, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70,
0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x54, 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, 0x22, 0x7b, 0x0a, 0x1b, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x54, 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, 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, 0x12, 0x24, 0x0a, 0x0d,
0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x04, 0x20,
0x03, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73,
0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x72, 0x74, 0x79, 0x70, 0x65, 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, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x65, 0x6b, 0x65,
0x78, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x65, 0x65, 0x6b, 0x65, 0x78,
0x70, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73,
0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (