上传战斗记录数据
This commit is contained in:
parent
89234a3d03
commit
a387383e4a
@ -47,7 +47,7 @@ const (
|
||||
ModuleTask core.M_Modules = "task" //任务模块
|
||||
ModuleMainline core.M_Modules = "mainline" //主线模块
|
||||
ModuleNotify core.M_Modules = "notify" //公告模块
|
||||
ModuleChat core.M_Modules = "chat" //装备模块
|
||||
ModuleChat core.M_Modules = "chat" //聊天模块
|
||||
ModuleGM core.M_Modules = "gm" //gm模块
|
||||
ModulePagoda core.M_Modules = "pagoda" //魔塔模块
|
||||
ModuleMartialhall core.M_Modules = "martialhall" //武馆模块
|
||||
@ -58,6 +58,7 @@ const (
|
||||
ModuleViking core.M_Modules = "viking" //维京远征
|
||||
ModuleMoonfantasy core.M_Modules = "moonfantasy" //月之秘境模块
|
||||
ModuleHunting core.M_Modules = "hunting" //狩猎
|
||||
ModuleBattle core.M_Modules = "battle" //战斗
|
||||
)
|
||||
|
||||
//数据表名定义处
|
||||
|
28
modules/battle/api.go
Normal file
28
modules/battle/api.go
Normal file
@ -0,0 +1,28 @@
|
||||
package battle
|
||||
|
||||
import (
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go_dreamfactory/lego/core"
|
||||
)
|
||||
|
||||
/*
|
||||
装备模块 API
|
||||
*/
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service core.IService
|
||||
module *Battle
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*Battle)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
return
|
||||
}
|
62
modules/battle/configure.go
Normal file
62
modules/battle/configure.go
Normal file
@ -0,0 +1,62 @@
|
||||
package battle
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
const (
|
||||
game_monsterformat = "game_monsterformat.json" //整容表
|
||||
game_monster = "game_monster.json" //怪物表
|
||||
)
|
||||
|
||||
///背包配置管理组件
|
||||
type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
module *Battle
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.MCompConfigure.Init(service, module, comp, options)
|
||||
this.module = module.(*Battle)
|
||||
this.LoadConfigure(game_monster, cfg.NewGameMonster)
|
||||
this.LoadConfigure(game_monsterformat, cfg.NewGameMonsterFormat)
|
||||
return
|
||||
}
|
||||
|
||||
//查询阵容表
|
||||
func (this *configureComp) GetMonsterFormat(id int32) (result *cfg.GameMonsterFormatData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_monsterformat); err != nil {
|
||||
this.module.Errorln(err)
|
||||
} else {
|
||||
if result, ok = v.(*cfg.GameMonsterFormat).GetDataMap()[id]; !ok {
|
||||
err = fmt.Errorf("on found MonsterFormat:%d", id)
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//查询怪物表
|
||||
func (this *configureComp) GetMonster(id int32) (result *cfg.GameMonsterData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(game_monster); err != nil {
|
||||
this.module.Errorln(err)
|
||||
} else {
|
||||
if result, ok = v.(*cfg.GameMonster).GetDataMap()[id]; !ok {
|
||||
err = fmt.Errorf("on found GameMonster:%d", id)
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
87
modules/battle/modelBattle.go
Normal file
87
modules/battle/modelBattle.go
Normal file
@ -0,0 +1,87 @@
|
||||
package battle
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
///数据组件
|
||||
type modelBattleComp struct {
|
||||
modules.MCompModel
|
||||
module *Battle
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *modelBattleComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
|
||||
this.TableName = comm.TableForum
|
||||
this.MCompModel.Init(service, module, comp, opt)
|
||||
this.module = module.(*Battle)
|
||||
this.TableName = "battle"
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "heroid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
//创建pve 战斗记录
|
||||
func (this *modelBattleComp) createpve(session comm.IUserSession, req *pb.BattlePVEReq) (record *pb.DBBattleRecord, code pb.ErrorCode) {
|
||||
record = &pb.DBBattleRecord{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Btype: pb.BattleType_pve,
|
||||
Ptype: req.Ptype,
|
||||
Plevel: req.Levelid,
|
||||
State: pb.BBattleState_in,
|
||||
RedCompId: session.GetUserId(),
|
||||
Redflist: make([]*pb.DBBattleFormt, 1),
|
||||
BlueCompId: "",
|
||||
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
|
||||
}
|
||||
record.Redflist[0] = &pb.DBBattleFormt{
|
||||
Leadpos: req.Leadpos,
|
||||
Team: make([]*pb.DBHero, len(req.Teamids)),
|
||||
}
|
||||
for i, v := range req.Teamids {
|
||||
if record.Redflist[0].Team[i], code = this.module.ModuleHero.GetHeroByObjID(session.GetUserId(), v); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
for i, v := range req.Mformat {
|
||||
if mf, err := this.module.configure.GetMonsterFormat(v); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
} else {
|
||||
record.Buleflist[i] = &pb.DBBattleFormt{
|
||||
Leadpos: mf.CaptainId,
|
||||
Team: make([]*pb.DBHero, len(req.Teamids)),
|
||||
}
|
||||
for i1, v1 := range mf.MonsterList {
|
||||
if v1 == -1 {
|
||||
record.Buleflist[i].Team[i1] = nil
|
||||
} else {
|
||||
if monst, err := this.module.configure.GetMonster(v1); err != nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
} else {
|
||||
if record.Buleflist[i].Team[i1], code = this.module.ModuleHero.CreateMonster(monst.HeroId, monst.Star, mf.Lv); code != pb.ErrorCode_Success {
|
||||
return
|
||||
} else {
|
||||
record.Buleflist[i].Team[i1].Property[comm.Hp] = int32(float32(record.Buleflist[i].Team[i1].Property[comm.Hp]) * mf.Hppro)
|
||||
record.Buleflist[i].Team[i1].Property[comm.Atk] = int32(float32(record.Buleflist[i].Team[i1].Property[comm.Atk]) * mf.Atkpro)
|
||||
record.Buleflist[i].Team[i1].Property[comm.Def] = int32(float32(record.Buleflist[i].Team[i1].Property[comm.Def]) * mf.Defpro)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := this.Add(record.Id, record); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
return
|
||||
}
|
59
modules/battle/module.go
Normal file
59
modules/battle/module.go
Normal file
@ -0,0 +1,59 @@
|
||||
package battle
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
/*
|
||||
模块名:战斗模块
|
||||
描述:处理游侠战斗相关业务
|
||||
开发:李伟
|
||||
*/
|
||||
func NewModule() core.IModule {
|
||||
m := new(Battle)
|
||||
return m
|
||||
}
|
||||
|
||||
type Battle struct {
|
||||
modules.ModuleBase
|
||||
api_comp *apiComp
|
||||
configure *configureComp
|
||||
modelBattle *modelBattleComp
|
||||
}
|
||||
|
||||
//模块名
|
||||
func (this *Battle) GetType() core.M_Modules {
|
||||
return comm.ModuleBattle
|
||||
}
|
||||
|
||||
//模块初始化接口 注册用户创建角色事件
|
||||
func (this *Battle) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
return
|
||||
}
|
||||
|
||||
//装备组件
|
||||
func (this *Battle) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
this.modelBattle = this.RegisterComp(new(modelBattleComp)).(*modelBattleComp)
|
||||
}
|
||||
|
||||
func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVEReq) (code pb.ErrorCode, resp *pb.BattlePVEResp) {
|
||||
var record *pb.DBBattleRecord
|
||||
if record, code = this.modelBattle.createpve(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
resp = &pb.BattlePVEResp{
|
||||
Id: record.Id,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
}
|
||||
return
|
||||
}
|
79
modules/battle/module_test.go
Normal file
79
modules/battle/module_test.go
Normal file
@ -0,0 +1,79 @@
|
||||
package battle_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego"
|
||||
"go_dreamfactory/lego/base/rpcx"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules/equipment"
|
||||
"go_dreamfactory/modules/gm"
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/items"
|
||||
"go_dreamfactory/modules/user"
|
||||
"go_dreamfactory/services"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/sys/db"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func newService(ops ...rpcx.Option) core.IService {
|
||||
s := new(TestService)
|
||||
s.Configure(ops...)
|
||||
return s
|
||||
}
|
||||
|
||||
//梦工厂基础服务对象
|
||||
type TestService struct {
|
||||
rpcx.RPCXService
|
||||
}
|
||||
|
||||
//初始化相关系统
|
||||
func (this *TestService) InitSys() {
|
||||
this.RPCXService.InitSys()
|
||||
if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.db err: %s", err.Error()))
|
||||
} else {
|
||||
log.Infof("init sys.db success!")
|
||||
}
|
||||
if err := configure.OnInit(this.GetSettings().Sys["configure"]); err != nil {
|
||||
panic(fmt.Sprintf("init sys.configure err: %s", err.Error()))
|
||||
} else {
|
||||
log.Infof("init sys.configure success!")
|
||||
}
|
||||
}
|
||||
|
||||
var service core.IService
|
||||
var s_gateComp comm.ISC_GateRouteComp = services.NewGateRouteComp()
|
||||
var module = new(gm.GM)
|
||||
|
||||
//测试环境下初始化db和cache 系统
|
||||
func _TestMain(m *testing.M) {
|
||||
service = newService(
|
||||
rpcx.SetConfPath("../../bin/conf/worker_1.yaml"),
|
||||
rpcx.SetVersion("1.0.0.0"),
|
||||
)
|
||||
service.OnInstallComp( //装备组件
|
||||
s_gateComp, //此服务需要接受用户的消息 需要装备网关组件
|
||||
)
|
||||
go func() {
|
||||
lego.Run(service, //运行模块
|
||||
module,
|
||||
hero.NewModule(),
|
||||
user.NewModule(),
|
||||
items.NewModule(),
|
||||
equipment.NewModule(),
|
||||
)
|
||||
}()
|
||||
time.Sleep(time.Second * 3)
|
||||
defer os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func Test_Module(t *testing.T) {
|
||||
tmap := map[string]int{"1": 1, "2": 2, "3": 3}
|
||||
tmap["4"] = tmap["4"] * 100
|
||||
fmt.Println(tmap["4"])
|
||||
}
|
527
pb/battle_db.pb.go
Normal file
527
pb/battle_db.pb.go
Normal file
@ -0,0 +1,527 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: battle/battle_db.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type BattleType int32
|
||||
|
||||
const (
|
||||
BattleType_nil BattleType = 0
|
||||
BattleType_pve BattleType = 1
|
||||
BattleType_pvp BattleType = 2
|
||||
BattleType_pvb BattleType = 3
|
||||
)
|
||||
|
||||
// Enum value maps for BattleType.
|
||||
var (
|
||||
BattleType_name = map[int32]string{
|
||||
0: "nil",
|
||||
1: "pve",
|
||||
2: "pvp",
|
||||
3: "pvb",
|
||||
}
|
||||
BattleType_value = map[string]int32{
|
||||
"nil": 0,
|
||||
"pve": 1,
|
||||
"pvp": 2,
|
||||
"pvb": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x BattleType) Enum() *BattleType {
|
||||
p := new(BattleType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x BattleType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (BattleType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_battle_battle_db_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (BattleType) Type() protoreflect.EnumType {
|
||||
return &file_battle_battle_db_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x BattleType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BattleType.Descriptor instead.
|
||||
func (BattleType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_battle_battle_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
//玩法类型
|
||||
type PlayType int32
|
||||
|
||||
const (
|
||||
PlayType_mainline PlayType = 0 //主线玩法
|
||||
PlayType_pagoda PlayType = 1 //爬塔
|
||||
)
|
||||
|
||||
// Enum value maps for PlayType.
|
||||
var (
|
||||
PlayType_name = map[int32]string{
|
||||
0: "mainline",
|
||||
1: "pagoda",
|
||||
}
|
||||
PlayType_value = map[string]int32{
|
||||
"mainline": 0,
|
||||
"pagoda": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x PlayType) Enum() *PlayType {
|
||||
p := new(PlayType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x PlayType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (PlayType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_battle_battle_db_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (PlayType) Type() protoreflect.EnumType {
|
||||
return &file_battle_battle_db_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x PlayType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PlayType.Descriptor instead.
|
||||
func (PlayType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_battle_battle_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
//战斗状态
|
||||
type BBattleState int32
|
||||
|
||||
const (
|
||||
BBattleState_in BBattleState = 0
|
||||
BBattleState_end BBattleState = 2
|
||||
)
|
||||
|
||||
// Enum value maps for BBattleState.
|
||||
var (
|
||||
BBattleState_name = map[int32]string{
|
||||
0: "in",
|
||||
2: "end",
|
||||
}
|
||||
BBattleState_value = map[string]int32{
|
||||
"in": 0,
|
||||
"end": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x BBattleState) Enum() *BBattleState {
|
||||
p := new(BBattleState)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x BBattleState) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (BBattleState) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_battle_battle_db_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (BBattleState) Type() protoreflect.EnumType {
|
||||
return &file_battle_battle_db_proto_enumTypes[2]
|
||||
}
|
||||
|
||||
func (x BBattleState) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BBattleState.Descriptor instead.
|
||||
func (BBattleState) EnumDescriptor() ([]byte, []int) {
|
||||
return file_battle_battle_db_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
//战斗阵型信息
|
||||
type DBBattleComp int32
|
||||
|
||||
const (
|
||||
DBBattleComp_red DBBattleComp = 0 //红方
|
||||
DBBattleComp_bule DBBattleComp = 1 //蓝方
|
||||
)
|
||||
|
||||
// Enum value maps for DBBattleComp.
|
||||
var (
|
||||
DBBattleComp_name = map[int32]string{
|
||||
0: "red",
|
||||
1: "bule",
|
||||
}
|
||||
DBBattleComp_value = map[string]int32{
|
||||
"red": 0,
|
||||
"bule": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x DBBattleComp) Enum() *DBBattleComp {
|
||||
p := new(DBBattleComp)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x DBBattleComp) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (DBBattleComp) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_battle_battle_db_proto_enumTypes[3].Descriptor()
|
||||
}
|
||||
|
||||
func (DBBattleComp) Type() protoreflect.EnumType {
|
||||
return &file_battle_battle_db_proto_enumTypes[3]
|
||||
}
|
||||
|
||||
func (x DBBattleComp) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBBattleComp.Descriptor instead.
|
||||
func (DBBattleComp) EnumDescriptor() ([]byte, []int) {
|
||||
return file_battle_battle_db_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
//战斗阵型信息
|
||||
type DBBattleFormt struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Leadpos int32 `protobuf:"varint,1,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
|
||||
Team []*DBHero `protobuf:"bytes,2,rep,name=team,proto3" json:"team"`
|
||||
}
|
||||
|
||||
func (x *DBBattleFormt) Reset() {
|
||||
*x = DBBattleFormt{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_battle_battle_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBBattleFormt) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBBattleFormt) ProtoMessage() {}
|
||||
|
||||
func (x *DBBattleFormt) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_battle_battle_db_proto_msgTypes[0]
|
||||
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 DBBattleFormt.ProtoReflect.Descriptor instead.
|
||||
func (*DBBattleFormt) Descriptor() ([]byte, []int) {
|
||||
return file_battle_battle_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBBattleFormt) GetLeadpos() int32 {
|
||||
if x != nil {
|
||||
return x.Leadpos
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBBattleFormt) GetTeam() []*DBHero {
|
||||
if x != nil {
|
||||
return x.Team
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//战斗记录
|
||||
type DBBattleRecord struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗记录id
|
||||
Btype BattleType `protobuf:"varint,2,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型
|
||||
Ptype PlayType `protobuf:"varint,3,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
|
||||
Plevel int32 `protobuf:"varint,4,opt,name=plevel,proto3" json:"plevel"` //玩法关卡
|
||||
State BBattleState `protobuf:"varint,5,opt,name=state,proto3,enum=BBattleState" json:"state"` //战斗状态
|
||||
RedCompId string `protobuf:"bytes,6,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id
|
||||
Redflist []*DBBattleFormt `protobuf:"bytes,7,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表
|
||||
BlueCompId string `protobuf:"bytes,8,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id
|
||||
Buleflist []*DBBattleFormt `protobuf:"bytes,9,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表
|
||||
Roundresult []DBBattleComp `protobuf:"varint,10,rep,packed,name=roundresult,proto3,enum=DBBattleComp" json:"roundresult"` //战斗场次结果
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) Reset() {
|
||||
*x = DBBattleRecord{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_battle_battle_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBBattleRecord) ProtoMessage() {}
|
||||
|
||||
func (x *DBBattleRecord) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_battle_battle_db_proto_msgTypes[1]
|
||||
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 DBBattleRecord.ProtoReflect.Descriptor instead.
|
||||
func (*DBBattleRecord) Descriptor() ([]byte, []int) {
|
||||
return file_battle_battle_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetBtype() BattleType {
|
||||
if x != nil {
|
||||
return x.Btype
|
||||
}
|
||||
return BattleType_nil
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetPtype() PlayType {
|
||||
if x != nil {
|
||||
return x.Ptype
|
||||
}
|
||||
return PlayType_mainline
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetPlevel() int32 {
|
||||
if x != nil {
|
||||
return x.Plevel
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetState() BBattleState {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return BBattleState_in
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetRedCompId() string {
|
||||
if x != nil {
|
||||
return x.RedCompId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetRedflist() []*DBBattleFormt {
|
||||
if x != nil {
|
||||
return x.Redflist
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetBlueCompId() string {
|
||||
if x != nil {
|
||||
return x.BlueCompId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetBuleflist() []*DBBattleFormt {
|
||||
if x != nil {
|
||||
return x.Buleflist
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBBattleRecord) GetRoundresult() []DBBattleComp {
|
||||
if x != nil {
|
||||
return x.Roundresult
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_battle_battle_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_battle_battle_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f,
|
||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68,
|
||||
0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x0d,
|
||||
0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04,
|
||||
0x74, 0x65, 0x61, 0x6d, 0x22, 0xea, 0x02, 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74,
|
||||
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79,
|
||||
0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70,
|
||||
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74,
|
||||
0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70,
|
||||
0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18,
|
||||
0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74,
|
||||
0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
|
||||
0x0a, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c,
|
||||
0x74, 0x2a, 0x30, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10,
|
||||
0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76,
|
||||
0x62, 0x10, 0x03, 0x2a, 0x24, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a,
|
||||
0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x01, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61,
|
||||
0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10,
|
||||
0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x21, 0x0a, 0x0c, 0x44, 0x42,
|
||||
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65,
|
||||
0x64, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x01, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_battle_battle_db_proto_rawDescOnce sync.Once
|
||||
file_battle_battle_db_proto_rawDescData = file_battle_battle_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_battle_battle_db_proto_rawDescGZIP() []byte {
|
||||
file_battle_battle_db_proto_rawDescOnce.Do(func() {
|
||||
file_battle_battle_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_battle_battle_db_proto_rawDescData)
|
||||
})
|
||||
return file_battle_battle_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_battle_battle_db_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
||||
var file_battle_battle_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_battle_battle_db_proto_goTypes = []interface{}{
|
||||
(BattleType)(0), // 0: BattleType
|
||||
(PlayType)(0), // 1: PlayType
|
||||
(BBattleState)(0), // 2: BBattleState
|
||||
(DBBattleComp)(0), // 3: DBBattleComp
|
||||
(*DBBattleFormt)(nil), // 4: DBBattleFormt
|
||||
(*DBBattleRecord)(nil), // 5: DBBattleRecord
|
||||
(*DBHero)(nil), // 6: DBHero
|
||||
}
|
||||
var file_battle_battle_db_proto_depIdxs = []int32{
|
||||
6, // 0: DBBattleFormt.team:type_name -> DBHero
|
||||
0, // 1: DBBattleRecord.btype:type_name -> BattleType
|
||||
1, // 2: DBBattleRecord.ptype:type_name -> PlayType
|
||||
2, // 3: DBBattleRecord.state:type_name -> BBattleState
|
||||
4, // 4: DBBattleRecord.redflist:type_name -> DBBattleFormt
|
||||
4, // 5: DBBattleRecord.buleflist:type_name -> DBBattleFormt
|
||||
3, // 6: DBBattleRecord.roundresult:type_name -> DBBattleComp
|
||||
7, // [7:7] is the sub-list for method output_type
|
||||
7, // [7:7] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_battle_battle_db_proto_init() }
|
||||
func file_battle_battle_db_proto_init() {
|
||||
if File_battle_battle_db_proto != nil {
|
||||
return
|
||||
}
|
||||
file_hero_hero_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_battle_battle_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBBattleFormt); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_battle_battle_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBBattleRecord); 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{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_battle_battle_db_proto_rawDesc,
|
||||
NumEnums: 4,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_battle_battle_db_proto_goTypes,
|
||||
DependencyIndexes: file_battle_battle_db_proto_depIdxs,
|
||||
EnumInfos: file_battle_battle_db_proto_enumTypes,
|
||||
MessageInfos: file_battle_battle_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_battle_battle_db_proto = out.File
|
||||
file_battle_battle_db_proto_rawDesc = nil
|
||||
file_battle_battle_db_proto_goTypes = nil
|
||||
file_battle_battle_db_proto_depIdxs = nil
|
||||
}
|
292
pb/battle_msg.pb.go
Normal file
292
pb/battle_msg.pb.go
Normal file
@ -0,0 +1,292 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: battle/battle_msg.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type BattlePVEReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
|
||||
Levelid int32 `protobuf:"varint,2,opt,name=levelid,proto3" json:"levelid"` //关卡id
|
||||
Leadpos int32 `protobuf:"varint,3,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
|
||||
Teamids []string `protobuf:"bytes,4,rep,name=teamids,proto3" json:"teamids"` //阵容信息
|
||||
Mformat []int32 `protobuf:"varint,5,rep,packed,name=mformat,proto3" json:"mformat"` //敌方增容信息
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) Reset() {
|
||||
*x = BattlePVEReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BattlePVEReq) ProtoMessage() {}
|
||||
|
||||
func (x *BattlePVEReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[0]
|
||||
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 BattlePVEReq.ProtoReflect.Descriptor instead.
|
||||
func (*BattlePVEReq) Descriptor() ([]byte, []int) {
|
||||
return file_battle_battle_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) GetPtype() PlayType {
|
||||
if x != nil {
|
||||
return x.Ptype
|
||||
}
|
||||
return PlayType_mainline
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) GetLevelid() int32 {
|
||||
if x != nil {
|
||||
return x.Levelid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) GetLeadpos() int32 {
|
||||
if x != nil {
|
||||
return x.Leadpos
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) GetTeamids() []string {
|
||||
if x != nil {
|
||||
return x.Teamids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BattlePVEReq) GetMformat() []int32 {
|
||||
if x != nil {
|
||||
return x.Mformat
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BattlePVEResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"` //战斗id
|
||||
RedCompId string `protobuf:"bytes,5,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id
|
||||
Redflist []*DBBattleFormt `protobuf:"bytes,6,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表
|
||||
BlueCompId string `protobuf:"bytes,7,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id
|
||||
Buleflist []*DBBattleFormt `protobuf:"bytes,8,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) Reset() {
|
||||
*x = BattlePVEResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BattlePVEResp) ProtoMessage() {}
|
||||
|
||||
func (x *BattlePVEResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_battle_battle_msg_proto_msgTypes[1]
|
||||
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 BattlePVEResp.ProtoReflect.Descriptor instead.
|
||||
func (*BattlePVEResp) Descriptor() ([]byte, []int) {
|
||||
return file_battle_battle_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) GetRedCompId() string {
|
||||
if x != nil {
|
||||
return x.RedCompId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) GetRedflist() []*DBBattleFormt {
|
||||
if x != nil {
|
||||
return x.Redflist
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) GetBlueCompId() string {
|
||||
if x != nil {
|
||||
return x.BlueCompId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BattlePVEResp) GetBuleflist() []*DBBattleFormt {
|
||||
if x != nil {
|
||||
return x.Buleflist
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_battle_battle_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_battle_battle_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f,
|
||||
0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c,
|
||||
0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x52,
|
||||
0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74,
|
||||
0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x69, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69,
|
||||
0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64,
|
||||
0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x03,
|
||||
0x28, 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xb7, 0x01, 0x0a, 0x0d,
|
||||
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72,
|
||||
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
||||
0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72,
|
||||
0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75,
|
||||
0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66,
|
||||
0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65,
|
||||
0x66, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_battle_battle_msg_proto_rawDescOnce sync.Once
|
||||
file_battle_battle_msg_proto_rawDescData = file_battle_battle_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_battle_battle_msg_proto_rawDescGZIP() []byte {
|
||||
file_battle_battle_msg_proto_rawDescOnce.Do(func() {
|
||||
file_battle_battle_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_battle_battle_msg_proto_rawDescData)
|
||||
})
|
||||
return file_battle_battle_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_battle_battle_msg_proto_goTypes = []interface{}{
|
||||
(*BattlePVEReq)(nil), // 0: BattlePVEReq
|
||||
(*BattlePVEResp)(nil), // 1: BattlePVEResp
|
||||
(PlayType)(0), // 2: PlayType
|
||||
(*DBBattleFormt)(nil), // 3: DBBattleFormt
|
||||
}
|
||||
var file_battle_battle_msg_proto_depIdxs = []int32{
|
||||
2, // 0: BattlePVEReq.ptype:type_name -> PlayType
|
||||
3, // 1: BattlePVEResp.redflist:type_name -> DBBattleFormt
|
||||
3, // 2: BattlePVEResp.buleflist:type_name -> DBBattleFormt
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_battle_battle_msg_proto_init() }
|
||||
func file_battle_battle_msg_proto_init() {
|
||||
if File_battle_battle_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_battle_battle_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_battle_battle_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BattlePVEReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_battle_battle_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BattlePVEResp); 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{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_battle_battle_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_battle_battle_msg_proto_goTypes,
|
||||
DependencyIndexes: file_battle_battle_msg_proto_depIdxs,
|
||||
MessageInfos: file_battle_battle_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_battle_battle_msg_proto = out.File
|
||||
file_battle_battle_msg_proto_rawDesc = nil
|
||||
file_battle_battle_msg_proto_goTypes = nil
|
||||
file_battle_battle_msg_proto_depIdxs = nil
|
||||
}
|
@ -388,6 +388,8 @@ type DBUserExpand struct {
|
||||
FriendPointOD int32 `protobuf:"varint,16,opt,name=friendPointOD,proto3" json:"friendPointOD" bson:"friendPointOD"` //每日送出友情点
|
||||
MoonfantasyTriggerNum int32 `protobuf:"varint,17,opt,name=moonfantasyTriggerNum,proto3" json:"moonfantasyTriggerNum" bson:"moonfantasyTriggerNum"` // 月之秘境触发次数
|
||||
MoonfantasyLastTrigger int64 `protobuf:"varint,18,opt,name=moonfantasyLastTrigger,proto3" json:"moonfantasyLastTrigger" bson:"moonfantasyTriggerlast"` // 月之秘境最后触发时间
|
||||
LoginAddCount int32 `protobuf:"varint,19,opt,name=loginAddCount,proto3" json:"loginAddCount"` //@go_tasgs(`bson:"loginAddCount"`) 累计登录天数
|
||||
LoginContinueCount int32 `protobuf:"varint,20,opt,name=loginContinueCount,proto3" json:"loginContinueCount"` //@go_tasgs(`bson:"loginContinueCount"`) 连续登录天数
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) Reset() {
|
||||
@ -548,6 +550,20 @@ func (x *DBUserExpand) GetMoonfantasyLastTrigger() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) GetLoginAddCount() int32 {
|
||||
if x != nil {
|
||||
return x.LoginAddCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUserExpand) GetLoginContinueCount() int32 {
|
||||
if x != nil {
|
||||
return x.LoginContinueCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_userexpand_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_userexpand_proto_rawDesc = []byte{
|
||||
@ -576,7 +592,7 @@ var file_userexpand_proto_rawDesc = []byte{
|
||||
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
|
||||
0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70,
|
||||
0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x22, 0xbd, 0x06, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65,
|
||||
0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x22, 0x93, 0x07, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65,
|
||||
0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 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, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73,
|
||||
@ -620,16 +636,21 @@ var file_userexpand_proto_rawDesc = []byte{
|
||||
0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72,
|
||||
0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6d, 0x6f, 0x6f,
|
||||
0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x4c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x69, 0x67,
|
||||
0x67, 0x65, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46,
|
||||
0x0a, 0x0f, 0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 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,
|
||||
0x67, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6c, 0x6f, 0x67, 0x69,
|
||||
0x6e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x69, 0x6e, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a,
|
||||
0x69, 0x61, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61,
|
||||
0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x67, 0x75, 0x72,
|
||||
0x65, 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 (
|
||||
|
Loading…
Reference in New Issue
Block a user