上传体力协议优化

This commit is contained in:
liwei1dao 2023-01-03 14:44:55 +08:00
parent d1bd0b4669
commit 85f6fc5c61
2 changed files with 18 additions and 8 deletions

View File

@ -68,6 +68,6 @@ func (this *apiComp) BuyPhysical(session comm.IUserSession, req *pb.ItemsBuyPhys
"physicalbuynum": user.Physicalbuynum,
"physicalbuyLasttime": user.PhysicalbuyLasttime,
})
session.SendMsg(string(this.module.GetType()), "buyphysical", &pb.ItemsBuyPhysicalResp{Issucc: true, Asets: []*pb.UserAssets{{A: comm.ItemType, T: comm.PhysicalMedicament, N: int32(req.Amount)}}})
session.SendMsg(string(this.module.GetType()), "buyphysical", &pb.ItemsBuyPhysicalResp{Issucc: true, PhysicalBuyNum: user.Physicalbuynum, Asets: []*pb.UserAssets{{A: comm.ItemType, T: comm.PhysicalMedicament, N: int32(req.Amount)}}})
return
}

View File

@ -603,7 +603,8 @@ type ItemsBuyPhysicalResp struct {
unknownFields protoimpl.UnknownFields
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` //是否成功
Asets []*UserAssets `protobuf:"bytes,2,rep,name=asets,proto3" json:"asets"` //获取资源
PhysicalBuyNum int32 `protobuf:"varint,2,opt,name=PhysicalBuyNum,proto3" json:"PhysicalBuyNum"` //体力购买次数
Asets []*UserAssets `protobuf:"bytes,3,rep,name=asets,proto3" json:"asets"` //获取资源
}
func (x *ItemsBuyPhysicalResp) Reset() {
@ -645,6 +646,13 @@ func (x *ItemsBuyPhysicalResp) GetIssucc() bool {
return false
}
func (x *ItemsBuyPhysicalResp) GetPhysicalBuyNum() int32 {
if x != nil {
return x.PhysicalBuyNum
}
return 0
}
func (x *ItemsBuyPhysicalResp) GetAsets() []*UserAssets {
if x != nil {
return x.Asets
@ -706,13 +714,15 @@ var file_items_items_msg_proto_rawDesc = []byte{
0x73, 0x75, 0x63, 0x63, 0x22, 0x2d, 0x0a, 0x13, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x75, 0x79,
0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x41,
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x41, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x75, 0x79, 0x50,
0x75, 0x6e, 0x74, 0x22, 0x79, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x75, 0x79, 0x50,
0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69,
0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73,
0x75, 0x63, 0x63, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52,
0x05, 0x61, 0x73, 0x65, 0x74, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x75, 0x63, 0x63, 0x12, 0x26, 0x0a, 0x0e, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42,
0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x50, 0x68, 0x79,
0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x05, 0x61,
0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x73, 0x65, 0x74, 0x73, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (