From 73ab7486cfe54fa7a72a23db7107841cc146139a Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 30 Nov 2022 13:57:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E8=BF=94=E5=9B=9E=E5=B7=B2?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api_buy.go | 6 +++++- modules/library/api_activationfetter.go | 2 +- pb/hero_msg.pb.go | 25 ++++++++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/modules/hero/api_buy.go b/modules/hero/api_buy.go index d2454fc9a..df951e7cc 100644 --- a/modules/hero/api_buy.go +++ b/modules/hero/api_buy.go @@ -118,6 +118,10 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (code pb this.module.ModuleRtask.SendToRtask(session, comm.Rtype67, v.N, utils.ToInt32(v.T)) } } - session.SendMsg(string(this.module.GetType()), "buy", &pb.HeroBuyResp{IsSucc: true}) + session.SendMsg(string(this.module.GetType()), "buy", &pb.HeroBuyResp{ + IsSucc: true, + Onebuy: record.Onebuy + req.BuyCount, + Tenbuy: record.Tenbuy + req.BuyCount, + }) return } diff --git a/modules/library/api_activationfetter.go b/modules/library/api_activationfetter.go index 8eb217f3e..6dadef94b 100644 --- a/modules/library/api_activationfetter.go +++ b/modules/library/api_activationfetter.go @@ -37,7 +37,7 @@ func (this *apiComp) ActivationFetter(session comm.IUserSession, req *pb.Library mapData["activation"] = fetter.Activation // 激活的时候算一下 当前羁绊等级 list := this.module.modelFetter.getHeroFetterList(session.GetUserId()) - conf := this.configure.GetLibraryFetter(fetter.Fid, 1) + conf := this.module.configure.GetLibraryFetter(fetter.Fid, 1) var minLv int32 for _, v1 := range conf.Hid { for _, v := range list { diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 94a001121..5eb2759dd 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -2181,7 +2181,9 @@ type HeroBuyResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IsSucc bool `protobuf:"varint,1,opt,name=IsSucc,proto3" json:"IsSucc"` + IsSucc bool `protobuf:"varint,1,opt,name=IsSucc,proto3" json:"IsSucc"` + Onebuy int32 `protobuf:"varint,3,opt,name=onebuy,proto3" json:"onebuy"` // 单次购买次数 + Tenbuy int32 `protobuf:"varint,4,opt,name=tenbuy,proto3" json:"tenbuy"` // 十连购买次数 } func (x *HeroBuyResp) Reset() { @@ -2223,6 +2225,20 @@ func (x *HeroBuyResp) GetIsSucc() bool { return false } +func (x *HeroBuyResp) GetOnebuy() int32 { + if x != nil { + return x.Onebuy + } + return 0 +} + +func (x *HeroBuyResp) GetTenbuy() int32 { + if x != nil { + return x.Tenbuy + } + return 0 +} + var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ @@ -2417,9 +2433,12 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x0a, 0x07, 0x62, 0x75, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x75, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x75, 0x79, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x25, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x42, 0x75, 0x79, 0x52, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x6e, 0x65, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x6e, 0x65, + 0x62, 0x75, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }