抽卡卷不足购买
This commit is contained in:
parent
06cb3d6bf2
commit
968655f250
@ -34,13 +34,13 @@
|
||||
],
|
||||
"shopitem": [
|
||||
10001,
|
||||
10001,
|
||||
10001,
|
||||
10001,
|
||||
10001,
|
||||
10001,
|
||||
10001,
|
||||
10001
|
||||
10002,
|
||||
10003,
|
||||
10004,
|
||||
10005,
|
||||
10006,
|
||||
10007,
|
||||
10008
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -48,7 +48,7 @@
|
||||
"tab": 2,
|
||||
"shopname": {
|
||||
"key": "shop_2",
|
||||
"text": "友情商店"
|
||||
"text": "钻石商店"
|
||||
},
|
||||
"upper_shop": {
|
||||
"key": "",
|
||||
@ -72,14 +72,7 @@
|
||||
"rneed": [],
|
||||
"shopitem": [
|
||||
20001,
|
||||
20002,
|
||||
20003,
|
||||
20004,
|
||||
20005,
|
||||
20006,
|
||||
20007,
|
||||
20008,
|
||||
20009
|
||||
20002
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -87,7 +80,7 @@
|
||||
"tab": 3,
|
||||
"shopname": {
|
||||
"key": "shop_3",
|
||||
"text": "PVP商店"
|
||||
"text": "友情商店"
|
||||
},
|
||||
"upper_shop": {
|
||||
"key": "shop_title1",
|
||||
@ -96,7 +89,7 @@
|
||||
"needshow": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"t": "friend",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
@ -105,7 +98,7 @@
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"rtype": 3,
|
||||
"rtype": 2,
|
||||
"rtime": 1,
|
||||
"rnum": -1,
|
||||
"rneed": [],
|
||||
@ -120,7 +113,7 @@
|
||||
"tab": 4,
|
||||
"shopname": {
|
||||
"key": "shop_4",
|
||||
"text": "PVE商店"
|
||||
"text": "竞技商店"
|
||||
},
|
||||
"upper_shop": {
|
||||
"key": "shop_title1",
|
||||
@ -129,7 +122,7 @@
|
||||
"needshow": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"t": "arenacoin",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
@ -144,7 +137,48 @@
|
||||
"rneed": [],
|
||||
"shopitem": [
|
||||
40001,
|
||||
40002
|
||||
40002,
|
||||
40003,
|
||||
40004,
|
||||
40005,
|
||||
40006
|
||||
]
|
||||
},
|
||||
{
|
||||
"shopid": 5,
|
||||
"tab": 5,
|
||||
"shopname": {
|
||||
"key": "shop_5",
|
||||
"text": "公会商店"
|
||||
},
|
||||
"upper_shop": {
|
||||
"key": "shop_title1",
|
||||
"text": "玩法商店"
|
||||
},
|
||||
"needshow": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "guildcoin",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"rtype": 3,
|
||||
"rtime": 1,
|
||||
"rnum": -1,
|
||||
"rneed": [],
|
||||
"shopitem": [
|
||||
50001,
|
||||
50002,
|
||||
50003,
|
||||
50004,
|
||||
50005,
|
||||
50006,
|
||||
50007
|
||||
]
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
103
modules/hero/api_buy.go
Normal file
103
modules/hero/api_buy.go
Normal file
@ -0,0 +1,103 @@
|
||||
package hero
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
"math"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.HeroBuyReq) (code pb.ErrorCode) {
|
||||
if req.BuyType == 0 || req.BuyCount == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///获取用户商品列表
|
||||
func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
err error
|
||||
conf *cfg.GameShopitemData
|
||||
global *cfg.GameGlobalData
|
||||
need []*cfg.Gameatn
|
||||
give []*cfg.Gameatn
|
||||
totalCount int32 // 当前购买的总次数
|
||||
update map[string]interface{}
|
||||
)
|
||||
update = make(map[string]interface{})
|
||||
if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
if conf, err = this.module.configure.GetShopItemsConfigure(req.BuyType); err != nil { // 找配置
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
|
||||
record, err := this.module.modelRecord.GetHeroRecord(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
}
|
||||
global = this.module.configure.GetGlobalConf()
|
||||
if req.BuyType == global.DrawCardSupplement1 {
|
||||
totalCount = record.Onebuy + req.BuyCount
|
||||
update["onebuy"] = totalCount // 记录购买的数据
|
||||
} else if req.BuyType == global.DrawCardSupplement10 {
|
||||
totalCount = record.Tenbuy + req.BuyCount
|
||||
update["tenbuy"] = totalCount
|
||||
} else {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
if totalCount > conf.Buymaxnum { // 购买达到上限
|
||||
code = pb.ErrorCode_ShopGoodsIsSoldOut
|
||||
return
|
||||
}
|
||||
need = make([]*cfg.Gameatn, len(conf.Need))
|
||||
for i, v := range conf.Need {
|
||||
need[i] = &cfg.Gameatn{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: int32(math.Ceil(float64(v.N)*float64(conf.Sale)/float64(1000))) * req.BuyCount,
|
||||
}
|
||||
}
|
||||
// 消耗
|
||||
if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
give = make([]*cfg.Gameatn, len(conf.Iteminfo))
|
||||
for i, v := range conf.Iteminfo {
|
||||
give[i] = &cfg.Gameatn{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N * req.BuyCount,
|
||||
}
|
||||
}
|
||||
// 获得的道具
|
||||
if code = this.module.DispenseRes(session, give, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
this.module.modelRecord.ChangeHeroRecord(session.GetUserId(), update)
|
||||
//随机任务
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype64, 1)
|
||||
for _, v := range give {
|
||||
if v.A == comm.ItemType {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype65, v.N, utils.ToInt32(v.T))
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range need {
|
||||
if v.A == comm.AttrType && (v.T == comm.ResGold || v.T == comm.ResDiamond) {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype67, v.N, utils.ToInt32(v.T))
|
||||
}
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "buy", &pb.HeroBuyResp{IsSucc: true})
|
||||
return
|
||||
}
|
@ -3,6 +3,8 @@ package hero
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
@ -24,5 +26,21 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.HeroListReq) (code
|
||||
}()
|
||||
|
||||
rsp.List = this.module.GetHeroList(session.GetUserId())
|
||||
// 重置当天抽卡次数 和商店购买次数
|
||||
heroRecord, err := this.module.modelRecord.GetHeroRecord(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
if !utils.IsToday(heroRecord.Mtime) {
|
||||
update := map[string]interface{}{}
|
||||
update["onebuy"] = 0
|
||||
update["tenbuy"] = 0
|
||||
update["daycount"] = 0
|
||||
heroRecord.Mtime = configure.Now().Unix()
|
||||
update["mtime"] = heroRecord.Mtime
|
||||
if err := this.module.modelRecord.ChangeHeroRecord(session.GetUserId(), update); err != nil {
|
||||
this.module.Errorf("ChangeHeroRecord error: %v", err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ const (
|
||||
hero_talentskill = "game_talentskill.json" // 天赋
|
||||
hero_talent = "game_herotalent.json" // 天赋详细数据
|
||||
hero_itembox = "game_itembox.json" // 天赋详细数据
|
||||
game_shopitem = "game_shopitem.json"
|
||||
)
|
||||
|
||||
///配置管理组件
|
||||
@ -63,6 +64,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
hero_talentskill: cfg.NewGameTalentSkill,
|
||||
hero_talent: cfg.NewGameHeroTalent,
|
||||
hero_itembox: cfg.NewGameItemBox,
|
||||
game_shopitem: cfg.NewGameShopitem,
|
||||
})
|
||||
this.drawCardCfg = make(map[string]map[int32][]*cfg.GameDrawCardData, 0)
|
||||
configure.RegisterConfigure(hero_drawcard, cfg.NewGameDrawCard, this.SetHeroDrawConfig)
|
||||
@ -442,3 +444,22 @@ func (this *configureComp) GetHeroTalentBoxItem(heroid string) (itemid string) {
|
||||
this.module.Errorf("cfg.GameItemBoxData GetHeroTalentBoxItem:skillId = %d", heroid)
|
||||
return ""
|
||||
}
|
||||
|
||||
//读取商品
|
||||
func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameShopitemData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_shopitem); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
} else {
|
||||
if result, ok = v.(*cfg.GameShopitem).GetDataMap()[key]; !ok {
|
||||
err = fmt.Errorf("ShopConfigure not found:%d ", key)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -3,10 +3,12 @@ package hero
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
)
|
||||
|
||||
// 记录一些扩展数据 图鉴 改名次数等
|
||||
@ -23,9 +25,18 @@ func (this *ModelRecord) Init(service core.IService, module core.IModule, comp c
|
||||
//获取用户通过扩展表
|
||||
func (this *ModelRecord) GetHeroRecord(uid string) (result *pb.DBHeroRecord, err error) {
|
||||
result = &pb.DBHeroRecord{}
|
||||
if err = this.Get(uid, result); err != nil && err != redis.RedisNil {
|
||||
if err = this.Get(uid, result); err != nil {
|
||||
if mongo.ErrNoDocuments == err { // 创建一条新的数据
|
||||
result.Id = primitive.NewObjectID().Hex()
|
||||
result.Uid = uid
|
||||
result.Condition = map[string]int32{}
|
||||
result.Star5Hero = map[string]int32{}
|
||||
result.Mtime = configure.Now().Unix()
|
||||
this.Add(uid, result)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
err = nil
|
||||
return result, err
|
||||
}
|
||||
|
@ -440,6 +440,8 @@ type DBHeroRecord struct {
|
||||
Star5Hero map[string]int32 `protobuf:"bytes,8,rep,name=star5Hero,proto3" json:"star5Hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 第totalcount 次抽到的5星英雄 key 英雄id
|
||||
Totalcount int32 `protobuf:"varint,9,opt,name=totalcount,proto3" json:"totalcount"` // 总的累计抽卡次数
|
||||
Daycount int32 `protobuf:"varint,10,opt,name=daycount,proto3" json:"daycount"` // 今天抽卡次数
|
||||
Onebuy int32 `protobuf:"varint,11,opt,name=onebuy,proto3" json:"onebuy"` // 单次购买次数
|
||||
Tenbuy int32 `protobuf:"varint,12,opt,name=tenbuy,proto3" json:"tenbuy"` // 十连购买次数
|
||||
}
|
||||
|
||||
func (x *DBHeroRecord) Reset() {
|
||||
@ -544,6 +546,20 @@ func (x *DBHeroRecord) GetDaycount() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBHeroRecord) GetOnebuy() int32 {
|
||||
if x != nil {
|
||||
return x.Onebuy
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBHeroRecord) GetTenbuy() int32 {
|
||||
if x != nil {
|
||||
return x.Tenbuy
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 英雄天赋系统
|
||||
type DBHeroTalent struct {
|
||||
state protoimpl.MessageState
|
||||
@ -727,7 +743,7 @@ var file_hero_hero_db_proto_rawDesc = []byte{
|
||||
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x27, 0x0a, 0x05, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x68, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x34, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x68, 0x35, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x35, 0x22,
|
||||
0xc0, 0x03, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0xf0, 0x03, 0x0a, 0x0c, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
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, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
@ -747,7 +763,10 @@ var file_hero_hero_db_proto_rawDesc = []byte{
|
||||
0x74, 0x61, 0x6c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61,
|
||||
0x79, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x61,
|
||||
0x79, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3c, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74,
|
||||
0x79, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79,
|
||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x6e, 0x65, 0x62, 0x75, 0x79, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x74, 0x65, 0x6e, 0x62, 0x75, 0x79, 0x1a, 0x3c, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 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,
|
||||
|
@ -2105,6 +2105,108 @@ func (x *HeroTalentResetResp) GetTelnet() *DBHeroTalent {
|
||||
return nil
|
||||
}
|
||||
|
||||
type HeroBuyReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BuyType int32 `protobuf:"varint,1,opt,name=buyType,proto3" json:"buyType"` //类型
|
||||
BuyCount int32 `protobuf:"varint,2,opt,name=buyCount,proto3" json:"buyCount"` // 购买的数量
|
||||
}
|
||||
|
||||
func (x *HeroBuyReq) Reset() {
|
||||
*x = HeroBuyReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_hero_hero_msg_proto_msgTypes[40]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HeroBuyReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HeroBuyReq) ProtoMessage() {}
|
||||
|
||||
func (x *HeroBuyReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_hero_hero_msg_proto_msgTypes[40]
|
||||
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 HeroBuyReq.ProtoReflect.Descriptor instead.
|
||||
func (*HeroBuyReq) Descriptor() ([]byte, []int) {
|
||||
return file_hero_hero_msg_proto_rawDescGZIP(), []int{40}
|
||||
}
|
||||
|
||||
func (x *HeroBuyReq) GetBuyType() int32 {
|
||||
if x != nil {
|
||||
return x.BuyType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *HeroBuyReq) GetBuyCount() int32 {
|
||||
if x != nil {
|
||||
return x.BuyCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type HeroBuyResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
CurCard int32 `protobuf:"varint,1,opt,name=curCard,proto3" json:"curCard"` // 当前抽卡卷数量
|
||||
}
|
||||
|
||||
func (x *HeroBuyResp) Reset() {
|
||||
*x = HeroBuyResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_hero_hero_msg_proto_msgTypes[41]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *HeroBuyResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HeroBuyResp) ProtoMessage() {}
|
||||
|
||||
func (x *HeroBuyResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_hero_hero_msg_proto_msgTypes[41]
|
||||
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 HeroBuyResp.ProtoReflect.Descriptor instead.
|
||||
func (*HeroBuyResp) Descriptor() ([]byte, []int) {
|
||||
return file_hero_hero_msg_proto_rawDescGZIP(), []int{41}
|
||||
}
|
||||
|
||||
func (x *HeroBuyResp) GetCurCard() int32 {
|
||||
if x != nil {
|
||||
return x.CurCard
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_hero_hero_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_hero_hero_msg_proto_rawDesc = []byte{
|
||||
@ -2292,7 +2394,14 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
|
||||
0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x65, 0x6c,
|
||||
0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65,
|
||||
0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x22, 0x42, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x18,
|
||||
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, 0x27, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x42, 0x75, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x43, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -2307,7 +2416,7 @@ func file_hero_hero_msg_proto_rawDescGZIP() []byte {
|
||||
return file_hero_hero_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 43)
|
||||
var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 45)
|
||||
var file_hero_hero_msg_proto_goTypes = []interface{}{
|
||||
(*HeroInfoReq)(nil), // 0: HeroInfoReq
|
||||
(*HeroInfoResp)(nil), // 1: HeroInfoResp
|
||||
@ -2349,36 +2458,38 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{
|
||||
(*HeroTalentLearnResp)(nil), // 37: HeroTalentLearnResp
|
||||
(*HeroTalentResetReq)(nil), // 38: HeroTalentResetReq
|
||||
(*HeroTalentResetResp)(nil), // 39: HeroTalentResetResp
|
||||
nil, // 40: HeroPropertyPush.PropertyEntry
|
||||
nil, // 41: HeroPropertyPush.AddPropertyEntry
|
||||
nil, // 42: HeroFusionReq.HerosEntry
|
||||
(*DBHero)(nil), // 43: DBHero
|
||||
(*DBHeroTalent)(nil), // 44: DBHeroTalent
|
||||
(*HeroBuyReq)(nil), // 40: HeroBuyReq
|
||||
(*HeroBuyResp)(nil), // 41: HeroBuyResp
|
||||
nil, // 42: HeroPropertyPush.PropertyEntry
|
||||
nil, // 43: HeroPropertyPush.AddPropertyEntry
|
||||
nil, // 44: HeroFusionReq.HerosEntry
|
||||
(*DBHero)(nil), // 45: DBHero
|
||||
(*DBHeroTalent)(nil), // 46: DBHeroTalent
|
||||
}
|
||||
var file_hero_hero_msg_proto_depIdxs = []int32{
|
||||
43, // 0: HeroInfoResp.base:type_name -> DBHero
|
||||
43, // 1: HeroListResp.list:type_name -> DBHero
|
||||
45, // 0: HeroInfoResp.base:type_name -> DBHero
|
||||
45, // 1: HeroListResp.list:type_name -> DBHero
|
||||
5, // 2: HeroStrengthenUplvReq.expCards:type_name -> MapStringInt32
|
||||
43, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
|
||||
45, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
|
||||
8, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData
|
||||
8, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData
|
||||
43, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero
|
||||
43, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
|
||||
43, // 8: HeroResonanceResp.hero:type_name -> DBHero
|
||||
43, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero
|
||||
43, // 10: HeroResonanceResetResp.hero:type_name -> DBHero
|
||||
45, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero
|
||||
45, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
|
||||
45, // 8: HeroResonanceResp.hero:type_name -> DBHero
|
||||
45, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero
|
||||
45, // 10: HeroResonanceResetResp.hero:type_name -> DBHero
|
||||
17, // 11: HeroResonanceUseEnergyReq.energy:type_name -> EnergyData
|
||||
43, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero
|
||||
43, // 13: HeroAwakenResp.hero:type_name -> DBHero
|
||||
40, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
|
||||
41, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
|
||||
43, // 16: HeroLockResp.hero:type_name -> DBHero
|
||||
43, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero
|
||||
43, // 18: HeroChangePush.list:type_name -> DBHero
|
||||
42, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry
|
||||
44, // 20: HeroTalentListResp.telnet:type_name -> DBHeroTalent
|
||||
44, // 21: HeroTalentLearnResp.telnet:type_name -> DBHeroTalent
|
||||
44, // 22: HeroTalentResetResp.telnet:type_name -> DBHeroTalent
|
||||
45, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero
|
||||
45, // 13: HeroAwakenResp.hero:type_name -> DBHero
|
||||
42, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
|
||||
43, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
|
||||
45, // 16: HeroLockResp.hero:type_name -> DBHero
|
||||
45, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero
|
||||
45, // 18: HeroChangePush.list:type_name -> DBHero
|
||||
44, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry
|
||||
46, // 20: HeroTalentListResp.telnet:type_name -> DBHeroTalent
|
||||
46, // 21: HeroTalentLearnResp.telnet:type_name -> DBHeroTalent
|
||||
46, // 22: HeroTalentResetResp.telnet:type_name -> DBHeroTalent
|
||||
23, // [23:23] is the sub-list for method output_type
|
||||
23, // [23:23] is the sub-list for method input_type
|
||||
23, // [23:23] is the sub-list for extension type_name
|
||||
@ -2873,6 +2984,30 @@ func file_hero_hero_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_hero_hero_msg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HeroBuyReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_hero_hero_msg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HeroBuyResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@ -2880,7 +3015,7 @@ func file_hero_hero_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_hero_hero_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 43,
|
||||
NumMessages: 45,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user