主线章节 字段变更

This commit is contained in:
meixiongfeng 2022-07-18 16:51:26 +08:00
parent 93df38efd2
commit ac8e54f599
14 changed files with 98 additions and 792 deletions

View File

@ -463,7 +463,7 @@ func (r *Robot) onUserLoaded() {
r.RunTask()
// story
r.RunStory()
r.RunMainline()
}
type RobotFormatter struct {

View File

@ -13,12 +13,12 @@ var (
storyBuilders = []*TestCase{
{
desc: "主线数据",
mainType: string(comm.ModuleStory),
subType: story.StoryGetListResp,
req: &pb.StoryGetListReq{},
rsp: &pb.StoryGetListResp{},
mainType: string(comm.ModuleMainline),
subType: story.MainlineGetListResp,
req: &pb.MainlineGetListReq{},
rsp: &pb.MainlineGetListResp{},
print: func(rsp proto.Message) {
out := rsp.(*pb.StoryGetListResp)
out := rsp.(*pb.MainlineGetListResp)
for i, v := range out.Data {
fmt.Printf("%d- %v\n", (i + 1), v)
}
@ -26,19 +26,19 @@ var (
//enabled: true,
}, {
desc: "主线详情",
mainType: string(comm.ModuleStory),
subType: story.StoryChallengeResp,
req: &pb.StoryChallengeReq{
ChapterId: 1,
StoryId: 1,
mainType: string(comm.ModuleMainline),
subType: story.MainlineChallengeResp,
req: &pb.MainlineChallengeReq{
ChapterId: 1,
MainlineId: 1,
},
rsp: &pb.StoryChallengeResp{},
rsp: &pb.MainlineChallengeResp{},
// enabled: true,
},
}
)
//声明加入到构建器并发起请求
func (r *Robot) RunStory() {
func (r *Robot) RunMainline() {
r.addBuilders(storyBuilders)
}

View File

@ -41,7 +41,7 @@ const (
ModuleItems core.M_Modules = "items" //道具模块
ModuleShop core.M_Modules = "shop" //商店模块
ModuleTask core.M_Modules = "task" //任务模块
ModuleStory core.M_Modules = "story" //主线模块
ModuleMainline core.M_Modules = "mainline" //主线模块
ModuleNotify core.M_Modules = "notify" //公告模块
)

View File

@ -67,9 +67,9 @@ type (
//添加新武器
AddNewEquipments(source *ModuleCallSource, uid string, cIds map[int32]uint32, bPush bool) (code pb.ErrorCode)
}
IStory interface {
IMainline interface {
// 修改章节信息
ModifyStoryData(uid string, objId string, data interface{}) (code pb.ErrorCode)
ModifyMainlineData(uid string, objId string, data interface{}) (code pb.ErrorCode)
// 检查能不能挑战该关卡
CheckChallengeChapter(stroyId int32, uid string, zhangjieID int32) (code pb.ErrorCode)
}

View File

@ -8,27 +8,27 @@ import (
)
//参数校验
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.StoryGetListReq) (code pb.ErrorCode) {
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode) {
return
}
///获取主线关卡信息
func (this *apiComp) GetList(session comm.IUserSession, req *pb.StoryGetListReq) (code pb.ErrorCode, data proto.Message) {
rsp := &pb.StoryGetListResp{}
func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode, data proto.Message) {
rsp := &pb.MainlineGetListResp{}
code = this.GetListCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
list, err := this.module.modelStory.getStoryList(session.GetUserId())
list, err := this.module.modelMainline.getMainlineList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
rsp.Data = list
session.SendMsg(string(this.module.GetType()), StoryGetListResp, &pb.StoryGetListResp{Data: rsp.Data})
session.SendMsg(string(this.module.GetType()), MainlineGetListResp, &pb.MainlineGetListResp{Data: rsp.Data})
return
}

View File

@ -7,35 +7,35 @@ import (
)
const ( //Redis
TableStory core.SqlTable = "story"
TableMainline core.SqlTable = "story"
)
type ModelStory struct {
type ModelMainline struct {
modules.MCompModel
module *Story
module *Mainline
}
func (this *ModelStory) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
func (this *ModelMainline) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*Story)
this.TableName = string(TableStory)
this.module = module.(*Mainline)
this.TableName = string(TableMainline)
return
}
// 获取章节信息
func (this *ModelStory) getStoryList(uid string) (storys []*pb.DBStory, err error) {
storys = make([]*pb.DBStory, 0)
func (this *ModelMainline) getMainlineList(uid string) (storys []*pb.DBMainline, err error) {
storys = make([]*pb.DBMainline, 0)
err = this.GetList(uid, &storys)
return
}
// 修改章节信息
func (this *ModelStory) modifyStoryData(uid string, objid string, data map[string]interface{}) error {
return this.module.modelStory.ChangeList(uid, objid, data)
func (this *ModelMainline) modifyMainlineData(uid string, objid string, data map[string]interface{}) error {
return this.module.modelMainline.ChangeList(uid, objid, data)
}
// 增加新的章节数据
func (this *ModelStory) addNewChapter(uId string, data map[string]interface{}) (err error) {
func (this *ModelMainline) addNewChapter(uId string, data map[string]interface{}) (err error) {
if err = this.AddLists(uId, data); err != nil {
this.module.Errorf("err:%v", err)

View File

@ -92,9 +92,9 @@ const (
// equipment
ErrorCode_EquipmentOnFoundEquipment ErrorCode = 1400 // 未找到武器
ErrorCode_EquipmentLvlimitReached ErrorCode = 1401 // 武器等级已达上限
// mainStory
ErrorCode_StoryNotFindChapter ErrorCode = 1500 // 没有找到主线关卡信息
ErrorCode_StoryIDFailed ErrorCode = 1501 // 关卡ID 错误
// mainMainline
ErrorCode_MainlineNotFindChapter ErrorCode = 1500 // 没有找到主线关卡信息
ErrorCode_MainlineIDFailed ErrorCode = 1501 // 关卡ID 错误
// task
ErrorCode_TaskInit ErrorCode = 1600 //初始化失败
ErrorCode_TaskReset ErrorCode = 1601 //重置任务失败
@ -173,8 +173,8 @@ var (
1319: "HeroAddMaxExp",
1400: "EquipmentOnFoundEquipment",
1401: "EquipmentLvlimitReached",
1500: "StoryNotFindChapter",
1501: "StoryIDFailed",
1500: "MainlineNotFindChapter",
1501: "MainlineIDFailed",
1600: "TaskInit",
1601: "TaskReset",
1602: "TaskHandle",
@ -249,8 +249,8 @@ var (
"HeroAddMaxExp": 1319,
"EquipmentOnFoundEquipment": 1400,
"EquipmentLvlimitReached": 1401,
"StoryNotFindChapter": 1500,
"StoryIDFailed": 1501,
"MainlineNotFindChapter": 1500,
"MainlineIDFailed": 1501,
"TaskInit": 1600,
"TaskReset": 1601,
"TaskHandle": 1602,
@ -293,7 +293,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, 0xff, 0x0b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0x85, 0x0c, 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, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -376,21 +376,21 @@ var file_errorcode_proto_rawDesc = []byte{
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61,
0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x72, 0x79,
0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc,
0x0b, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c,
0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69,
0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65,
0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64,
0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63,
0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b,
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a,
0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75,
0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74,
0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13,
0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64,
0x10, 0xc7, 0x0c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65,
0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54,
0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61,
0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61,
0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54,
0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13,
0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74,
0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76,
0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54,
0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67,
0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69,
0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -25,15 +25,15 @@ type DBMainline struct {
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" bson:"uid"` //用户ID
ChapterId int32 `protobuf:"varint,3,opt,name=chapterId,proto3" json:"chapterId" bson:"chapterId"` //章节ID
StoryId int32 `protobuf:"varint,4,opt,name=storyId,proto3" json:"storyId" bson:"storyId"` //主线关卡ID
Intensity int32 `protobuf:"varint,5,opt,name=intensity,proto3" json:"intensity" bson:"intensity"` //难度类型
AwaredID int32 `protobuf:"varint,6,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //领奖ID
Progress int32 `protobuf:"varint,7,opt,name=progress,proto3" json:"progress" bson:"progress"` // 通关进度(打了多少主关卡)
TotalBox int32 `protobuf:"varint,8,opt,name=totalBox,proto3" json:"totalBox" bson:"totalBox"` // 总关卡数量
BranchID []int32 `protobuf:"varint,9,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录分支通关的情况
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" bson:"uid"` //用户ID
ChapterId int32 `protobuf:"varint,3,opt,name=chapterId,proto3" json:"chapterId" bson:"chapterId"` //章节ID
MainlineId int32 `protobuf:"varint,4,opt,name=mainlineId,proto3" json:"mainlineId" bson:"mainlineId"` //主线关卡ID
Intensity int32 `protobuf:"varint,5,opt,name=intensity,proto3" json:"intensity" bson:"intensity"` //难度类型
AwaredID int32 `protobuf:"varint,6,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //领奖ID
Progress int32 `protobuf:"varint,7,opt,name=progress,proto3" json:"progress" bson:"progress"` // 通关进度(打了多少主关卡)
TotalBox int32 `protobuf:"varint,8,opt,name=totalBox,proto3" json:"totalBox" bson:"totalBox"` // 总关卡数量
BranchID []int32 `protobuf:"varint,9,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录分支通关的情况
}
func (x *DBMainline) Reset() {
@ -89,9 +89,9 @@ func (x *DBMainline) GetChapterId() int32 {
return 0
}
func (x *DBMainline) GetStoryId() int32 {
func (x *DBMainline) GetMainlineId() int32 {
if x != nil {
return x.StoryId
return x.MainlineId
}
return 0
}
@ -135,24 +135,24 @@ var File_mainline_mainline_db_proto protoreflect.FileDescriptor
var file_mainline_mainline_db_proto_rawDesc = []byte{
0x0a, 0x1a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x01, 0x0a,
0x69, 0x6e, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x01, 0x0a,
0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 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, 0x1c, 0x0a,
0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x12,
0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x49, 0x44, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x49, 0x44, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69,
0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x77, 0x61,
0x72, 0x65, 0x64, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x77, 0x61,
0x72, 0x65, 0x64, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x18, 0x08, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x12, 0x1a, 0x0a,
0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52,
0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -216,8 +216,8 @@ type MainlineChallengeReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID
StoryId uint32 `protobuf:"varint,2,opt,name=storyId,proto3" json:"storyId"` // 小关ID
ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID
MainlineId uint32 `protobuf:"varint,2,opt,name=mainlineId,proto3" json:"mainlineId"` // 小关ID
}
func (x *MainlineChallengeReq) Reset() {
@ -259,9 +259,9 @@ func (x *MainlineChallengeReq) GetChapterId() uint32 {
return 0
}
func (x *MainlineChallengeReq) GetStoryId() uint32 {
func (x *MainlineChallengeReq) GetMainlineId() uint32 {
if x != nil {
return x.StoryId
return x.MainlineId
}
return 0
}
@ -332,17 +332,17 @@ var file_mainline_mainline_msg_proto_rawDesc = []byte{
0x49, 0x64, 0x22, 0x37, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65,
0x74, 0x52, 0x65, 0x77, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x14, 0x4d,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x54, 0x0a, 0x14, 0x4d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x4d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49,
0x64, 0x22, 0x38, 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61,
0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -76,9 +76,9 @@ enum ErrorCode {
// equipment
EquipmentOnFoundEquipment = 1400; //
EquipmentLvlimitReached = 1401; //
// mainStory
StoryNotFindChapter = 1500; // 线
StoryIDFailed = 1501; // ID
// mainMainline
MainlineNotFindChapter = 1500; // 线
MainlineIDFailed = 1501; // ID
// task
TaskInit = 1600; //

View File

@ -5,7 +5,7 @@ message DBMainline {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2; //@go_tags(`bson:"uid"`) ID
int32 chapterId = 3; //@go_tags(`bson:"chapterId"`) ID
int32 storyId = 4; //@go_tags(`bson:"storyId"`) 线ID
int32 mainlineId = 4; //@go_tags(`bson:"mainlineId"`) 线ID
int32 intensity = 5; //@go_tags(`bson:"intensity"`)
int32 awaredID = 6; //@go_tags(`bson:"awaredID"`) ID
int32 progress = 7; // @go_tags(`bson:"progress"`) ()

View File

@ -24,7 +24,7 @@ message MainlineGetRewrdResp {
//
message MainlineChallengeReq {
uint32 chapterId = 1; // ID
uint32 storyId = 2; // ID
uint32 mainlineId = 2; // ID
}
message MainlineChallengeResp {

View File

@ -1,218 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: story/story_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 DBStory 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" bson:"uid"` //用户ID
ChapterId int32 `protobuf:"varint,3,opt,name=chapterId,proto3" json:"chapterId" bson:"chapterId"` //章节ID
StoryId int32 `protobuf:"varint,4,opt,name=storyId,proto3" json:"storyId" bson:"storyId"` //主线关卡ID
Intensity int32 `protobuf:"varint,5,opt,name=intensity,proto3" json:"intensity" bson:"intensity"` //难度类型
AwaredID int32 `protobuf:"varint,6,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //领奖ID
Progress int32 `protobuf:"varint,7,opt,name=progress,proto3" json:"progress" bson:"progress"` // 通关进度(打了多少主关卡)
TotalBox int32 `protobuf:"varint,8,opt,name=totalBox,proto3" json:"totalBox" bson:"totalBox"` // 总关卡数量
BranchID []int32 `protobuf:"varint,9,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录分支通关的情况
}
func (x *DBStory) Reset() {
*x = DBStory{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBStory) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBStory) ProtoMessage() {}
func (x *DBStory) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 DBStory.ProtoReflect.Descriptor instead.
func (*DBStory) Descriptor() ([]byte, []int) {
return file_story_story_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBStory) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBStory) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBStory) GetChapterId() int32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *DBStory) GetStoryId() int32 {
if x != nil {
return x.StoryId
}
return 0
}
func (x *DBStory) GetIntensity() int32 {
if x != nil {
return x.Intensity
}
return 0
}
func (x *DBStory) GetAwaredID() int32 {
if x != nil {
return x.AwaredID
}
return 0
}
func (x *DBStory) GetProgress() int32 {
if x != nil {
return x.Progress
}
return 0
}
func (x *DBStory) GetTotalBox() int32 {
if x != nil {
return x.TotalBox
}
return 0
}
func (x *DBStory) GetBranchID() []int32 {
if x != nil {
return x.BranchID
}
return nil
}
var File_story_story_db_proto protoreflect.FileDescriptor
var file_story_story_db_proto_rawDesc = []byte{
0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x64, 0x62,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x01, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f,
0x72, 0x79, 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, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72,
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x77,
0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x77,
0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x18, 0x08,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x12, 0x1a,
0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05,
0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_story_story_db_proto_rawDescOnce sync.Once
file_story_story_db_proto_rawDescData = file_story_story_db_proto_rawDesc
)
func file_story_story_db_proto_rawDescGZIP() []byte {
file_story_story_db_proto_rawDescOnce.Do(func() {
file_story_story_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_story_story_db_proto_rawDescData)
})
return file_story_story_db_proto_rawDescData
}
var file_story_story_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_story_story_db_proto_goTypes = []interface{}{
(*DBStory)(nil), // 0: DBStory
}
var file_story_story_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_story_story_db_proto_init() }
func file_story_story_db_proto_init() {
if File_story_story_db_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_story_story_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBStory); 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_story_story_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_story_story_db_proto_goTypes,
DependencyIndexes: file_story_story_db_proto_depIdxs,
MessageInfos: file_story_story_db_proto_msgTypes,
}.Build()
File_story_story_db_proto = out.File
file_story_story_db_proto_rawDesc = nil
file_story_story_db_proto_goTypes = nil
file_story_story_db_proto_depIdxs = nil
}

View File

@ -1,476 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: story/story_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 StoryGetListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *StoryGetListReq) Reset() {
*x = StoryGetListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StoryGetListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoryGetListReq) ProtoMessage() {}
func (x *StoryGetListReq) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 StoryGetListReq.ProtoReflect.Descriptor instead.
func (*StoryGetListReq) Descriptor() ([]byte, []int) {
return file_story_story_msg_proto_rawDescGZIP(), []int{0}
}
// 返回进度信息
type StoryGetListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data []*DBStory `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
}
func (x *StoryGetListResp) Reset() {
*x = StoryGetListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StoryGetListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoryGetListResp) ProtoMessage() {}
func (x *StoryGetListResp) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 StoryGetListResp.ProtoReflect.Descriptor instead.
func (*StoryGetListResp) Descriptor() ([]byte, []int) {
return file_story_story_msg_proto_rawDescGZIP(), []int{1}
}
func (x *StoryGetListResp) GetData() []*DBStory {
if x != nil {
return x.Data
}
return nil
}
// 领取关卡宝箱
type StoryGetRewrdReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID
BoxId uint32 `protobuf:"varint,2,opt,name=boxId,proto3" json:"boxId"` // 宝箱ID
}
func (x *StoryGetRewrdReq) Reset() {
*x = StoryGetRewrdReq{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StoryGetRewrdReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoryGetRewrdReq) ProtoMessage() {}
func (x *StoryGetRewrdReq) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 StoryGetRewrdReq.ProtoReflect.Descriptor instead.
func (*StoryGetRewrdReq) Descriptor() ([]byte, []int) {
return file_story_story_msg_proto_rawDescGZIP(), []int{2}
}
func (x *StoryGetRewrdReq) GetChapterId() uint32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *StoryGetRewrdReq) GetBoxId() uint32 {
if x != nil {
return x.BoxId
}
return 0
}
type StoryGetRewrdResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBStory `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
}
func (x *StoryGetRewrdResp) Reset() {
*x = StoryGetRewrdResp{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StoryGetRewrdResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoryGetRewrdResp) ProtoMessage() {}
func (x *StoryGetRewrdResp) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 StoryGetRewrdResp.ProtoReflect.Descriptor instead.
func (*StoryGetRewrdResp) Descriptor() ([]byte, []int) {
return file_story_story_msg_proto_rawDescGZIP(), []int{3}
}
func (x *StoryGetRewrdResp) GetData() *DBStory {
if x != nil {
return x.Data
}
return nil
}
// 挑战关卡
type StoryChallengeReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID
StoryId uint32 `protobuf:"varint,2,opt,name=storyId,proto3" json:"storyId"` // 小关ID
}
func (x *StoryChallengeReq) Reset() {
*x = StoryChallengeReq{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StoryChallengeReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoryChallengeReq) ProtoMessage() {}
func (x *StoryChallengeReq) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 StoryChallengeReq.ProtoReflect.Descriptor instead.
func (*StoryChallengeReq) Descriptor() ([]byte, []int) {
return file_story_story_msg_proto_rawDescGZIP(), []int{4}
}
func (x *StoryChallengeReq) GetChapterId() uint32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *StoryChallengeReq) GetStoryId() uint32 {
if x != nil {
return x.StoryId
}
return 0
}
type StoryChallengeResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBStory `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
}
func (x *StoryChallengeResp) Reset() {
*x = StoryChallengeResp{}
if protoimpl.UnsafeEnabled {
mi := &file_story_story_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StoryChallengeResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoryChallengeResp) ProtoMessage() {}
func (x *StoryChallengeResp) ProtoReflect() protoreflect.Message {
mi := &file_story_story_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 StoryChallengeResp.ProtoReflect.Descriptor instead.
func (*StoryChallengeResp) Descriptor() ([]byte, []int) {
return file_story_story_msg_proto_rawDescGZIP(), []int{5}
}
func (x *StoryChallengeResp) GetData() *DBStory {
if x != nil {
return x.Data
}
return nil
}
var File_story_story_msg_proto protoreflect.FileDescriptor
var file_story_story_msg_proto_rawDesc = []byte{
0x0a, 0x15, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x73,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x73,
0x74, 0x6f, 0x72, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a,
0x0f, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
0x22, 0x30, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61,
0x74, 0x61, 0x22, 0x46, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65,
0x77, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65,
0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74,
0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x74,
0x6f, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
0x44, 0x42, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4b, 0x0a,
0x11, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52,
0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x12, 0x53, 0x74,
0x6f, 0x72, 0x79, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08,
0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_story_story_msg_proto_rawDescOnce sync.Once
file_story_story_msg_proto_rawDescData = file_story_story_msg_proto_rawDesc
)
func file_story_story_msg_proto_rawDescGZIP() []byte {
file_story_story_msg_proto_rawDescOnce.Do(func() {
file_story_story_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_story_story_msg_proto_rawDescData)
})
return file_story_story_msg_proto_rawDescData
}
var file_story_story_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_story_story_msg_proto_goTypes = []interface{}{
(*StoryGetListReq)(nil), // 0: StoryGetListReq
(*StoryGetListResp)(nil), // 1: StoryGetListResp
(*StoryGetRewrdReq)(nil), // 2: StoryGetRewrdReq
(*StoryGetRewrdResp)(nil), // 3: StoryGetRewrdResp
(*StoryChallengeReq)(nil), // 4: StoryChallengeReq
(*StoryChallengeResp)(nil), // 5: StoryChallengeResp
(*DBStory)(nil), // 6: DBStory
}
var file_story_story_msg_proto_depIdxs = []int32{
6, // 0: StoryGetListResp.data:type_name -> DBStory
6, // 1: StoryGetRewrdResp.data:type_name -> DBStory
6, // 2: StoryChallengeResp.data:type_name -> DBStory
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_story_story_msg_proto_init() }
func file_story_story_msg_proto_init() {
if File_story_story_msg_proto != nil {
return
}
file_story_story_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_story_story_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StoryGetListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_story_story_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StoryGetListResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_story_story_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StoryGetRewrdReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_story_story_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StoryGetRewrdResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_story_story_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StoryChallengeReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_story_story_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StoryChallengeResp); 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_story_story_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_story_story_msg_proto_goTypes,
DependencyIndexes: file_story_story_msg_proto_depIdxs,
MessageInfos: file_story_story_msg_proto_msgTypes,
}.Build()
File_story_story_msg_proto = out.File
file_story_story_msg_proto_rawDesc = nil
file_story_story_msg_proto_goTypes = nil
file_story_story_msg_proto_depIdxs = nil
}