上传月之秘境模块
This commit is contained in:
parent
a875f850ba
commit
e94540662b
38
bin/json/game_dreamlandboos.json
Normal file
38
bin/json/game_dreamlandboos.json
Normal file
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"bossid": 25001,
|
||||
"star": 5,
|
||||
"pro": 30,
|
||||
"fightnum": 5,
|
||||
"challengenum": 40,
|
||||
"prize": 1001,
|
||||
"monsterid": [
|
||||
250011,
|
||||
340061,
|
||||
440051,
|
||||
240031,
|
||||
350021
|
||||
],
|
||||
"monsterhp": 1,
|
||||
"monsteratk": 1.2,
|
||||
"monsterdef": 1.1
|
||||
},
|
||||
{
|
||||
"bossid": 11003,
|
||||
"star": 5,
|
||||
"pro": 30,
|
||||
"fightnum": 5,
|
||||
"challengenum": 30,
|
||||
"prize": 1002,
|
||||
"monsterid": [
|
||||
250011,
|
||||
340061,
|
||||
440051,
|
||||
240031,
|
||||
350021
|
||||
],
|
||||
"monsterhp": 1,
|
||||
"monsteratk": 1.2,
|
||||
"monsterdef": 1.1
|
||||
}
|
||||
]
|
@ -142,6 +142,7 @@
|
||||
"dreamland_resettime": 0,
|
||||
"dreamland_limit": 3600,
|
||||
"dreamland_pro": 100,
|
||||
"dreamland_triggernum": 20,
|
||||
"hunting_num": 10,
|
||||
"hunting_reset": 1
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ const (
|
||||
ModuleSmithy core.M_Modules = "smithy" //铁匠铺
|
||||
ModuleTimer core.M_Modules = "timer" //定时任务模块
|
||||
ModuleViking core.M_Modules = "viking" //维京远征
|
||||
ModuleMoonfantasy core.M_Modules = "moonfantasy" //月之秘境模块
|
||||
)
|
||||
|
||||
//数据表名定义处
|
||||
@ -116,6 +117,9 @@ const (
|
||||
TableViking = "viking"
|
||||
// 维京远征排行榜
|
||||
TableVikingRank = "vikingrank"
|
||||
|
||||
//月之秘境
|
||||
TableMoonfantasy = "moonfantasy"
|
||||
)
|
||||
|
||||
//RPC服务接口定义处
|
||||
|
29
modules/moonfantasy/api.go
Normal file
29
modules/moonfantasy/api.go
Normal file
@ -0,0 +1,29 @@
|
||||
package moonfantasy
|
||||
|
||||
import (
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go_dreamfactory/lego/core"
|
||||
)
|
||||
|
||||
/*
|
||||
装备模块 API
|
||||
*/
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service core.IService
|
||||
module *Moonfantasy
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
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.(*Moonfantasy)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
return
|
||||
}
|
24
modules/moonfantasy/api_dare.go
Normal file
24
modules/moonfantasy/api_dare.go
Normal file
@ -0,0 +1,24 @@
|
||||
package moonfantasy
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) DareCheck(session comm.IUserSession, req *pb.MoonfantasyDareReq) (code pb.ErrorCode) {
|
||||
return
|
||||
}
|
||||
|
||||
///获取本服聊天消息记录
|
||||
func (this *apiComp) Dare(session comm.IUserSession, req *pb.MoonfantasyDareReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var ()
|
||||
if code = this.DareCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "dare", &pb.MoonfantasyDareResp{})
|
||||
return
|
||||
}
|
24
modules/moonfantasy/api_trigger.go
Normal file
24
modules/moonfantasy/api_trigger.go
Normal file
@ -0,0 +1,24 @@
|
||||
package moonfantasy
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) TriggerCheck(session comm.IUserSession, req *pb.MoonfantasyTriggerReq) (code pb.ErrorCode) {
|
||||
return
|
||||
}
|
||||
|
||||
///获取本服聊天消息记录
|
||||
func (this *apiComp) Trigger(session comm.IUserSession, req *pb.MoonfantasyTriggerReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var ()
|
||||
if code = this.TriggerCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "trigger", &pb.MoonfantasyTriggerResp{})
|
||||
return
|
||||
}
|
23
modules/moonfantasy/configure.go
Normal file
23
modules/moonfantasy/configure.go
Normal file
@ -0,0 +1,23 @@
|
||||
package moonfantasy
|
||||
|
||||
import (
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go_dreamfactory/lego/core"
|
||||
)
|
||||
|
||||
const (
|
||||
game_dreamlandboos = "game_dreamlandboos.json"
|
||||
)
|
||||
|
||||
///背包配置管理组件
|
||||
type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.ModuleCompBase.Init(service, module, comp, options)
|
||||
|
||||
return
|
||||
}
|
28
modules/moonfantasy/modelDream.go
Normal file
28
modules/moonfantasy/modelDream.go
Normal file
@ -0,0 +1,28 @@
|
||||
package moonfantasy
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
///论坛 数据组件
|
||||
type modelDreamComp struct {
|
||||
modules.MCompModel
|
||||
module *Moonfantasy
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *modelDreamComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) {
|
||||
this.MCompModel.Init(service, module, comp, opt)
|
||||
this.module = module.(*Moonfantasy)
|
||||
this.TableName = comm.TableMoonfantasy
|
||||
//创建uid索引
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "heroid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
43
modules/moonfantasy/module.go
Normal file
43
modules/moonfantasy/module.go
Normal file
@ -0,0 +1,43 @@
|
||||
package moonfantasy
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
/*
|
||||
模块名:月子秘境
|
||||
描述:随机世界副本
|
||||
开发:李伟
|
||||
*/
|
||||
func NewModule() core.IModule {
|
||||
m := new(Moonfantasy)
|
||||
return m
|
||||
}
|
||||
|
||||
type Moonfantasy struct {
|
||||
modules.ModuleBase
|
||||
api_comp *apiComp
|
||||
configure *configureComp
|
||||
modelDream *modelDreamComp
|
||||
}
|
||||
|
||||
//模块名
|
||||
func (this *Moonfantasy) GetType() core.M_Modules {
|
||||
return comm.ModuleMoonfantasy
|
||||
}
|
||||
|
||||
//模块初始化接口 注册用户创建角色事件
|
||||
func (this *Moonfantasy) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
return
|
||||
}
|
||||
|
||||
//装备组件
|
||||
func (this *Moonfantasy) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.modelDream = this.RegisterComp(new(modelDreamComp)).(*modelDreamComp)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
69
modules/moonfantasy/module_test.go
Normal file
69
modules/moonfantasy/module_test.go
Normal file
@ -0,0 +1,69 @@
|
||||
package moonfantasy_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/forum"
|
||||
"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(forum.Forum)
|
||||
|
||||
//测试环境下初始化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,
|
||||
)
|
||||
}()
|
||||
time.Sleep(time.Second * 3)
|
||||
defer os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func Test_Module(t *testing.T) {
|
||||
|
||||
}
|
171
pb/chat_db.pb.go
171
pb/chat_db.pb.go
@ -75,6 +75,53 @@ func (ChatChannel) EnumDescriptor() ([]byte, []int) {
|
||||
return file_chat_chat_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
//聊天消息类型
|
||||
type ChatType int32
|
||||
|
||||
const (
|
||||
ChatType_Text ChatType = 0 //文泵聊天消息
|
||||
ChatType_Moonfantasy ChatType = 1 //月子秘境消息
|
||||
)
|
||||
|
||||
// Enum value maps for ChatType.
|
||||
var (
|
||||
ChatType_name = map[int32]string{
|
||||
0: "Text",
|
||||
1: "Moonfantasy",
|
||||
}
|
||||
ChatType_value = map[string]int32{
|
||||
"Text": 0,
|
||||
"Moonfantasy": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ChatType) Enum() *ChatType {
|
||||
p := new(ChatType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ChatType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ChatType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_chat_chat_db_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (ChatType) Type() protoreflect.EnumType {
|
||||
return &file_chat_chat_db_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x ChatType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChatType.Descriptor instead.
|
||||
func (ChatType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_chat_chat_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type DBChat struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -82,16 +129,20 @@ type DBChat struct {
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Channel ChatChannel `protobuf:"varint,2,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
|
||||
Suid string `protobuf:"bytes,3,opt,name=suid,proto3" json:"suid"` //发送用户id
|
||||
Slv int32 `protobuf:"varint,4,opt,name=slv,proto3" json:"slv"` //发送者等级
|
||||
Ruid string `protobuf:"bytes,5,opt,name=ruid,proto3" json:"ruid"` //接收用户id channel == Private 有效
|
||||
ChannelId int32 `protobuf:"varint,6,opt,name=channelId,proto3" json:"channelId"` //跨服频道 频道Id
|
||||
UnionId string `protobuf:"bytes,7,opt,name=unionId,proto3" json:"unionId"` //工会id
|
||||
Stag string `protobuf:"bytes,8,opt,name=stag,proto3" json:"stag"` //区服id
|
||||
Avatar string `protobuf:"bytes,9,opt,name=avatar,proto3" json:"avatar"` //用户头像
|
||||
Uname string `protobuf:"bytes,10,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
Content string `protobuf:"bytes,11,opt,name=content,proto3" json:"content"` //内容
|
||||
Ctime int64 `protobuf:"varint,12,opt,name=ctime,proto3" json:"ctime"` //创建时间
|
||||
Ctype ChatType `protobuf:"varint,3,opt,name=ctype,proto3,enum=ChatType" json:"ctype"` //消息类型
|
||||
Suid string `protobuf:"bytes,4,opt,name=suid,proto3" json:"suid"` //发送用户id
|
||||
Slv int32 `protobuf:"varint,5,opt,name=slv,proto3" json:"slv"` //发送者等级
|
||||
Ruid string `protobuf:"bytes,6,opt,name=ruid,proto3" json:"ruid"` //接收用户id channel == Private 有效
|
||||
ChannelId int32 `protobuf:"varint,7,opt,name=channelId,proto3" json:"channelId"` //跨服频道 频道Id
|
||||
UnionId string `protobuf:"bytes,8,opt,name=unionId,proto3" json:"unionId"` //工会id
|
||||
Stag string `protobuf:"bytes,9,opt,name=stag,proto3" json:"stag"` //区服id
|
||||
Avatar string `protobuf:"bytes,10,opt,name=avatar,proto3" json:"avatar"` //用户头像
|
||||
Uname string `protobuf:"bytes,11,opt,name=uname,proto3" json:"uname"` //用户名
|
||||
Content string `protobuf:"bytes,12,opt,name=content,proto3" json:"content"` //内容
|
||||
Ctime int64 `protobuf:"varint,13,opt,name=ctime,proto3" json:"ctime"` //创建时间
|
||||
AppendInt int64 `protobuf:"varint,14,opt,name=appendInt,proto3" json:"appendInt" bson:"appendInt"` //聊天附加数据
|
||||
AppendStr string `protobuf:"bytes,15,opt,name=appendStr,proto3" json:"appendStr" bson:"appendStr"` //聊天附加数据
|
||||
AppendBool string `protobuf:"bytes,16,opt,name=appendBool,proto3" json:"appendBool" bson:"appendBool"` //聊天附加数据
|
||||
}
|
||||
|
||||
func (x *DBChat) Reset() {
|
||||
@ -140,6 +191,13 @@ func (x *DBChat) GetChannel() ChatChannel {
|
||||
return ChatChannel_World
|
||||
}
|
||||
|
||||
func (x *DBChat) GetCtype() ChatType {
|
||||
if x != nil {
|
||||
return x.Ctype
|
||||
}
|
||||
return ChatType_Text
|
||||
}
|
||||
|
||||
func (x *DBChat) GetSuid() string {
|
||||
if x != nil {
|
||||
return x.Suid
|
||||
@ -210,35 +268,66 @@ func (x *DBChat) GetCtime() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBChat) GetAppendInt() int64 {
|
||||
if x != nil {
|
||||
return x.AppendInt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBChat) GetAppendStr() string {
|
||||
if x != nil {
|
||||
return x.AppendStr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBChat) GetAppendBool() string {
|
||||
if x != nil {
|
||||
return x.AppendBool
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_chat_chat_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_chat_chat_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x12,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x03, 0x0a, 0x06, 0x44, 0x42, 0x43, 0x68, 0x61, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x26, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0c, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x07,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73,
|
||||
0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x6c, 0x76, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x72, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, 0x69,
|
||||
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61,
|
||||
0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x61, 0x67, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61,
|
||||
0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x4d, 0x0a, 0x0b, 0x43,
|
||||
0x68, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x6f,
|
||||
0x72, 0x6c, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a,
|
||||
0x0b, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a,
|
||||
0x0a, 0x06, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x54, 0x79, 0x70,
|
||||
0x65, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x75, 0x69, 0x64,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x73, 0x6c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x6c, 0x76, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x72, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75,
|
||||
0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74,
|
||||
0x61, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x61, 0x67, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70,
|
||||
0x70, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61,
|
||||
0x70, 0x70, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65,
|
||||
0x6e, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70,
|
||||
0x70, 0x65, 0x6e, 0x64, 0x42, 0x6f, 0x6f, 0x6c, 0x2a, 0x4d, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74,
|
||||
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x6f, 0x72, 0x6c, 0x64,
|
||||
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72,
|
||||
0x6f, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x04, 0x2a, 0x25, 0x0a, 0x08, 0x43, 0x68, 0x61, 0x74, 0x54,
|
||||
0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x0f, 0x0a,
|
||||
0x0b, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x01, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -253,19 +342,21 @@ func file_chat_chat_db_proto_rawDescGZIP() []byte {
|
||||
return file_chat_chat_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_chat_chat_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_chat_chat_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_chat_chat_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_chat_chat_db_proto_goTypes = []interface{}{
|
||||
(ChatChannel)(0), // 0: ChatChannel
|
||||
(*DBChat)(nil), // 1: DBChat
|
||||
(ChatType)(0), // 1: ChatType
|
||||
(*DBChat)(nil), // 2: DBChat
|
||||
}
|
||||
var file_chat_chat_db_proto_depIdxs = []int32{
|
||||
0, // 0: DBChat.channel:type_name -> ChatChannel
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
1, // 1: DBChat.ctype:type_name -> ChatType
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_chat_chat_db_proto_init() }
|
||||
@ -292,7 +383,7 @@ func file_chat_chat_db_proto_init() {
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_chat_chat_db_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumEnums: 2,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
|
170
pb/moonfantasy_db.pb.go
Normal file
170
pb/moonfantasy_db.pb.go
Normal file
@ -0,0 +1,170 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: moonfantasy/moonfantasy_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 DBMoonfantasy struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Monster int32 `protobuf:"varint,2,opt,name=monster,proto3" json:"monster"` //怪物id
|
||||
Ctime int64 `protobuf:"varint,3,opt,name=ctime,proto3" json:"ctime"` //创建时间
|
||||
Joinnum int32 `protobuf:"varint,4,opt,name=joinnum,proto3" json:"joinnum"` //参与人数
|
||||
}
|
||||
|
||||
func (x *DBMoonfantasy) Reset() {
|
||||
*x = DBMoonfantasy{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_moonfantasy_moonfantasy_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBMoonfantasy) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBMoonfantasy) ProtoMessage() {}
|
||||
|
||||
func (x *DBMoonfantasy) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_moonfantasy_moonfantasy_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 DBMoonfantasy.ProtoReflect.Descriptor instead.
|
||||
func (*DBMoonfantasy) Descriptor() ([]byte, []int) {
|
||||
return file_moonfantasy_moonfantasy_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBMoonfantasy) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBMoonfantasy) GetMonster() int32 {
|
||||
if x != nil {
|
||||
return x.Monster
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBMoonfantasy) GetCtime() int64 {
|
||||
if x != nil {
|
||||
return x.Ctime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBMoonfantasy) GetJoinnum() int32 {
|
||||
if x != nil {
|
||||
return x.Joinnum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_moonfantasy_moonfantasy_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_moonfantasy_moonfantasy_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x20, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x2f, 0x6d, 0x6f,
|
||||
0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0x69, 0x0a, 0x0d, 0x44, 0x42, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74,
|
||||
0x61, 0x73, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6a, 0x6f, 0x69, 0x6e, 0x6e, 0x75, 0x6d, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6a, 0x6f, 0x69, 0x6e, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_moonfantasy_moonfantasy_db_proto_rawDescOnce sync.Once
|
||||
file_moonfantasy_moonfantasy_db_proto_rawDescData = file_moonfantasy_moonfantasy_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_moonfantasy_moonfantasy_db_proto_rawDescGZIP() []byte {
|
||||
file_moonfantasy_moonfantasy_db_proto_rawDescOnce.Do(func() {
|
||||
file_moonfantasy_moonfantasy_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_moonfantasy_moonfantasy_db_proto_rawDescData)
|
||||
})
|
||||
return file_moonfantasy_moonfantasy_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_moonfantasy_moonfantasy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_moonfantasy_moonfantasy_db_proto_goTypes = []interface{}{
|
||||
(*DBMoonfantasy)(nil), // 0: DBMoonfantasy
|
||||
}
|
||||
var file_moonfantasy_moonfantasy_db_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_moonfantasy_moonfantasy_db_proto_init() }
|
||||
func file_moonfantasy_moonfantasy_db_proto_init() {
|
||||
if File_moonfantasy_moonfantasy_db_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_moonfantasy_moonfantasy_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBMoonfantasy); 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_moonfantasy_moonfantasy_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_moonfantasy_moonfantasy_db_proto_goTypes,
|
||||
DependencyIndexes: file_moonfantasy_moonfantasy_db_proto_depIdxs,
|
||||
MessageInfos: file_moonfantasy_moonfantasy_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_moonfantasy_moonfantasy_db_proto = out.File
|
||||
file_moonfantasy_moonfantasy_db_proto_rawDesc = nil
|
||||
file_moonfantasy_moonfantasy_db_proto_goTypes = nil
|
||||
file_moonfantasy_moonfantasy_db_proto_depIdxs = nil
|
||||
}
|
343
pb/moonfantasy_msg.pb.go
Normal file
343
pb/moonfantasy_msg.pb.go
Normal file
@ -0,0 +1,343 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: moonfantasy/moonfantasy_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 MoonfantasyTriggerReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerReq) Reset() {
|
||||
*x = MoonfantasyTriggerReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_moonfantasy_moonfantasy_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MoonfantasyTriggerReq) ProtoMessage() {}
|
||||
|
||||
func (x *MoonfantasyTriggerReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_moonfantasy_moonfantasy_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 MoonfantasyTriggerReq.ProtoReflect.Descriptor instead.
|
||||
func (*MoonfantasyTriggerReq) Descriptor() ([]byte, []int) {
|
||||
return file_moonfantasy_moonfantasy_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
///触发秘境
|
||||
type MoonfantasyTriggerResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` //是否成功
|
||||
Mid string `protobuf:"bytes,2,opt,name=mid,proto3" json:"mid"` //唯一id //挑战时需要传递的数据
|
||||
Monster int32 `protobuf:"varint,3,opt,name=monster,proto3" json:"monster"` //怪物id
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerResp) Reset() {
|
||||
*x = MoonfantasyTriggerResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_moonfantasy_moonfantasy_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MoonfantasyTriggerResp) ProtoMessage() {}
|
||||
|
||||
func (x *MoonfantasyTriggerResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_moonfantasy_moonfantasy_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 MoonfantasyTriggerResp.ProtoReflect.Descriptor instead.
|
||||
func (*MoonfantasyTriggerResp) Descriptor() ([]byte, []int) {
|
||||
return file_moonfantasy_moonfantasy_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerResp) GetIssucc() bool {
|
||||
if x != nil {
|
||||
return x.Issucc
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerResp) GetMid() string {
|
||||
if x != nil {
|
||||
return x.Mid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MoonfantasyTriggerResp) GetMonster() int32 {
|
||||
if x != nil {
|
||||
return x.Monster
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
///挑战秘境
|
||||
type MoonfantasyDareReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Mid string `protobuf:"bytes,1,opt,name=mid,proto3" json:"mid"` //唯一id
|
||||
}
|
||||
|
||||
func (x *MoonfantasyDareReq) Reset() {
|
||||
*x = MoonfantasyDareReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_moonfantasy_moonfantasy_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyDareReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MoonfantasyDareReq) ProtoMessage() {}
|
||||
|
||||
func (x *MoonfantasyDareReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_moonfantasy_moonfantasy_msg_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MoonfantasyDareReq.ProtoReflect.Descriptor instead.
|
||||
func (*MoonfantasyDareReq) Descriptor() ([]byte, []int) {
|
||||
return file_moonfantasy_moonfantasy_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyDareReq) GetMid() string {
|
||||
if x != nil {
|
||||
return x.Mid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MoonfantasyDareResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` //是否成功
|
||||
}
|
||||
|
||||
func (x *MoonfantasyDareResp) Reset() {
|
||||
*x = MoonfantasyDareResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_moonfantasy_moonfantasy_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyDareResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MoonfantasyDareResp) ProtoMessage() {}
|
||||
|
||||
func (x *MoonfantasyDareResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_moonfantasy_moonfantasy_msg_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 MoonfantasyDareResp.ProtoReflect.Descriptor instead.
|
||||
func (*MoonfantasyDareResp) Descriptor() ([]byte, []int) {
|
||||
return file_moonfantasy_moonfantasy_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *MoonfantasyDareResp) GetIssucc() bool {
|
||||
if x != nil {
|
||||
return x.Issucc
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_moonfantasy_moonfantasy_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_moonfantasy_moonfantasy_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x21, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x2f, 0x6d, 0x6f,
|
||||
0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61,
|
||||
0x73, 0x79, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x5c, 0x0a, 0x16,
|
||||
0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x54, 0x72, 0x69, 0x67, 0x67,
|
||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6d, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x69, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x22, 0x26, 0x0a, 0x12, 0x4d, 0x6f,
|
||||
0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x44, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d,
|
||||
0x69, 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x4d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73,
|
||||
0x79, 0x44, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73,
|
||||
0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63,
|
||||
0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_moonfantasy_moonfantasy_msg_proto_rawDescOnce sync.Once
|
||||
file_moonfantasy_moonfantasy_msg_proto_rawDescData = file_moonfantasy_moonfantasy_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_moonfantasy_moonfantasy_msg_proto_rawDescGZIP() []byte {
|
||||
file_moonfantasy_moonfantasy_msg_proto_rawDescOnce.Do(func() {
|
||||
file_moonfantasy_moonfantasy_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_moonfantasy_moonfantasy_msg_proto_rawDescData)
|
||||
})
|
||||
return file_moonfantasy_moonfantasy_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_moonfantasy_moonfantasy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_moonfantasy_moonfantasy_msg_proto_goTypes = []interface{}{
|
||||
(*MoonfantasyTriggerReq)(nil), // 0: MoonfantasyTriggerReq
|
||||
(*MoonfantasyTriggerResp)(nil), // 1: MoonfantasyTriggerResp
|
||||
(*MoonfantasyDareReq)(nil), // 2: MoonfantasyDareReq
|
||||
(*MoonfantasyDareResp)(nil), // 3: MoonfantasyDareResp
|
||||
}
|
||||
var file_moonfantasy_moonfantasy_msg_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_moonfantasy_moonfantasy_msg_proto_init() }
|
||||
func file_moonfantasy_moonfantasy_msg_proto_init() {
|
||||
if File_moonfantasy_moonfantasy_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_moonfantasy_moonfantasy_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MoonfantasyTriggerReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_moonfantasy_moonfantasy_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MoonfantasyTriggerResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_moonfantasy_moonfantasy_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MoonfantasyDareReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_moonfantasy_moonfantasy_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MoonfantasyDareResp); 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_moonfantasy_moonfantasy_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_moonfantasy_moonfantasy_msg_proto_goTypes,
|
||||
DependencyIndexes: file_moonfantasy_moonfantasy_msg_proto_depIdxs,
|
||||
MessageInfos: file_moonfantasy_moonfantasy_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_moonfantasy_moonfantasy_msg_proto = out.File
|
||||
file_moonfantasy_moonfantasy_msg_proto_rawDesc = nil
|
||||
file_moonfantasy_moonfantasy_msg_proto_goTypes = nil
|
||||
file_moonfantasy_moonfantasy_msg_proto_depIdxs = nil
|
||||
}
|
42
sys/configure/structs/Game.DreamlandBoos.go
Normal file
42
sys/configure/structs/Game.DreamlandBoos.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GameDreamlandBoos struct {
|
||||
_dataMap map[int32]*GameDreamlandBoosData
|
||||
_dataList []*GameDreamlandBoosData
|
||||
}
|
||||
|
||||
func NewGameDreamlandBoos(_buf []map[string]interface{}) (*GameDreamlandBoos, error) {
|
||||
_dataList := make([]*GameDreamlandBoosData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameDreamlandBoosData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameDreamlandBoosData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Bossid] = _v
|
||||
}
|
||||
}
|
||||
return &GameDreamlandBoos{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameDreamlandBoos) GetDataMap() map[int32]*GameDreamlandBoosData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameDreamlandBoos) GetDataList() []*GameDreamlandBoosData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameDreamlandBoos) Get(key int32) *GameDreamlandBoosData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
66
sys/configure/structs/Game.DreamlandBoosData.go
Normal file
66
sys/configure/structs/Game.DreamlandBoosData.go
Normal file
@ -0,0 +1,66 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type GameDreamlandBoosData struct {
|
||||
Bossid int32
|
||||
Star int32
|
||||
Pro int32
|
||||
Fightnum int32
|
||||
Challengenum int32
|
||||
Prize int32
|
||||
Monsterid []int32
|
||||
Monsterhp float32
|
||||
Monsteratk float32
|
||||
Monsterdef float32
|
||||
}
|
||||
|
||||
const TypeId_GameDreamlandBoosData = -1451313715
|
||||
|
||||
func (*GameDreamlandBoosData) GetTypeId() int32 {
|
||||
return -1451313715
|
||||
}
|
||||
|
||||
func (_v *GameDreamlandBoosData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bossid"].(float64); !_ok_ { err = errors.New("bossid error"); return }; _v.Bossid = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pro"].(float64); !_ok_ { err = errors.New("pro error"); return }; _v.Pro = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fightnum"].(float64); !_ok_ { err = errors.New("fightnum error"); return }; _v.Fightnum = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["challengenum"].(float64); !_ok_ { err = errors.New("challengenum error"); return }; _v.Challengenum = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["prize"].(float64); !_ok_ { err = errors.New("prize error"); return }; _v.Prize = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["monsterid"].([]interface{}); !_ok_ { err = errors.New("monsterid error"); return }
|
||||
|
||||
_v.Monsterid = make([]int32, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ int32
|
||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||
_v.Monsterid = append(_v.Monsterid, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["monsterhp"].(float64); !_ok_ { err = errors.New("monsterhp error"); return }; _v.Monsterhp = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["monsteratk"].(float64); !_ok_ { err = errors.New("monsteratk error"); return }; _v.Monsteratk = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["monsterdef"].(float64); !_ok_ { err = errors.New("monsterdef error"); return }; _v.Monsterdef = float32(_tempNum_) }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameDreamlandBoosData(_buf map[string]interface{}) (*GameDreamlandBoosData, error) {
|
||||
v := &GameDreamlandBoosData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -77,6 +77,7 @@ type GameGlobalData struct {
|
||||
DreamlandResettime int32
|
||||
DreamlandLimit int32
|
||||
DreamlandPro int32
|
||||
DreamlandTriggernum int32
|
||||
HuntingNum int32
|
||||
HuntingReset int32
|
||||
}
|
||||
@ -219,6 +220,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_resettime"].(float64); !_ok_ { err = errors.New("dreamland_resettime error"); return }; _v.DreamlandResettime = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_limit"].(float64); !_ok_ { err = errors.New("dreamland_limit error"); return }; _v.DreamlandLimit = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_pro"].(float64); !_ok_ { err = errors.New("dreamland_pro error"); return }; _v.DreamlandPro = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_triggernum"].(float64); !_ok_ { err = errors.New("dreamland_triggernum error"); return }; _v.DreamlandTriggernum = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hunting_num"].(float64); !_ok_ { err = errors.New("hunting_num error"); return }; _v.HuntingNum = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hunting_reset"].(float64); !_ok_ { err = errors.New("hunting_reset error"); return }; _v.HuntingReset = int32(_tempNum_) }
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user