主线商店调整
This commit is contained in:
parent
93999a011f
commit
d8638a2bc0
@ -38,18 +38,15 @@ func (this *apiComp) Shop(session comm.IUserSession, req *pb.MainlineShopReq) (e
|
||||
for _, v := range shopinfo {
|
||||
condiIds = append(condiIds, v.Unlock)
|
||||
}
|
||||
info.Unlock = map[int32]*pb.MlineShopUnlockData{}
|
||||
info.Unlock = make(map[int32]int32)
|
||||
if data, err := this.module.ModuleBuried.CheckCondition(session.GetUserId(), condiIds...); err == nil {
|
||||
for pos, v := range data {
|
||||
if int32(v.State) == 1 { // 记录解锁的数据
|
||||
szUnlock = append(szUnlock, int32(v.State))
|
||||
shopid := shopinfo[pos].Shopid
|
||||
if _, ok := info.Unlock[shopid]; !ok {
|
||||
info.Unlock[shopid] = &pb.MlineShopUnlockData{
|
||||
Item: []int32{},
|
||||
}
|
||||
info.Unlock[shopid] = 1
|
||||
}
|
||||
info.Unlock[shopid].Item = append(info.Unlock[shopid].Item, shopinfo[pos].Id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) ShopBuyCheck(session comm.IUserSession, req *pb.MainlineShopBuyReq) (errdata *pb.ErrorData) {
|
||||
if req.Shopid == 0 || req.Itemid == 0 {
|
||||
if req.Cid <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
@ -43,7 +43,7 @@ func (this *apiComp) ShopBuy(session comm.IUserSession, req *pb.MainlineShopBuyR
|
||||
return
|
||||
}
|
||||
|
||||
if shopConf, err = this.module.configure.GetMainShopConf(req.Shopid, req.Itemid); err != nil {
|
||||
if shopConf, err = this.module.configure.GetMlineShopConfById(req.Cid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
@ -54,12 +54,8 @@ func (this *apiComp) ShopBuy(session comm.IUserSession, req *pb.MainlineShopBuyR
|
||||
// 检查是否需要解锁
|
||||
if shopConf.Unlock != 0 {
|
||||
bUnlock = false
|
||||
if unlock, ok := info.Unlock[req.Shopid]; ok {
|
||||
for _, v := range unlock.Item {
|
||||
if v == req.Itemid {
|
||||
bUnlock = true
|
||||
}
|
||||
}
|
||||
if _, ok := info.Unlock[req.Cid]; ok {
|
||||
bUnlock = true
|
||||
}
|
||||
}
|
||||
if !bUnlock {
|
||||
@ -69,24 +65,14 @@ func (this *apiComp) ShopBuy(session comm.IUserSession, req *pb.MainlineShopBuyR
|
||||
}
|
||||
return
|
||||
}
|
||||
if v, ok := info.Buytime[req.Shopid]; !ok {
|
||||
item := make(map[int32]int32, 0)
|
||||
item[req.Itemid] = 1
|
||||
info.Buytime[req.Shopid] = &pb.MlineShopData{
|
||||
Item: item,
|
||||
}
|
||||
} else { // 校验是否达到限购
|
||||
if v1, ok := v.Item[req.Itemid]; !ok {
|
||||
v.Item[req.Itemid] += 1
|
||||
} else {
|
||||
if shopConf.Bugtime >= v1 { // 限购了 买不了
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_MainlineBuyMaxCount,
|
||||
Title: pb.ErrorCode_MainlineBuyMaxCount.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
info.Buytime[req.Cid] += 1
|
||||
|
||||
if shopConf.Bugtime >= info.Buytime[req.Cid] { // 限购了 买不了
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_MainlineBuyMaxCount,
|
||||
Title: pb.ErrorCode_MainlineBuyMaxCount.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if errdata = this.module.ConsumeRes(session, shopConf.Need, true); errdata != nil {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
@ -25,7 +24,6 @@ type configureComp struct {
|
||||
lock sync.RWMutex
|
||||
chapterMap map[int32][]*cfg.GameMainStageData
|
||||
rewardMap map[int32][]*cfg.GameMainStarrewardData
|
||||
shopItem map[int64]*cfg.GameMainShopItemData
|
||||
}
|
||||
|
||||
// 组件初始化接口
|
||||
@ -33,15 +31,13 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
this.module = module.(*Mainline)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
game_mainchapter: cfg.NewGameMainChapter,
|
||||
game_mainchapter: cfg.NewGameMainChapter,
|
||||
game_mainshopitem: cfg.NewGameMainShopItem,
|
||||
})
|
||||
this.chapterMap = make(map[int32][]*cfg.GameMainStageData)
|
||||
configure.RegisterConfigure(game_mainstage, cfg.NewGameMainStage, this.updateMlineStage)
|
||||
configure.RegisterConfigure(game_mainstarreward, cfg.NewGameMainStarreward, this.updateMlineReward)
|
||||
|
||||
configure.RegisterConfigure(game_mainshopitem, cfg.NewGameMainShopItem, this.ReloadMainShop)
|
||||
|
||||
this.GetMainShopConf(11001, 110001)
|
||||
return
|
||||
}
|
||||
|
||||
@ -155,40 +151,6 @@ func (this *configureComp) GetMainStageConf(id int32) (data *cfg.GameMainStageDa
|
||||
err = comm.NewNotFoundConfErr(moduleName, game_mainstage, id)
|
||||
return
|
||||
}
|
||||
func (this *configureComp) ReloadMainShop() {
|
||||
var (
|
||||
v interface{}
|
||||
configure *cfg.GameMainShopItem
|
||||
shopItem map[int64]*cfg.GameMainShopItemData
|
||||
err error
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_mainshopitem); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
if configure, ok = v.(*cfg.GameMainShopItem); ok {
|
||||
shopItem = make(map[int64]*cfg.GameMainShopItemData, 0)
|
||||
for _, v := range configure.GetDataList() {
|
||||
key := int64(v.Shopid)<<16 + int64(v.Id)
|
||||
shopItem[key] = v
|
||||
}
|
||||
}
|
||||
this.lock.Lock()
|
||||
this.shopItem = shopItem
|
||||
this.lock.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetMainShopConf(shopid int32, id int32) (conf *cfg.GameMainShopItemData, err error) {
|
||||
var ok bool
|
||||
key := int64(shopid)<<16 + int64(id)
|
||||
if conf, ok = this.shopItem[key]; ok {
|
||||
return
|
||||
}
|
||||
err = comm.NewNotFoundConfErr(moduleName, game_mainshopitem, fmt.Sprintf("shopid:%d,id:%d", shopid, id))
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetAllShopConf() (sz []*cfg.GameMainShopItemData) {
|
||||
if v, err := this.GetConfigure(game_mainshopitem); err == nil {
|
||||
@ -202,3 +164,17 @@ func (this *configureComp) GetAllShopConf() (sz []*cfg.GameMainShopItemData) {
|
||||
}
|
||||
return
|
||||
}
|
||||
func (this *configureComp) GetMlineShopConfById(cid int32) (conf *cfg.GameMainShopItemData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
if v, err = this.GetConfigure(game_mainshopitem); err == nil {
|
||||
if configure, ok := v.(*cfg.GameMainShopItem); ok {
|
||||
if conf = configure.Get(cid); conf != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
err = comm.NewNotFoundConfErr(moduleName, game_mainstage, cid)
|
||||
return
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ func (this *ModelShop) getMainlineShopData(uid string) (results *pb.DBMainlineSh
|
||||
results = &pb.DBMainlineShop{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Uid: uid,
|
||||
Buytime: map[int32]*pb.MlineShopData{},
|
||||
Unlock: map[int32]*pb.MlineShopUnlockData{},
|
||||
Buytime: map[int32]int32{},
|
||||
Unlock: map[int32]int32{},
|
||||
}
|
||||
err = this.Add(uid, results)
|
||||
}
|
||||
|
1046
pb/errorcode.pb.go
1046
pb/errorcode.pb.go
File diff suppressed because it is too large
Load Diff
@ -178,116 +178,22 @@ func (x *DBMainlineAward) GetStage() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type MlineShopData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Item map[int32]int32 `protobuf:"bytes,1,rep,name=item,proto3" json:"item" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *MlineShopData) Reset() {
|
||||
*x = MlineShopData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineShopData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineShopData) ProtoMessage() {}
|
||||
|
||||
func (x *MlineShopData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MlineShopData.ProtoReflect.Descriptor instead.
|
||||
func (*MlineShopData) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_db_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *MlineShopData) GetItem() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Item
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MlineShopUnlockData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Item []int32 `protobuf:"varint,1,rep,packed,name=item,proto3" json:"item"`
|
||||
}
|
||||
|
||||
func (x *MlineShopUnlockData) Reset() {
|
||||
*x = MlineShopUnlockData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MlineShopUnlockData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MlineShopUnlockData) ProtoMessage() {}
|
||||
|
||||
func (x *MlineShopUnlockData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MlineShopUnlockData.ProtoReflect.Descriptor instead.
|
||||
func (*MlineShopUnlockData) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_db_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *MlineShopUnlockData) GetItem() []int32 {
|
||||
if x != nil {
|
||||
return x.Item
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 主线商店
|
||||
type DBMainlineShop struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //
|
||||
Buytime map[int32]*MlineShopData `protobuf:"bytes,3,rep,name=buytime,proto3" json:"buytime" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 当前商品购买次数次数
|
||||
Unlock map[int32]*MlineShopUnlockData `protobuf:"bytes,4,rep,name=unlock,proto3" json:"unlock" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 商品解锁条件
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //
|
||||
Buytime map[int32]int32 `protobuf:"bytes,3,rep,name=buytime,proto3" json:"buytime" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 当前商品购买次数次数
|
||||
Unlock map[int32]int32 `protobuf:"bytes,4,rep,name=unlock,proto3" json:"unlock" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 商品解锁条件
|
||||
}
|
||||
|
||||
func (x *DBMainlineShop) Reset() {
|
||||
*x = DBMainlineShop{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[4]
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -300,7 +206,7 @@ func (x *DBMainlineShop) String() string {
|
||||
func (*DBMainlineShop) ProtoMessage() {}
|
||||
|
||||
func (x *DBMainlineShop) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[4]
|
||||
mi := &file_mainline_mainline_db_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -313,7 +219,7 @@ func (x *DBMainlineShop) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DBMainlineShop.ProtoReflect.Descriptor instead.
|
||||
func (*DBMainlineShop) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_db_proto_rawDescGZIP(), []int{4}
|
||||
return file_mainline_mainline_db_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DBMainlineShop) GetId() string {
|
||||
@ -330,14 +236,14 @@ func (x *DBMainlineShop) GetUid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBMainlineShop) GetBuytime() map[int32]*MlineShopData {
|
||||
func (x *DBMainlineShop) GetBuytime() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Buytime
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBMainlineShop) GetUnlock() map[int32]*MlineShopUnlockData {
|
||||
func (x *DBMainlineShop) GetUnlock() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Unlock
|
||||
}
|
||||
@ -408,38 +314,26 @@ var file_mainline_mainline_db_proto_rawDesc = []byte{
|
||||
0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x76, 0x0a, 0x0d, 0x4d, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x04, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x4d, 0x6c, 0x69, 0x6e,
|
||||
0x65, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x1a, 0x37, 0x0a, 0x09, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||
0x38, 0x01, 0x22, 0x29, 0x0a, 0x13, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x55,
|
||||
0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xbc, 0x02,
|
||||
0x0a, 0x0e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x69, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x62, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x2e, 0x42, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x52, 0x07, 0x62, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x75, 0x6e,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x4d,
|
||||
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x2e, 0x55, 0x6e, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x1a,
|
||||
0x4a, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0e, 0x2e, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61,
|
||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4f, 0x0a, 0x0b, 0x55,
|
||||
0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x4d, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x61, 0x74,
|
||||
0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x02, 0x0a, 0x0e, 0x44,
|
||||
0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||
0x36, 0x0a, 0x07, 0x62, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x1c, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f,
|
||||
0x70, 0x2e, 0x42, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07,
|
||||
0x62, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x75, 0x6e, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3a, 0x0a, 0x0c,
|
||||
0x42, 0x75, 0x79, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x55, 0x6e, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -454,45 +348,39 @@ func file_mainline_mainline_db_proto_rawDescGZIP() []byte {
|
||||
return file_mainline_mainline_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mainline_mainline_db_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_mainline_mainline_db_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_mainline_mainline_db_proto_goTypes = []interface{}{
|
||||
(*DBMainline)(nil), // 0: DBMainline
|
||||
(*DBMainlineAward)(nil), // 1: DBMainlineAward
|
||||
(*MlineShopData)(nil), // 2: MlineShopData
|
||||
(*MlineShopUnlockData)(nil), // 3: MlineShopUnlockData
|
||||
(*DBMainlineShop)(nil), // 4: DBMainlineShop
|
||||
nil, // 5: DBMainline.LastlevelEntry
|
||||
nil, // 6: DBMainline.LevelEntry
|
||||
nil, // 7: DBMainline.ChapterawardEntry
|
||||
nil, // 8: DBMainline.ExploreawardEntry
|
||||
nil, // 9: DBMainline.GroupawardEntry
|
||||
nil, // 10: DBMainline.PsEntry
|
||||
nil, // 11: DBMainlineAward.AwardEntry
|
||||
nil, // 12: MlineShopData.ItemEntry
|
||||
nil, // 13: DBMainlineShop.BuytimeEntry
|
||||
nil, // 14: DBMainlineShop.UnlockEntry
|
||||
(*DBMainline)(nil), // 0: DBMainline
|
||||
(*DBMainlineAward)(nil), // 1: DBMainlineAward
|
||||
(*DBMainlineShop)(nil), // 2: DBMainlineShop
|
||||
nil, // 3: DBMainline.LastlevelEntry
|
||||
nil, // 4: DBMainline.LevelEntry
|
||||
nil, // 5: DBMainline.ChapterawardEntry
|
||||
nil, // 6: DBMainline.ExploreawardEntry
|
||||
nil, // 7: DBMainline.GroupawardEntry
|
||||
nil, // 8: DBMainline.PsEntry
|
||||
nil, // 9: DBMainlineAward.AwardEntry
|
||||
nil, // 10: DBMainlineShop.BuytimeEntry
|
||||
nil, // 11: DBMainlineShop.UnlockEntry
|
||||
}
|
||||
var file_mainline_mainline_db_proto_depIdxs = []int32{
|
||||
5, // 0: DBMainline.lastlevel:type_name -> DBMainline.LastlevelEntry
|
||||
6, // 1: DBMainline.level:type_name -> DBMainline.LevelEntry
|
||||
7, // 2: DBMainline.chapteraward:type_name -> DBMainline.ChapterawardEntry
|
||||
8, // 3: DBMainline.exploreaward:type_name -> DBMainline.ExploreawardEntry
|
||||
9, // 4: DBMainline.groupaward:type_name -> DBMainline.GroupawardEntry
|
||||
10, // 5: DBMainline.ps:type_name -> DBMainline.PsEntry
|
||||
11, // 6: DBMainlineAward.award:type_name -> DBMainlineAward.AwardEntry
|
||||
12, // 7: MlineShopData.item:type_name -> MlineShopData.ItemEntry
|
||||
13, // 8: DBMainlineShop.buytime:type_name -> DBMainlineShop.BuytimeEntry
|
||||
14, // 9: DBMainlineShop.unlock:type_name -> DBMainlineShop.UnlockEntry
|
||||
1, // 10: DBMainline.ChapterawardEntry.value:type_name -> DBMainlineAward
|
||||
1, // 11: DBMainline.ExploreawardEntry.value:type_name -> DBMainlineAward
|
||||
1, // 12: DBMainline.GroupawardEntry.value:type_name -> DBMainlineAward
|
||||
2, // 13: DBMainlineShop.BuytimeEntry.value:type_name -> MlineShopData
|
||||
3, // 14: DBMainlineShop.UnlockEntry.value:type_name -> MlineShopUnlockData
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
3, // 0: DBMainline.lastlevel:type_name -> DBMainline.LastlevelEntry
|
||||
4, // 1: DBMainline.level:type_name -> DBMainline.LevelEntry
|
||||
5, // 2: DBMainline.chapteraward:type_name -> DBMainline.ChapterawardEntry
|
||||
6, // 3: DBMainline.exploreaward:type_name -> DBMainline.ExploreawardEntry
|
||||
7, // 4: DBMainline.groupaward:type_name -> DBMainline.GroupawardEntry
|
||||
8, // 5: DBMainline.ps:type_name -> DBMainline.PsEntry
|
||||
9, // 6: DBMainlineAward.award:type_name -> DBMainlineAward.AwardEntry
|
||||
10, // 7: DBMainlineShop.buytime:type_name -> DBMainlineShop.BuytimeEntry
|
||||
11, // 8: DBMainlineShop.unlock:type_name -> DBMainlineShop.UnlockEntry
|
||||
1, // 9: DBMainline.ChapterawardEntry.value:type_name -> DBMainlineAward
|
||||
1, // 10: DBMainline.ExploreawardEntry.value:type_name -> DBMainlineAward
|
||||
1, // 11: DBMainline.GroupawardEntry.value:type_name -> DBMainlineAward
|
||||
12, // [12:12] is the sub-list for method output_type
|
||||
12, // [12:12] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension type_name
|
||||
12, // [12:12] is the sub-list for extension extendee
|
||||
0, // [0:12] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mainline_mainline_db_proto_init() }
|
||||
@ -526,30 +414,6 @@ func file_mainline_mainline_db_proto_init() {
|
||||
}
|
||||
}
|
||||
file_mainline_mainline_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineShopData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mainline_mainline_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MlineShopUnlockData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_mainline_mainline_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBMainlineShop); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -568,7 +432,7 @@ func file_mainline_mainline_db_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_mainline_mainline_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 15,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -724,8 +724,7 @@ type MainlineShopBuyReq struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Shopid int32 `protobuf:"varint,1,opt,name=shopid,proto3" json:"shopid"` // 商店id
|
||||
Itemid int32 `protobuf:"varint,2,opt,name=itemid,proto3" json:"itemid"` // 商品id
|
||||
Cid int32 `protobuf:"varint,1,opt,name=cid,proto3" json:"cid"` // 配置表id
|
||||
}
|
||||
|
||||
func (x *MainlineShopBuyReq) Reset() {
|
||||
@ -760,16 +759,9 @@ func (*MainlineShopBuyReq) Descriptor() ([]byte, []int) {
|
||||
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *MainlineShopBuyReq) GetShopid() int32 {
|
||||
func (x *MainlineShopBuyReq) GetCid() int32 {
|
||||
if x != nil {
|
||||
return x.Shopid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MainlineShopBuyReq) GetItemid() int32 {
|
||||
if x != nil {
|
||||
return x.Itemid
|
||||
return x.Cid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -902,18 +894,17 @@ var file_mainline_mainline_msg_proto_rawDesc = []byte{
|
||||
0x6f, 0x70, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e,
|
||||
0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x66,
|
||||
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x44,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x26,
|
||||
0x0a, 0x12, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75,
|
||||
0x79, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x6f, 0x70, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x68, 0x6f, 0x70, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x69, 0x64, 0x22, 0x59, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x69,
|
||||
0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x4d, 0x61,
|
||||
0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x1d, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09,
|
||||
0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x79, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x22, 0x59, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69,
|
||||
0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a,
|
||||
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42,
|
||||
0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x04, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x04, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
Loading…
Reference in New Issue
Block a user