From 85f6fc5c616e35f1d25249aa8427b304c0d0e0b8 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 3 Jan 2023 14:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BD=93=E5=8A=9B=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/items/api_buyphysical.go | 2 +- pb/items_msg.pb.go | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/modules/items/api_buyphysical.go b/modules/items/api_buyphysical.go index 400022400..9882b10a5 100644 --- a/modules/items/api_buyphysical.go +++ b/modules/items/api_buyphysical.go @@ -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 } diff --git a/pb/items_msg.pb.go b/pb/items_msg.pb.go index 5427ee41f..167b59ecc 100644 --- a/pb/items_msg.pb.go +++ b/pb/items_msg.pb.go @@ -602,8 +602,9 @@ type ItemsBuyPhysicalResp struct { sizeCache protoimpl.SizeCache 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"` //获取资源 + Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` //是否成功 + 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 (