购买返回已购买次数
This commit is contained in:
parent
ea4c8e16fe
commit
73ab7486cf
@ -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))
|
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
|
return
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ func (this *apiComp) ActivationFetter(session comm.IUserSession, req *pb.Library
|
|||||||
mapData["activation"] = fetter.Activation
|
mapData["activation"] = fetter.Activation
|
||||||
// 激活的时候算一下 当前羁绊等级
|
// 激活的时候算一下 当前羁绊等级
|
||||||
list := this.module.modelFetter.getHeroFetterList(session.GetUserId())
|
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
|
var minLv int32
|
||||||
for _, v1 := range conf.Hid {
|
for _, v1 := range conf.Hid {
|
||||||
for _, v := range list {
|
for _, v := range list {
|
||||||
|
@ -2181,7 +2181,9 @@ type HeroBuyResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
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() {
|
func (x *HeroBuyResp) Reset() {
|
||||||
@ -2223,6 +2225,20 @@ func (x *HeroBuyResp) GetIsSucc() bool {
|
|||||||
return false
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_hero_hero_msg_proto_rawDesc = []byte{
|
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,
|
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,
|
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, 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,
|
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,
|
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user