石阵秘境

This commit is contained in:
meixiongfeng 2023-07-20 18:30:03 +08:00
parent fc9876d582
commit 88efe7a225
12 changed files with 631 additions and 160 deletions

View File

@ -299,6 +299,12 @@ const (
TableUnionrank = "unionrank"
//全局表
TableGlobal = "global"
// 石阵秘境
TableStonehenge = "stonehenge"
// 世界buff
TableWorldBuff = "worldbuff"
)
// RPC服务接口定义处

View File

@ -5,6 +5,7 @@ import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
)
type Activity struct {
@ -45,19 +46,23 @@ func (this *Activity) Init(service core.IService, module core.IModule, options c
}
func (this *Activity) Start() (err error) {
err = this.ModuleBase.Start()
if rst, err := this.modelhdList.getHdInfoByHdId(10002); err == nil {
// 服务启动 获取活动信息
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleWarorder); err == nil {
if m, ok := module.(comm.IWarorder); ok {
m.OpenWarorder(2, rst.Stime)
}
}
if module, err = this.service.GetModule(comm.ModulePay); err == nil {
if m, ok := module.(comm.IPay); ok {
m.OpenActivity(1, rst.Stime)
if !db.IsCross() {
if rst, err := this.modelhdList.getHdInfoByHdId(10002); err == nil {
// 服务启动 获取活动信息
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleWarorder); err == nil {
if m, ok := module.(comm.IWarorder); ok {
m.OpenWarorder(2, rst.Stime)
}
}
if module, err = this.service.GetModule(comm.ModulePay); err == nil {
if m, ok := module.(comm.IPay); ok {
m.OpenActivity(1, rst.Stime)
}
}
}
}
return

26
modules/stonehenge/api.go Normal file
View File

@ -0,0 +1,26 @@
package stonehenge
import (
"go_dreamfactory/modules"
"go_dreamfactory/lego/core"
)
type apiComp struct {
modules.MCompGate
service core.IService
module *Stonehenge
}
//组件初始化接口
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.(*Stonehenge)
this.service = service
return
}
func (this *apiComp) Start() (err error) {
err = this.MCompGate.Start()
return
}

View File

@ -0,0 +1,25 @@
package stonehenge
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.StonehengeGetListReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) GetList(session comm.IUserSession, req *pb.StonehengeGetListReq) (errdata *pb.ErrorData) {
var (
stone *pb.DBStonehenge
)
if errdata = this.GetListCheck(session, req); errdata != nil {
return
}
stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId())
session.SendMsg(string(this.module.GetType()), "info", &pb.StonehengeGetListResp{Data: stone})
return
}

View File

@ -0,0 +1,52 @@
package stonehenge
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) SelectHeroCheck(session comm.IUserSession, req *pb.StonehengeSelectHeroReq) (errdata *pb.ErrorData) {
return
}
// 选择英雄
func (this *apiComp) SelectHero(session comm.IUserSession, req *pb.StonehengeSelectHeroReq) (errdata *pb.ErrorData) {
var (
stone *pb.DBStonehenge
update map[string]interface{}
)
update = make(map[string]interface{})
if errdata = this.SelectHeroCheck(session, req); errdata != nil {
return
}
stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId())
if len(stone.Hero) == 0 {
// 查库
for _, hid := range req.Hid {
if hero, err := this.module.ModuleHero.GetHeroByObjID(session.GetUserId(), hid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_HeroNoExist,
Message: pb.ErrorCode_HeroNoExist.ToString(),
}
return
} else {
newHero := new(pb.DBHero)
*newHero = *hero
stone.Hero[hero.HeroID] = newHero
}
}
update["hero"] = stone.Hero
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
} else {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_StonehengeRepeatedSelectHero,
Message: pb.ErrorCode_StonehengeRepeatedSelectHero.ToString(),
}
return
}
session.SendMsg(string(this.module.GetType()), "info", &pb.StonehengeGetListResp{Data: stone})
return
}

View File

@ -0,0 +1,27 @@
package stonehenge
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
)
const (
game_teaching = "game_teaching.json"
game_herostrategy = "game_herostrategy.json"
)
///背包配置管理组件
type configureComp struct {
modules.MCompConfigure
module *Stonehenge
}
//组件初始化接口
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.(*Stonehenge)
this.LoadConfigure(game_teaching, cfg.NewGameTeaching)
this.LoadConfigure(game_herostrategy, cfg.NewGameHeroStrategy)
return
}

View File

@ -0,0 +1,56 @@
package stonehenge
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
// 石阵秘境
type MStonehenge struct {
modules.MCompModel
module *Stonehenge
}
//组件初始化接口
func (this *MStonehenge) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
this.TableName = comm.TableStonehenge
this.MCompModel.Init(service, module, comp, opt)
this.module = module.(*Stonehenge)
//创建uid索引
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
func (this *MStonehenge) GetStonehengeData(uid string) *pb.DBStonehenge {
stone := &pb.DBStonehenge{}
if err := this.Get(uid, stone); err != nil && mgo.MongodbNil == err { // 创建一条初始的数据
stone.Id = primitive.NewObjectID().Hex()
stone.Uid = uid
stone.Rooms = nil // 注意初始房间为空
stone.Userbuff = make(map[int32]int32, 0)
stone.Hero = make(map[string]*pb.DBHero, 0)
stone.Reward = make(map[int32]bool, 0)
stone.Addweight = make(map[int32]int32, 0)
stone.Rtime = configure.Now().Unix()
this.Add(uid, stone)
return nil
}
return stone
}
// 修改石阵信息
func (this *MStonehenge) ChangeStonehengeData(uid string, update map[string]interface{}) (err error) {
return this.Change(uid, update)
}

View File

@ -0,0 +1,55 @@
package stonehenge
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
// 世界buff
type MWorldBuff struct {
modules.MCompModel
module *Stonehenge
}
//组件初始化接口
func (this *MWorldBuff) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
this.TableName = comm.TableWorldBuff
this.MCompModel.Init(service, module, comp, opt)
this.module = module.(*Stonehenge)
//创建uid索引
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
func (this *MWorldBuff) GetStonehengeData(uid string) *pb.DBStonehenge {
stone := &pb.DBStonehenge{}
if err := this.Get(uid, stone); err != nil && mgo.MongodbNil == err { // 创建一条初始的数据
stone.Id = primitive.NewObjectID().Hex()
stone.Uid = uid
stone.Rooms = nil // 注意初始房间为空
stone.Userbuff = make(map[int32]int32, 0)
stone.Hero = make(map[string]*pb.DBHero, 0)
stone.Reward = make(map[int32]bool, 0)
stone.Addweight = make(map[int32]int32, 0)
stone.Rtime = configure.Now().Unix()
this.Add(uid, stone)
return nil
}
return stone
}
// 修改石阵信息
func (this *MWorldBuff) ChangeStonehengeData(uid string, update map[string]interface{}) (err error) {
return this.Change(uid, update)
}

View File

@ -0,0 +1,55 @@
package stonehenge
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
const moduleName = "石阵秘境"
func NewModule() core.IModule {
m := new(Stonehenge)
return m
}
type Stonehenge struct {
modules.ModuleBase
service base.IRPCXService
battle comm.IBattle
api_comp *apiComp
configure *configureComp
modelStonehenge *MStonehenge
}
//模块名
func (this *Stonehenge) GetType() core.M_Modules {
return comm.ModuleAcademy
}
//模块初始化接口 注册用户创建角色事件
func (this *Stonehenge) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.service = service.(base.IRPCXService)
return
}
func (this *Stonehenge) Start() (err error) {
err = this.ModuleBase.Start()
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
return
}
this.battle = module.(comm.IBattle)
return
}
//装备组件
func (this *Stonehenge) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelStonehenge = this.RegisterComp(new(MStonehenge)).(*MStonehenge)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}

View File

@ -417,6 +417,8 @@ const (
ErrorCode_PassonSeatStateErr ErrorCode = 4703 //传功塔状态错误
//战令
ErrorCode_WarorderNoOpen ErrorCode = 4801 //活动未开启
// stonehenge
ErrorCode_StonehengeRepeatedSelectHero ErrorCode = 4901 // 重复选择英雄
)
// Enum value maps for ErrorCode.
@ -775,6 +777,7 @@ var (
4702: "PassonHeroUnavailable",
4703: "PassonSeatStateErr",
4801: "WarorderNoOpen",
4901: "StonehengeRepeatedSelectHero",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@ -1130,6 +1133,7 @@ var (
"PassonHeroUnavailable": 4702,
"PassonSeatStateErr": 4703,
"WarorderNoOpen": 4801,
"StonehengeRepeatedSelectHero": 4901,
}
)
@ -1164,7 +1168,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xf6, 0x40, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0x99, 0x41, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
@ -1683,8 +1687,10 @@ var file_errorcode_proto_rawDesc = []byte{
0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xde, 0x24, 0x12, 0x17, 0x0a, 0x12,
0x50, 0x61, 0x73, 0x73, 0x6f, 0x6e, 0x53, 0x65, 0x61, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45,
0x72, 0x72, 0x10, 0xdf, 0x24, 0x12, 0x13, 0x0a, 0x0e, 0x57, 0x61, 0x72, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x4e, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x10, 0xc1, 0x25, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x4e, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x10, 0xc1, 0x25, 0x12, 0x21, 0x0a, 0x1c, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64,
0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x65, 0x72, 0x6f, 0x10, 0xa5, 0x26, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -26,14 +26,11 @@ type RoomData struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Event map[int32]bool `protobuf:"bytes,1,rep,name=event,proto3" json:"event" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //房间的事件信息 true 表示已完成
CurRoomIndes int32 `protobuf:"varint,2,opt,name=curRoomIndes,proto3" json:"curRoomIndes"` // 当前房间索引 初始 0 每通关一次+1
Portal []int32 `protobuf:"varint,3,rep,packed,name=portal,proto3" json:"portal"` // 传送门id
Selectbuff []int32 `protobuf:"varint,4,rep,packed,name=selectbuff,proto3" json:"selectbuff"` // 给前端显示的buff 组
//int32 curselectbuff = 5;// 当前已经选择的buf
Group map[int32]int32 `protobuf:"bytes,6,rep,name=group,proto3" json:"group" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 事件组
Complete bool `protobuf:"varint,7,opt,name=complete,proto3" json:"complete"` // 房间是否通关
Addweight map[int32]int32 `protobuf:"bytes,8,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型
Event map[int32]bool `protobuf:"bytes,1,rep,name=event,proto3" json:"event" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //房间的事件信息 true 表示已完成
Portal []int32 `protobuf:"varint,2,rep,packed,name=portal,proto3" json:"portal"` // 传送门id
Selectbuff []int32 `protobuf:"varint,3,rep,packed,name=selectbuff,proto3" json:"selectbuff"` // 给前端显示的buff 组
Group map[int32]int32 `protobuf:"bytes,4,rep,name=group,proto3" json:"group" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 事件组
Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete"` // 房间是否通关
}
func (x *RoomData) Reset() {
@ -75,13 +72,6 @@ func (x *RoomData) GetEvent() map[int32]bool {
return nil
}
func (x *RoomData) GetCurRoomIndes() int32 {
if x != nil {
return x.CurRoomIndes
}
return 0
}
func (x *RoomData) GetPortal() []int32 {
if x != nil {
return x.Portal
@ -110,27 +100,22 @@ func (x *RoomData) GetComplete() bool {
return false
}
func (x *RoomData) GetAddweight() map[int32]int32 {
if x != nil {
return x.Addweight
}
return nil
}
type DBStonehenge struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
StageID int32 `protobuf:"varint,3,opt,name=stageID,proto3" json:"stageID"` // 关卡id
Rooms *RoomData `protobuf:"bytes,4,opt,name=rooms,proto3" json:"rooms"` // 当前房间
Envbuff []int32 `protobuf:"varint,5,rep,packed,name=envbuff,proto3" json:"envbuff"` // 环境buff 不能被更改
Userbuff map[int32]int32 `protobuf:"bytes,6,rep,name=userbuff,proto3" json:"userbuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家获得的buff key buff 类型
Hero map[string]*DBHero `protobuf:"bytes,7,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 英雄信息
Reward map[int32]bool `protobuf:"bytes,8,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否首通 key:stageid
Rtime int64 `protobuf:"varint,9,opt,name=rtime,proto3" json:"rtime"` // 刷新时间
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
StageID int32 `protobuf:"varint,3,opt,name=stageID,proto3" json:"stageID"` // 关卡id
CurRoomIndes int32 `protobuf:"varint,4,opt,name=curRoomIndes,proto3" json:"curRoomIndes"` // 当前房间索引 初始 0 每通关一次+1
Rooms *RoomData `protobuf:"bytes,5,opt,name=rooms,proto3" json:"rooms"` // 当前房间信息
Envbuff []int32 `protobuf:"varint,6,rep,packed,name=envbuff,proto3" json:"envbuff"` // 环境buff 不能被更改
Userbuff map[int32]int32 `protobuf:"bytes,7,rep,name=userbuff,proto3" json:"userbuff" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 玩家获得的buff key buff 类型
Hero map[string]*DBHero `protobuf:"bytes,8,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 英雄信息
Reward map[int32]bool `protobuf:"bytes,9,rep,name=reward,proto3" json:"reward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 是否首通 key:stageid
Addweight map[int32]int32 `protobuf:"bytes,10,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型
Rtime int64 `protobuf:"varint,11,opt,name=rtime,proto3" json:"rtime"` // 刷新时间
}
func (x *DBStonehenge) Reset() {
@ -186,6 +171,13 @@ func (x *DBStonehenge) GetStageID() int32 {
return 0
}
func (x *DBStonehenge) GetCurRoomIndes() int32 {
if x != nil {
return x.CurRoomIndes
}
return 0
}
func (x *DBStonehenge) GetRooms() *RoomData {
if x != nil {
return x.Rooms
@ -221,6 +213,13 @@ func (x *DBStonehenge) GetReward() map[int32]bool {
return nil
}
func (x *DBStonehenge) GetAddweight() map[int32]int32 {
if x != nil {
return x.Addweight
}
return nil
}
func (x *DBStonehenge) GetRtime() int64 {
if x != nil {
return x.Rtime
@ -234,67 +233,67 @@ var file_stonehenge_stonehenge_db_proto_rawDesc = []byte{
0x0a, 0x1e, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x6f,
0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 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, 0xc4, 0x03, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x02, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74,
0x61, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a,
0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65,
0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28,
0x05, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6c,
0x65, 0x63, 0x74, 0x62, 0x75, 0x66, 0x66, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x73,
0x65, 0x6c, 0x65, 0x63, 0x74, 0x62, 0x75, 0x66, 0x66, 0x12, 0x2a, 0x0a, 0x05, 0x67, 0x72, 0x6f,
0x75, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44,
0x61, 0x74, 0x61, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e,
0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09,
0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x76, 0x65,
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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a,
0x0e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 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, 0x22, 0xee, 0x03, 0x0a, 0x0c,
0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 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, 0x18,
0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d,
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61,
0x74, 0x61, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x76,
0x62, 0x75, 0x66, 0x66, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x62,
0x75, 0x66, 0x66, 0x12, 0x37, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x18,
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68,
0x65, 0x6e, 0x67, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x12, 0x2b, 0x0a, 0x04,
0x68, 0x65, 0x72, 0x6f, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x53,
0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x77,
0x61, 0x72, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05,
0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69,
0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x40, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e,
0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 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,
0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70,
0x6f, 0x72, 0x74, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x62,
0x75, 0x66, 0x66, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x62, 0x75, 0x66, 0x66, 0x12, 0x2a, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75,
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x1a, 0x38, 0x0a,
0x0a, 0x45, 0x76, 0x65, 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, 0x08, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x8c, 0x05, 0x0a, 0x0c, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x67, 0x65, 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, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x22,
0x0a, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64, 0x65, 0x73, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x64,
0x65, 0x73, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x72, 0x6f,
0x6f, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06,
0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x62, 0x75, 0x66, 0x66, 0x12, 0x37, 0x0a,
0x08, 0x75, 0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1b, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x75, 0x73,
0x65, 0x72, 0x62, 0x75, 0x66, 0x66, 0x12, 0x2b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x6e, 0x67, 0x65, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68,
0x65, 0x72, 0x6f, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x09, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x67, 0x65, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69,
0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x53, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67,
0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67,
0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72,
0x62, 0x75, 0x66, 0x66, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72,
0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 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,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -315,20 +314,20 @@ var file_stonehenge_stonehenge_db_proto_goTypes = []interface{}{
(*DBStonehenge)(nil), // 1: DBStonehenge
nil, // 2: RoomData.EventEntry
nil, // 3: RoomData.GroupEntry
nil, // 4: RoomData.AddweightEntry
nil, // 5: DBStonehenge.UserbuffEntry
nil, // 6: DBStonehenge.HeroEntry
nil, // 7: DBStonehenge.RewardEntry
nil, // 4: DBStonehenge.UserbuffEntry
nil, // 5: DBStonehenge.HeroEntry
nil, // 6: DBStonehenge.RewardEntry
nil, // 7: DBStonehenge.AddweightEntry
(*DBHero)(nil), // 8: DBHero
}
var file_stonehenge_stonehenge_db_proto_depIdxs = []int32{
2, // 0: RoomData.event:type_name -> RoomData.EventEntry
3, // 1: RoomData.group:type_name -> RoomData.GroupEntry
4, // 2: RoomData.addweight:type_name -> RoomData.AddweightEntry
0, // 3: DBStonehenge.rooms:type_name -> RoomData
5, // 4: DBStonehenge.userbuff:type_name -> DBStonehenge.UserbuffEntry
6, // 5: DBStonehenge.hero:type_name -> DBStonehenge.HeroEntry
7, // 6: DBStonehenge.reward:type_name -> DBStonehenge.RewardEntry
0, // 2: DBStonehenge.rooms:type_name -> RoomData
4, // 3: DBStonehenge.userbuff:type_name -> DBStonehenge.UserbuffEntry
5, // 4: DBStonehenge.hero:type_name -> DBStonehenge.HeroEntry
6, // 5: DBStonehenge.reward:type_name -> DBStonehenge.RewardEntry
7, // 6: DBStonehenge.addweight:type_name -> DBStonehenge.AddweightEntry
8, // 7: DBStonehenge.HeroEntry.value:type_name -> DBHero
8, // [8:8] is the sub-list for method output_type
8, // [8:8] is the sub-list for method input_type

View File

@ -105,14 +105,17 @@ func (x *StonehengeGetListResp) GetData() *DBStonehenge {
return nil
}
type StonehengeSelectReq struct {
// 选择英雄
type StonehengeSelectHeroReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hid []string `protobuf:"bytes,1,rep,name=hid,proto3" json:"hid"` // 英雄唯一id
}
func (x *StonehengeSelectReq) Reset() {
*x = StonehengeSelectReq{}
func (x *StonehengeSelectHeroReq) Reset() {
*x = StonehengeSelectHeroReq{}
if protoimpl.UnsafeEnabled {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -120,13 +123,13 @@ func (x *StonehengeSelectReq) Reset() {
}
}
func (x *StonehengeSelectReq) String() string {
func (x *StonehengeSelectHeroReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StonehengeSelectReq) ProtoMessage() {}
func (*StonehengeSelectHeroReq) ProtoMessage() {}
func (x *StonehengeSelectReq) ProtoReflect() protoreflect.Message {
func (x *StonehengeSelectHeroReq) ProtoReflect() protoreflect.Message {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -138,21 +141,28 @@ func (x *StonehengeSelectReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use StonehengeSelectReq.ProtoReflect.Descriptor instead.
func (*StonehengeSelectReq) Descriptor() ([]byte, []int) {
// Deprecated: Use StonehengeSelectHeroReq.ProtoReflect.Descriptor instead.
func (*StonehengeSelectHeroReq) Descriptor() ([]byte, []int) {
return file_stonehenge_stonehenge_msg_proto_rawDescGZIP(), []int{2}
}
type StonehengeSelectResp struct {
func (x *StonehengeSelectHeroReq) GetHid() []string {
if x != nil {
return x.Hid
}
return nil
}
type StonehengeSelectHeroResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBStonehenge `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
Hero map[string]*DBHero `protobuf:"bytes,1,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *StonehengeSelectResp) Reset() {
*x = StonehengeSelectResp{}
func (x *StonehengeSelectHeroResp) Reset() {
*x = StonehengeSelectHeroResp{}
if protoimpl.UnsafeEnabled {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -160,13 +170,13 @@ func (x *StonehengeSelectResp) Reset() {
}
}
func (x *StonehengeSelectResp) String() string {
func (x *StonehengeSelectHeroResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StonehengeSelectResp) ProtoMessage() {}
func (*StonehengeSelectHeroResp) ProtoMessage() {}
func (x *StonehengeSelectResp) ProtoReflect() protoreflect.Message {
func (x *StonehengeSelectHeroResp) ProtoReflect() protoreflect.Message {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -178,14 +188,109 @@ func (x *StonehengeSelectResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use StonehengeSelectResp.ProtoReflect.Descriptor instead.
func (*StonehengeSelectResp) Descriptor() ([]byte, []int) {
// Deprecated: Use StonehengeSelectHeroResp.ProtoReflect.Descriptor instead.
func (*StonehengeSelectHeroResp) Descriptor() ([]byte, []int) {
return file_stonehenge_stonehenge_msg_proto_rawDescGZIP(), []int{3}
}
func (x *StonehengeSelectResp) GetData() *DBStonehenge {
func (x *StonehengeSelectHeroResp) GetHero() map[string]*DBHero {
if x != nil {
return x.Data
return x.Hero
}
return nil
}
// 选择增加权重的buff
type StonehengeSelectBuffReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
BuffType int32 `protobuf:"varint,1,opt,name=buffType,proto3" json:"buffType"`
}
func (x *StonehengeSelectBuffReq) Reset() {
*x = StonehengeSelectBuffReq{}
if protoimpl.UnsafeEnabled {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StonehengeSelectBuffReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StonehengeSelectBuffReq) ProtoMessage() {}
func (x *StonehengeSelectBuffReq) ProtoReflect() protoreflect.Message {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[4]
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 StonehengeSelectBuffReq.ProtoReflect.Descriptor instead.
func (*StonehengeSelectBuffReq) Descriptor() ([]byte, []int) {
return file_stonehenge_stonehenge_msg_proto_rawDescGZIP(), []int{4}
}
func (x *StonehengeSelectBuffReq) GetBuffType() int32 {
if x != nil {
return x.BuffType
}
return 0
}
type StonehengeSelectBuffResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Addweight map[int32]int32 `protobuf:"bytes,1,rep,name=addweight,proto3" json:"addweight" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 选择buff权重增加 key 类型
}
func (x *StonehengeSelectBuffResp) Reset() {
*x = StonehengeSelectBuffResp{}
if protoimpl.UnsafeEnabled {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StonehengeSelectBuffResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StonehengeSelectBuffResp) ProtoMessage() {}
func (x *StonehengeSelectBuffResp) ProtoReflect() protoreflect.Message {
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[5]
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 StonehengeSelectBuffResp.ProtoReflect.Descriptor instead.
func (*StonehengeSelectBuffResp) Descriptor() ([]byte, []int) {
return file_stonehenge_stonehenge_msg_proto_rawDescGZIP(), []int{5}
}
func (x *StonehengeSelectBuffResp) GetAddweight() map[int32]int32 {
if x != nil {
return x.Addweight
}
return nil
}
@ -197,18 +302,40 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1e, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x2f, 0x73, 0x74,
0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47,
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x15, 0x53, 0x74, 0x6f,
0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x6e, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, 0x14,
0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74,
0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67,
0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a,
0x15, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x6e, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2b, 0x0a, 0x17, 0x53, 0x74, 0x6f,
0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x65, 0x72,
0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28,
0x09, 0x52, 0x03, 0x68, 0x69, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65,
0x68, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x65, 0x72, 0x6f, 0x52,
0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x23, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x65,
0x6c, 0x65, 0x63, 0x74, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, 0x65, 0x72,
0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x1a, 0x40, 0x0a, 0x09,
0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48,
0x65, 0x72, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x35,
0x0a, 0x17, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65,
0x63, 0x74, 0x42, 0x75, 0x66, 0x66, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x66,
0x66, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x75, 0x66,
0x66, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68,
0x65, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x75, 0x66, 0x66, 0x52, 0x65,
0x73, 0x70, 0x12, 0x46, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x42, 0x75, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70,
0x2e, 0x41, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x09, 0x61, 0x64, 0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x64,
0x64, 0x77, 0x65, 0x69, 0x67, 0x68, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -223,22 +350,29 @@ func file_stonehenge_stonehenge_msg_proto_rawDescGZIP() []byte {
return file_stonehenge_stonehenge_msg_proto_rawDescData
}
var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
(*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq
(*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp
(*StonehengeSelectReq)(nil), // 2: StonehengeSelectReq
(*StonehengeSelectResp)(nil), // 3: StonehengeSelectResp
(*DBStonehenge)(nil), // 4: DBStonehenge
(*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq
(*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp
(*StonehengeSelectHeroReq)(nil), // 2: StonehengeSelectHeroReq
(*StonehengeSelectHeroResp)(nil), // 3: StonehengeSelectHeroResp
(*StonehengeSelectBuffReq)(nil), // 4: StonehengeSelectBuffReq
(*StonehengeSelectBuffResp)(nil), // 5: StonehengeSelectBuffResp
nil, // 6: StonehengeSelectHeroResp.HeroEntry
nil, // 7: StonehengeSelectBuffResp.AddweightEntry
(*DBStonehenge)(nil), // 8: DBStonehenge
(*DBHero)(nil), // 9: DBHero
}
var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{
4, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge
4, // 1: StonehengeSelectResp.data:type_name -> DBStonehenge
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
8, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge
6, // 1: StonehengeSelectHeroResp.hero:type_name -> StonehengeSelectHeroResp.HeroEntry
7, // 2: StonehengeSelectBuffResp.addweight:type_name -> StonehengeSelectBuffResp.AddweightEntry
9, // 3: StonehengeSelectHeroResp.HeroEntry.value:type_name -> DBHero
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_stonehenge_stonehenge_msg_proto_init() }
@ -247,6 +381,7 @@ func file_stonehenge_stonehenge_msg_proto_init() {
return
}
file_stonehenge_stonehenge_db_proto_init()
file_hero_hero_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_stonehenge_stonehenge_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StonehengeGetListReq); i {
@ -273,7 +408,7 @@ func file_stonehenge_stonehenge_msg_proto_init() {
}
}
file_stonehenge_stonehenge_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StonehengeSelectReq); i {
switch v := v.(*StonehengeSelectHeroReq); i {
case 0:
return &v.state
case 1:
@ -285,7 +420,31 @@ func file_stonehenge_stonehenge_msg_proto_init() {
}
}
file_stonehenge_stonehenge_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StonehengeSelectResp); i {
switch v := v.(*StonehengeSelectHeroResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stonehenge_stonehenge_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StonehengeSelectBuffReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_stonehenge_stonehenge_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StonehengeSelectBuffResp); i {
case 0:
return &v.state
case 1:
@ -303,7 +462,7 @@ func file_stonehenge_stonehenge_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},