新增抽卡记录查询

This commit is contained in:
meixiongfeng 2023-12-25 14:56:52 +08:00
parent 8fa0454184
commit 39cc62ee40
10 changed files with 439 additions and 392 deletions

View File

@ -438,7 +438,8 @@ const (
// 三消Rank
TableEntertainRank = "xxlrank" //排名
TableEntertainRecode = "xxlrecode" //战报
TableEntertainRecode = "xxlrecode" //战报
TableDrawRecode = "drawrecode" //抽卡记录
)
// RPC服务接口定义处

View File

@ -155,9 +155,9 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (e
)
}
if _, ok := utils.Find(self.Weapplyids, req.FriendId); !ok {
target.Weapplyids = append(target.Weapplyids, req.FriendId)
self.Weapplyids = append(self.Weapplyids, req.FriendId)
if err = this.module.modelFriend.Change(session.GetUserId(), map[string]interface{}{
"weapplyids": target.Weapplyids,
"weapplyids": self.Weapplyids,
}); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,

View File

@ -6,6 +6,8 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func (this *apiComp) DrawCardCheck(session comm.IUserSession, req *pb.HeroDrawCardReq) (errdata *pb.ErrorData) {
@ -122,7 +124,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
}
// 校验是否达到保底卡池
if drawConf.Protect >= drawCount {
if drawConf.Protect >= drawCount && drawConf.Protect != 0 {
IsBaodiPool = true
}
///// 获取消耗 end
@ -326,6 +328,14 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
if req.DrawType != 1 {
// 任务统计
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.modelDrawRecode.InstertDrawCardRecord(&pb.DBHeroDrawRecord{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
HeroId: szCards,
Drawtype: req.DrawType,
Ctime: configure.Now().Unix(),
})
var szHero []*pb.DBHero
for _, hero := range add { // 奖励一次性发放
if user, err := this.module.ModuleUser.GetUser(session.GetUserId()); err == nil { // 广播 首次获得英雄

23
modules/hero/api_rank.go Normal file
View File

@ -0,0 +1,23 @@
package hero
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
// 参数校验
func (this *apiComp) DrawRecordCheck(session comm.IUserSession, req *pb.HeroDrawRecordReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) DrawRecord(session comm.IUserSession, req *pb.HeroDrawRecordReq) (errdata *pb.ErrorData) {
var ()
if errdata = this.DrawRecordCheck(session, req); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), "drawrecord", &pb.HeroDrawRecordResp{})
return
}

View File

@ -3,7 +3,10 @@ package hero
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive"
)
//参数校验
@ -23,6 +26,7 @@ func (this *apiComp) SelectCard(session comm.IUserSession, req *pb.HeroSelectCar
szAtno []*pb.AtnoData
curSzCard []string
heroRecord *pb.DBHeroRecord
szStar []int32 //星级
)
if heroRecord, err = this.module.modelRecord.GetHeroRecord(session.GetUserId()); err != nil {
@ -84,8 +88,19 @@ func (this *apiComp) SelectCard(session comm.IUserSession, req *pb.HeroSelectCar
}
szHero = append(szHero, hero)
}
this.module.HeroLibrary(session, curSzCard, szHero)
this.module.DispenseAtno(session, allres, true)
for _, heroId := range curSzCard {
if HeroConf, err := this.module.configure.GetHeroConfig(heroId); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Message: err.Error(),
}
return
} else {
szStar = append(szStar, HeroConf.Star)
}
}
this.module.DispenseAtno(session, allres, true)
heroRecord.Newcomplete = true
@ -109,5 +124,16 @@ func (this *apiComp) SelectCard(session comm.IUserSession, req *pb.HeroSelectCar
Record: heroRecord,
Atno: szAtno,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.modelDrawRecode.InstertDrawCardRecord(&pb.DBHeroDrawRecord{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
HeroId: curSzCard,
Drawtype: 1,
Ctime: configure.Now().Unix(),
})
this.module.HeroLibrary(session, curSzCard, szHero)
this.module.SendTaskMsg(session, szStar, 10, 1, curSzCard)
})
return
}

View File

@ -0,0 +1,63 @@
package hero
import (
"context"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/x/bsonx"
)
type modelDrawRecode struct {
modules.MCompModel
module *Hero
}
// 组件初始化接口
func (this *modelDrawRecode) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
this.TableName = comm.TableDrawRecode
this.MCompModel.Init(service, module, comp, opt)
this.module = module.(*Hero)
// 通过uid创建索引
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
func (this *modelDrawRecode) InstertDrawCardRecord(record *pb.DBHeroDrawRecord) (err error) {
if _, err = this.DBModel.DB.InsertOne(core.SqlTable(this.TableName), record); err != nil {
this.module.Errorln(err)
return
}
return
}
func (this *modelDrawRecode) getDrawCardRecord(uid string) (results []*pb.DBHeroDrawRecord, err error) {
var (
cursor *mongo.Cursor
)
results = make([]*pb.DBHeroDrawRecord, 0)
if cursor, err = this.DBModel.DB.Find(comm.TableEntertainRecode, bson.M{"uid": uid}, options.Find().SetSort(bson.M{"ctime": -1}),
options.Find().SetLimit(int64(comm.MaxRankList))); err != nil {
this.module.Errorln(err)
return
} else {
for cursor.Next(context.Background()) {
temp := &pb.DBHeroDrawRecord{}
if err = cursor.Decode(temp); err != nil {
this.module.Errorln(err)
return
}
results = append(results, temp)
}
}
return
}

View File

@ -883,263 +883,6 @@ func (this *ModelHero) CheckDrawCardRes(session comm.IUserSession, drawConf *cfg
return
}
func (this *ModelHero) GetDrawCardReward(session comm.IUserSession, szCards []string) (wish *pb.UserAtno, szStar []int32, rsp []*pb.AtnoData, errdata *pb.ErrorData) {
var reward []*cfg.Gameatn
for _, heroId := range szCards {
if c, err := this.module.configure.GetHeroConfig(heroId); err != nil {
szStar = append(szStar, c.Star) // 获得许愿石
var tmp *cfg.Gameatn
if c.Star == 4 {
tmp = this.module.ModuleTools.GetGlobalConf().RewardStar4
reward = append(reward, tmp)
} else if c.Star == 5 {
tmp = this.module.ModuleTools.GetGlobalConf().RewardStar5
reward = append(reward, tmp)
}
if tmp != nil {
if wish == nil {
wish = &pb.UserAtno{
A: tmp.A,
T: tmp.T,
N: tmp.N,
}
} else {
wish.N += tmp.N
}
}
}
reward = append(reward, &cfg.Gameatn{
A: "hero",
T: heroId,
N: 1,
})
}
var atno []*pb.UserAtno
if errdata, atno = this.module.DispenseAtno(session, reward, true); errdata == nil {
rsp = append(rsp, &pb.AtnoData{Atno: atno})
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), szCards, comm.GMResAddType, "GetDrawCardReward", rsp)
})
return
}
// 模拟获得英雄
func (this *ModelHero) imitateHero(session comm.IUserSession, heroCfgId string) (hero *pb.DBHero, atno []*pb.UserAtno, err error) {
heros := make([]*pb.DBHero, 0)
uid := session.GetUserId()
heroCfg, _ := this.module.configure.GetHeroConfig(heroCfgId)
bFirst := true
if heroCfg == nil {
err = errors.New("not found hero configID")
this.module.Errorf("not found hero configID:%s", heroCfgId)
return
}
if err = this.GetList(uid, &heros); err != nil {
this.module.Errorf("err:%v", err)
}
for _, obj := range heros {
if obj.HeroID == heroCfgId {
hero = obj
bFirst = false
atno = append(atno, &pb.UserAtno{ // 有英雄的时候 数量给0
A: "hero",
T: hero.HeroID,
N: 0,
O: hero.Id,
})
break
}
}
if bFirst { // 没有当前英雄
hero, err = this.initHeroOverlying(uid, heroCfgId, 1)
if err != nil {
return
}
atno = append(atno, &pb.UserAtno{
A: "hero",
T: hero.HeroID,
N: 1,
O: hero.Id,
})
}
rst, err := this.module.ModuleUser.GetUserExpand(session.GetUserId())
if err != nil {
return
}
if rst.Expitem == nil {
rst.Expitem = make(map[string]int32)
}
if rst.Herofrag == nil {
rst.Herofrag = make(map[string]int32)
}
// 转碎片处理
bAdd := false
//守护之星 获得
if heroCfg.Herofragnum > 0 {
if v, ok := rst.Herofrag[hero.HeroID]; !ok {
rst.Herofrag[hero.HeroID] = 1
bAdd = true
} else if heroCfg.Herofragnum > v {
rst.Herofrag[hero.HeroID] += 1
bAdd = true
}
}
if bAdd {
for _, v := range heroCfg.Herofrag {
atno = append(atno, &pb.UserAtno{
A: v.A,
T: v.T,
N: v.N,
})
}
} else {
list := this.module.ModuleTools.GetGlobalConf().Moonshopmoney
if list != nil {
for pos, v := range list {
if int32(pos)+3 == heroCfg.Star && v > 0 {
atno = append(atno, &pb.UserAtno{
A: "attr",
T: "moongold",
N: v,
})
break
}
}
}
}
bAdd = false // 初始化
// expitem 获得
if heroCfg.Expitemnum > 0 {
if v, ok := rst.Expitem[hero.HeroID]; ok {
if heroCfg.Expitemnum > v {
rst.Expitem[hero.HeroID] += 1
bAdd = true
}
} else {
rst.Expitem[hero.HeroID] = 1
bAdd = true
}
}
if bAdd {
for _, v := range heroCfg.Expitem {
atno = append(atno, &pb.UserAtno{
A: v.A,
T: v.T,
N: v.N,
})
}
}
return
}
func (this *ModelHero) drawcardcreateHero(session comm.IUserSession, ids []string) (hs []*pb.DBHero, szAtno []*pb.AtnoData, err error) {
heros := make([]*pb.DBHero, 0)
uid := session.GetUserId()
rst, _ := this.module.ModuleUser.GetUserExpand(session.GetUserId())
list := this.module.ModuleTools.GetGlobalConf().Moonshopmoney // 3星卡技能满了后1个碎片转化的货币数量3星/4星/5星
if err = this.GetList(uid, &heros); err != nil {
this.module.Errorf("err:%v", err)
}
for _, heroCfgId := range ids {
hero := &pb.DBHero{}
res := make([]*cfg.Gameatn, 0)
heroCfg, _ := this.module.configure.GetHeroConfig(heroCfgId)
for _, obj := range heros {
if obj.HeroID == heroCfgId {
hero = obj
hs = append(hs, nil)
break
}
}
if hero.Id == "" { // 没有当前英雄
if hero, err = this.initHeroOverlying(uid, heroCfgId, 1); err == nil {
hs = append(hs, hero)
heros = append(heros, hero)
} else {
return
}
}
// 转碎片处理
bAdd := false
//守护之星 获得
if heroCfg.Herofragnum > 0 {
if v, ok := rst.Herofrag[hero.HeroID]; !ok {
rst.Herofrag[hero.HeroID] = 1
bAdd = true
} else if heroCfg.Herofragnum > v {
rst.Herofrag[hero.HeroID] += 1
bAdd = true
}
}
if bAdd {
res = append(res, heroCfg.Herofrag...)
} else {
for pos, v := range list {
if int32(pos)+3 == heroCfg.Star && v > 0 {
res = append(res, &cfg.Gameatn{
A: "attr",
T: "moongold",
N: v,
})
break
}
}
}
bAdd = false // 初始化
// expitem 获得
if heroCfg.Expitemnum > 0 {
if v, ok := rst.Expitem[hero.HeroID]; ok {
if heroCfg.Expitemnum > v {
rst.Expitem[hero.HeroID] += 1
bAdd = true
}
} else {
rst.Expitem[hero.HeroID] = 1
bAdd = true
}
}
if bAdd {
res = append(res, heroCfg.Expitem...)
}
_, atno := this.module.DispenseAtno(session, res, true)
atno = append(atno, &pb.UserAtno{
A: "hero",
T: hero.HeroID,
N: 1,
O: hero.Id,
})
szAtno = append(szAtno, &pb.AtnoData{
Atno: atno,
})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), heroCfgId, comm.GMResAddType, "create hero", atno)
})
}
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
"herofrag": rst.Herofrag,
"expitem": rst.Expitem,
})
return
}
// 模拟获得英雄
func (this *ModelHero) ImitateHeros(session comm.IUserSession, cids []string, itype int32) (addres [][]*cfg.Gameatn, add []*pb.DBHero, err error) {

View File

@ -34,6 +34,7 @@ type Hero struct {
chat comm.IChat
passon comm.IPasson
mail comm.Imail
modelDrawRecode *modelDrawRecode // 抽卡记录
}
// 模块名
@ -58,6 +59,7 @@ func (this *Hero) OnInstallComp() {
this.modelRecord = this.RegisterComp(new(ModelRecord)).(*ModelRecord)
this.modelTalent = this.RegisterComp(new(ModelTalent)).(*ModelTalent)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
this.modelDrawRecode = this.RegisterComp(new(modelDrawRecode)).(*modelDrawRecode)
}
func (this *Hero) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil {
@ -1046,46 +1048,6 @@ func (this *Hero) GetRandomCardByCardPool(uid string, count int32) (cards []stri
return
}
func (this *Hero) DrawCardHero(session comm.IUserSession, heroCfgId []string) (hero []*pb.DBHero, szAtno []*pb.AtnoData, errdata *pb.ErrorData) {
var (
szAddHero []string
tasks []*pb.BuriedParam
err error
)
if hero, szAtno, err = this.modelHero.drawcardcreateHero(session, heroCfgId); err != nil {
return
}
for _, id := range heroCfgId {
if cfg, err := this.configure.GetHeroConfig(id); err == nil {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype1, 1, utils.ToInt32(id)))
tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype30, id, cfg.Color))
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype31, 1, cfg.Color))
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
}
}
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.ModuleBuried.TriggerBuried(session, tasks...)
})
for _, obj := range hero {
if obj != nil {
szAddHero = append(szAddHero, obj.HeroID)
}
}
if db.IsCross() {
go this.moduleFetter.SendRpcAddHero(session.GetUserId(), szAddHero, session.GetServiecTag())
} else {
go this.moduleFetter.AddHerosFetterData(session.GetUserId(), szAddHero) // 异步调用
}
return
}
func (this *Hero) HeroLibrary(session comm.IUserSession, cids []string, addHero []*pb.DBHero) {
var (
tasks []*pb.BuriedParam
@ -1106,9 +1068,7 @@ func (this *Hero) HeroLibrary(session comm.IUserSession, cids []string, addHero
this.moduleFetter.AddHerosFetterData(session.GetUserId(), add) // 异步调用
}
this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.ModuleBuried.TriggerBuried(session, tasks...)
})
this.ModuleBuried.TriggerBuried(session, tasks...)
if len(addHero) > 0 {
session.SendMsg("hero", "change", &pb.HeroChangePush{List: addHero})
}

View File

@ -633,6 +633,86 @@ func (x *DBHeroTalent) GetTalent() map[int32]int32 {
return nil
}
// 英雄抽卡记录
type DBHeroDrawRecord struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID 主键id
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
HeroId []string `protobuf:"bytes,3,rep,name=heroId,proto3" json:"heroId"` // 英雄ID
Drawtype int32 `protobuf:"varint,4,opt,name=drawtype,proto3" json:"drawtype"` // 卡池
Ctime int64 `protobuf:"varint,5,opt,name=ctime,proto3" json:"ctime"` // 抽卡时间
}
func (x *DBHeroDrawRecord) Reset() {
*x = DBHeroDrawRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_db_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBHeroDrawRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBHeroDrawRecord) ProtoMessage() {}
func (x *DBHeroDrawRecord) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_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 DBHeroDrawRecord.ProtoReflect.Descriptor instead.
func (*DBHeroDrawRecord) Descriptor() ([]byte, []int) {
return file_hero_hero_db_proto_rawDescGZIP(), []int{3}
}
func (x *DBHeroDrawRecord) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBHeroDrawRecord) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBHeroDrawRecord) GetHeroId() []string {
if x != nil {
return x.HeroId
}
return nil
}
func (x *DBHeroDrawRecord) GetDrawtype() int32 {
if x != nil {
return x.Drawtype
}
return 0
}
func (x *DBHeroDrawRecord) GetCtime() int64 {
if x != nil {
return x.Ctime
}
return 0
}
var File_hero_hero_db_proto protoreflect.FileDescriptor
var file_hero_hero_db_proto_rawDesc = []byte{
@ -827,7 +907,15 @@ var file_hero_hero_db_proto_rawDesc = []byte{
0x6e, 0x74, 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, 0x2a, 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12,
0x02, 0x38, 0x01, 0x22, 0x7e, 0x0a, 0x10, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61,
0x77, 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, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72,
0x6f, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49,
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x72, 0x61, 0x77, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74,
0x69, 0x6d, 0x65, 0x2a, 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12,
0x0f, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, 0x00,
0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, 0x67,
0x46, 0x75, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
@ -847,54 +935,55 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte {
}
var file_hero_hero_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_hero_hero_db_proto_goTypes = []interface{}{
(HeroType)(0), // 0: HeroType
(*DBHero)(nil), // 1: DBHero
(*DBHeroRecord)(nil), // 2: DBHeroRecord
(*DBHeroTalent)(nil), // 3: DBHeroTalent
nil, // 4: DBHero.PropertyEntry
nil, // 5: DBHero.AddPropertyEntry
nil, // 6: DBHero.JuexPropertyEntry
nil, // 7: DBHero.TalentPropertyEntry
nil, // 8: DBHero.HoroscopePropertyEntry
nil, // 9: DBHero.FettersEntry
nil, // 10: DBHeroRecord.ConditionEntry
nil, // 11: DBHeroRecord.Star5HeroEntry
nil, // 12: DBHeroRecord.RaceEntry
nil, // 13: DBHeroRecord.Baodi4Entry
nil, // 14: DBHeroRecord.Baodi5Entry
nil, // 15: DBHeroRecord.CountEntry
nil, // 16: DBHeroRecord.PeachEntry
nil, // 17: DBHeroRecord.LimitEntry
nil, // 18: DBHeroRecord.WishEntry
nil, // 19: DBHeroTalent.TalentEntry
(*SkillData)(nil), // 20: SkillData
(*DB_EquipmentSuit)(nil), // 21: DB_EquipmentSuit
(*DBHeroDrawRecord)(nil), // 4: DBHeroDrawRecord
nil, // 5: DBHero.PropertyEntry
nil, // 6: DBHero.AddPropertyEntry
nil, // 7: DBHero.JuexPropertyEntry
nil, // 8: DBHero.TalentPropertyEntry
nil, // 9: DBHero.HoroscopePropertyEntry
nil, // 10: DBHero.FettersEntry
nil, // 11: DBHeroRecord.ConditionEntry
nil, // 12: DBHeroRecord.Star5HeroEntry
nil, // 13: DBHeroRecord.RaceEntry
nil, // 14: DBHeroRecord.Baodi4Entry
nil, // 15: DBHeroRecord.Baodi5Entry
nil, // 16: DBHeroRecord.CountEntry
nil, // 17: DBHeroRecord.PeachEntry
nil, // 18: DBHeroRecord.LimitEntry
nil, // 19: DBHeroRecord.WishEntry
nil, // 20: DBHeroTalent.TalentEntry
(*SkillData)(nil), // 21: SkillData
(*DB_EquipmentSuit)(nil), // 22: DB_EquipmentSuit
}
var file_hero_hero_db_proto_depIdxs = []int32{
20, // 0: DBHero.normalSkill:type_name -> SkillData
4, // 1: DBHero.property:type_name -> DBHero.PropertyEntry
5, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
6, // 3: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry
21, // 0: DBHero.normalSkill:type_name -> SkillData
5, // 1: DBHero.property:type_name -> DBHero.PropertyEntry
6, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
7, // 3: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry
0, // 4: DBHero.status:type_name -> HeroType
21, // 5: DBHero.suits:type_name -> DB_EquipmentSuit
7, // 6: DBHero.talentProperty:type_name -> DBHero.TalentPropertyEntry
20, // 7: DBHero.equipSkill:type_name -> SkillData
8, // 8: DBHero.horoscopeProperty:type_name -> DBHero.HoroscopePropertyEntry
9, // 9: DBHero.fetters:type_name -> DBHero.FettersEntry
20, // 10: DBHero.awakenskill:type_name -> SkillData
20, // 11: DBHero.talentskill:type_name -> SkillData
10, // 12: DBHeroRecord.condition:type_name -> DBHeroRecord.ConditionEntry
11, // 13: DBHeroRecord.star5Hero:type_name -> DBHeroRecord.Star5HeroEntry
12, // 14: DBHeroRecord.race:type_name -> DBHeroRecord.RaceEntry
13, // 15: DBHeroRecord.baodi4:type_name -> DBHeroRecord.Baodi4Entry
14, // 16: DBHeroRecord.baodi5:type_name -> DBHeroRecord.Baodi5Entry
15, // 17: DBHeroRecord.count:type_name -> DBHeroRecord.CountEntry
16, // 18: DBHeroRecord.peach:type_name -> DBHeroRecord.PeachEntry
17, // 19: DBHeroRecord.limit:type_name -> DBHeroRecord.LimitEntry
18, // 20: DBHeroRecord.wish:type_name -> DBHeroRecord.WishEntry
19, // 21: DBHeroTalent.talent:type_name -> DBHeroTalent.TalentEntry
22, // 5: DBHero.suits:type_name -> DB_EquipmentSuit
8, // 6: DBHero.talentProperty:type_name -> DBHero.TalentPropertyEntry
21, // 7: DBHero.equipSkill:type_name -> SkillData
9, // 8: DBHero.horoscopeProperty:type_name -> DBHero.HoroscopePropertyEntry
10, // 9: DBHero.fetters:type_name -> DBHero.FettersEntry
21, // 10: DBHero.awakenskill:type_name -> SkillData
21, // 11: DBHero.talentskill:type_name -> SkillData
11, // 12: DBHeroRecord.condition:type_name -> DBHeroRecord.ConditionEntry
12, // 13: DBHeroRecord.star5Hero:type_name -> DBHeroRecord.Star5HeroEntry
13, // 14: DBHeroRecord.race:type_name -> DBHeroRecord.RaceEntry
14, // 15: DBHeroRecord.baodi4:type_name -> DBHeroRecord.Baodi4Entry
15, // 16: DBHeroRecord.baodi5:type_name -> DBHeroRecord.Baodi5Entry
16, // 17: DBHeroRecord.count:type_name -> DBHeroRecord.CountEntry
17, // 18: DBHeroRecord.peach:type_name -> DBHeroRecord.PeachEntry
18, // 19: DBHeroRecord.limit:type_name -> DBHeroRecord.LimitEntry
19, // 20: DBHeroRecord.wish:type_name -> DBHeroRecord.WishEntry
20, // 21: DBHeroTalent.talent:type_name -> DBHeroTalent.TalentEntry
22, // [22:22] is the sub-list for method output_type
22, // [22:22] is the sub-list for method input_type
22, // [22:22] is the sub-list for extension type_name
@ -946,6 +1035,18 @@ func file_hero_hero_db_proto_init() {
return nil
}
}
file_hero_hero_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBHeroDrawRecord); 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{
@ -953,7 +1054,7 @@ func file_hero_hero_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hero_hero_db_proto_rawDesc,
NumEnums: 1,
NumMessages: 19,
NumMessages: 20,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -2251,6 +2251,92 @@ func (x *HeroSelectCardResp) GetAtno() []*AtnoData {
return nil
}
// 抽卡记录
type HeroDrawRecordReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *HeroDrawRecordReq) Reset() {
*x = HeroDrawRecordReq{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroDrawRecordReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroDrawRecordReq) ProtoMessage() {}
func (x *HeroDrawRecordReq) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[43]
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 HeroDrawRecordReq.ProtoReflect.Descriptor instead.
func (*HeroDrawRecordReq) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{43}
}
type HeroDrawRecordResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Record *DBHeroDrawRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record"` // 扩展数据
}
func (x *HeroDrawRecordResp) Reset() {
*x = HeroDrawRecordResp{}
if protoimpl.UnsafeEnabled {
mi := &file_hero_hero_msg_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeroDrawRecordResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeroDrawRecordResp) ProtoMessage() {}
func (x *HeroDrawRecordResp) ProtoReflect() protoreflect.Message {
mi := &file_hero_hero_msg_proto_msgTypes[44]
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 HeroDrawRecordResp.ProtoReflect.Descriptor instead.
func (*HeroDrawRecordResp) Descriptor() ([]byte, []int) {
return file_hero_hero_msg_proto_rawDescGZIP(), []int{44}
}
func (x *HeroDrawRecordResp) GetRecord() *DBHeroDrawRecord {
if x != nil {
return x.Record
}
return nil
}
var File_hero_hero_msg_proto protoreflect.FileDescriptor
var file_hero_hero_msg_proto_rawDesc = []byte{
@ -2460,8 +2546,14 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x04,
0x61, 0x74, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x41, 0x74, 0x6e,
0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x61, 0x74, 0x6e, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x48,
0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71,
0x22, 0x3f, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x72, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f,
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x44,
0x72, 0x61, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72,
0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
@ -2476,7 +2568,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, 49)
var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 51)
var file_hero_hero_msg_proto_goTypes = []interface{}{
(*HeroInfoReq)(nil), // 0: HeroInfoReq
(*HeroInfoResp)(nil), // 1: HeroInfoResp
@ -2521,50 +2613,54 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{
(*HeroSaveCardResp)(nil), // 40: HeroSaveCardResp
(*HeroSelectCardReq)(nil), // 41: HeroSelectCardReq
(*HeroSelectCardResp)(nil), // 42: HeroSelectCardResp
nil, // 43: HeroStrengthenUplvReq.ItemEntry
nil, // 44: HeroStrengthenUpSkillReq.ItemEntry
nil, // 45: HeroPropertyPush.PropertyEntry
nil, // 46: HeroPropertyPush.AddPropertyEntry
nil, // 47: HeroFusionReq.HerosEntry
nil, // 48: HeroPeachRewardResp.PeachEntry
(*DBHero)(nil), // 49: DBHero
(*UserAtno)(nil), // 50: UserAtno
(*DBHeroRecord)(nil), // 51: DBHeroRecord
(*DBHeroTalent)(nil), // 52: DBHeroTalent
(*HeroDrawRecordReq)(nil), // 43: HeroDrawRecordReq
(*HeroDrawRecordResp)(nil), // 44: HeroDrawRecordResp
nil, // 45: HeroStrengthenUplvReq.ItemEntry
nil, // 46: HeroStrengthenUpSkillReq.ItemEntry
nil, // 47: HeroPropertyPush.PropertyEntry
nil, // 48: HeroPropertyPush.AddPropertyEntry
nil, // 49: HeroFusionReq.HerosEntry
nil, // 50: HeroPeachRewardResp.PeachEntry
(*DBHero)(nil), // 51: DBHero
(*UserAtno)(nil), // 52: UserAtno
(*DBHeroRecord)(nil), // 53: DBHeroRecord
(*DBHeroTalent)(nil), // 54: DBHeroTalent
(*DBHeroDrawRecord)(nil), // 55: DBHeroDrawRecord
}
var file_hero_hero_msg_proto_depIdxs = []int32{
49, // 0: HeroInfoResp.base:type_name -> DBHero
49, // 1: HeroListResp.list:type_name -> DBHero
43, // 2: HeroStrengthenUplvReq.item:type_name -> HeroStrengthenUplvReq.ItemEntry
49, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
49, // 4: HeroStrengthenUpStarResp.hero:type_name -> DBHero
44, // 5: HeroStrengthenUpSkillReq.item:type_name -> HeroStrengthenUpSkillReq.ItemEntry
49, // 6: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
49, // 7: HeroAwakenResp.hero:type_name -> DBHero
45, // 8: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
46, // 9: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
49, // 10: HeroLockResp.hero:type_name -> DBHero
49, // 11: HeroGetSpecifiedResp.hero:type_name -> DBHero
50, // 12: AtnoData.atno:type_name -> UserAtno
51, // 0: HeroInfoResp.base:type_name -> DBHero
51, // 1: HeroListResp.list:type_name -> DBHero
45, // 2: HeroStrengthenUplvReq.item:type_name -> HeroStrengthenUplvReq.ItemEntry
51, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero
51, // 4: HeroStrengthenUpStarResp.hero:type_name -> DBHero
46, // 5: HeroStrengthenUpSkillReq.item:type_name -> HeroStrengthenUpSkillReq.ItemEntry
51, // 6: HeroStrengthenUpSkillResp.hero:type_name -> DBHero
51, // 7: HeroAwakenResp.hero:type_name -> DBHero
47, // 8: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry
48, // 9: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry
51, // 10: HeroLockResp.hero:type_name -> DBHero
51, // 11: HeroGetSpecifiedResp.hero:type_name -> DBHero
52, // 12: AtnoData.atno:type_name -> UserAtno
19, // 13: HeroDrawCardResp.data:type_name -> AtnoData
50, // 14: HeroDrawCardResp.wish:type_name -> UserAtno
51, // 15: HeroDrawCardResp.record:type_name -> DBHeroRecord
49, // 16: HeroChangePush.list:type_name -> DBHero
51, // 17: HeroDrawCardFloorResp.record:type_name -> DBHeroRecord
47, // 18: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry
52, // 19: HeroTalentListResp.telnet:type_name -> DBHeroTalent
52, // 20: HeroTalentLearnResp.telnet:type_name -> DBHeroTalent
52, // 21: HeroTalentResetResp.telnet:type_name -> DBHeroTalent
48, // 22: HeroPeachRewardResp.peach:type_name -> HeroPeachRewardResp.PeachEntry
50, // 23: HeroPeachRewardResp.atno:type_name -> UserAtno
51, // 24: HeroSaveCardResp.record:type_name -> DBHeroRecord
51, // 25: HeroSelectCardResp.record:type_name -> DBHeroRecord
52, // 14: HeroDrawCardResp.wish:type_name -> UserAtno
53, // 15: HeroDrawCardResp.record:type_name -> DBHeroRecord
51, // 16: HeroChangePush.list:type_name -> DBHero
53, // 17: HeroDrawCardFloorResp.record:type_name -> DBHeroRecord
49, // 18: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry
54, // 19: HeroTalentListResp.telnet:type_name -> DBHeroTalent
54, // 20: HeroTalentLearnResp.telnet:type_name -> DBHeroTalent
54, // 21: HeroTalentResetResp.telnet:type_name -> DBHeroTalent
50, // 22: HeroPeachRewardResp.peach:type_name -> HeroPeachRewardResp.PeachEntry
52, // 23: HeroPeachRewardResp.atno:type_name -> UserAtno
53, // 24: HeroSaveCardResp.record:type_name -> DBHeroRecord
53, // 25: HeroSelectCardResp.record:type_name -> DBHeroRecord
19, // 26: HeroSelectCardResp.atno:type_name -> AtnoData
27, // [27:27] is the sub-list for method output_type
27, // [27:27] is the sub-list for method input_type
27, // [27:27] is the sub-list for extension type_name
27, // [27:27] is the sub-list for extension extendee
0, // [0:27] is the sub-list for field type_name
55, // 27: HeroDrawRecordResp.record:type_name -> DBHeroDrawRecord
28, // [28:28] is the sub-list for method output_type
28, // [28:28] is the sub-list for method input_type
28, // [28:28] is the sub-list for extension type_name
28, // [28:28] is the sub-list for extension extendee
0, // [0:28] is the sub-list for field type_name
}
func init() { file_hero_hero_msg_proto_init() }
@ -3091,6 +3187,30 @@ func file_hero_hero_msg_proto_init() {
return nil
}
}
file_hero_hero_msg_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroDrawRecordReq); 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[44].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeroDrawRecordResp); 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{
@ -3098,7 +3218,7 @@ func file_hero_hero_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_hero_hero_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 49,
NumMessages: 51,
NumExtensions: 0,
NumServices: 0,
},