Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
03b23e7282
@ -3,6 +3,7 @@
|
|||||||
"id": 10001,
|
"id": 10001,
|
||||||
"num": 1,
|
"num": 1,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -11,6 +12,7 @@
|
|||||||
"id": 10002,
|
"id": 10002,
|
||||||
"num": 2,
|
"num": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -19,6 +21,7 @@
|
|||||||
"id": 10003,
|
"id": 10003,
|
||||||
"num": 1,
|
"num": 1,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "101",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -27,6 +30,7 @@
|
|||||||
"id": 10004,
|
"id": 10004,
|
||||||
"num": 1,
|
"num": 1,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -35,6 +39,7 @@
|
|||||||
"id": 10005,
|
"id": 10005,
|
||||||
"num": 2,
|
"num": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -43,6 +48,7 @@
|
|||||||
"id": 10006,
|
"id": 10006,
|
||||||
"num": 1,
|
"num": 1,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -51,6 +57,7 @@
|
|||||||
"id": 10007,
|
"id": 10007,
|
||||||
"num": 2,
|
"num": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -59,6 +66,7 @@
|
|||||||
"id": 10008,
|
"id": 10008,
|
||||||
"num": 3,
|
"num": 3,
|
||||||
"preTid": 170,
|
"preTid": 170,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -67,6 +75,7 @@
|
|||||||
"id": 10009,
|
"id": 10009,
|
||||||
"num": 1,
|
"num": 1,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -75,6 +84,7 @@
|
|||||||
"id": 100010,
|
"id": 100010,
|
||||||
"num": 2,
|
"num": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -83,6 +93,7 @@
|
|||||||
"id": 100011,
|
"id": 100011,
|
||||||
"num": 1,
|
"num": 1,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "101",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
@ -91,6 +102,7 @@
|
|||||||
"id": 100012,
|
"id": 100012,
|
||||||
"num": 2,
|
"num": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
|
"gotoLevel": "",
|
||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
|
@ -19,6 +19,7 @@ import (
|
|||||||
"fyne.io/fyne/v2/data/binding"
|
"fyne.io/fyne/v2/data/binding"
|
||||||
"fyne.io/fyne/v2/dialog"
|
"fyne.io/fyne/v2/dialog"
|
||||||
"fyne.io/fyne/v2/layout"
|
"fyne.io/fyne/v2/layout"
|
||||||
|
"fyne.io/fyne/v2/storage"
|
||||||
"fyne.io/fyne/v2/theme"
|
"fyne.io/fyne/v2/theme"
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -97,15 +98,38 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
|||||||
tmpDir.Text = gt.TmpDir
|
tmpDir.Text = gt.TmpDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 打开目录
|
||||||
|
openFolder := func(entry *widget.Entry) {
|
||||||
|
dConf := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||||
|
if lu == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
entry.Text = lu.Path()
|
||||||
|
entry.Refresh()
|
||||||
|
}, toolWin.w)
|
||||||
|
luri, _ := storage.ListerForURI(storage.NewFileURI("."))
|
||||||
|
dConf.SetLocation(luri)
|
||||||
|
dConf.SetConfirmText("打开")
|
||||||
|
dConf.SetDismissText("取消")
|
||||||
|
dConf.Resize(fyne.NewSize(750, 500))
|
||||||
|
dConf.Show()
|
||||||
|
}
|
||||||
|
|
||||||
form := widget.NewForm(
|
form := widget.NewForm(
|
||||||
widget.NewFormItem("服务地址", serverAddr),
|
widget.NewFormItem("服务地址", serverAddr),
|
||||||
widget.NewFormItem("项目目录", projectDir),
|
widget.NewFormItem("项目目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||||
widget.NewFormItem("工作目录", workDir),
|
openFolder(projectDir)
|
||||||
|
}), projectDir)),
|
||||||
|
widget.NewFormItem("工作目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||||
|
openFolder(workDir)
|
||||||
|
}), workDir)),
|
||||||
widget.NewFormItem("LuBan Cli", client),
|
widget.NewFormItem("LuBan Cli", client),
|
||||||
widget.NewFormItem("输入目录", inputDir),
|
widget.NewFormItem("输入目录", inputDir),
|
||||||
widget.NewFormItem("输出Code目录", outputCodeDir),
|
widget.NewFormItem("输出Code目录", outputCodeDir),
|
||||||
widget.NewFormItem("输出JSON目录", outputJsonDir),
|
widget.NewFormItem("输出JSON目录", outputJsonDir),
|
||||||
widget.NewFormItem("临时目录", tmpDir),
|
widget.NewFormItem("临时目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||||
|
openFolder(tmpDir)
|
||||||
|
}), tmpDir)),
|
||||||
widget.NewFormItem("生成类型", genType),
|
widget.NewFormItem("生成类型", genType),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ import (
|
|||||||
"fyne.io/fyne/v2/data/binding"
|
"fyne.io/fyne/v2/data/binding"
|
||||||
"fyne.io/fyne/v2/dialog"
|
"fyne.io/fyne/v2/dialog"
|
||||||
"fyne.io/fyne/v2/layout"
|
"fyne.io/fyne/v2/layout"
|
||||||
|
"fyne.io/fyne/v2/storage"
|
||||||
"fyne.io/fyne/v2/theme"
|
"fyne.io/fyne/v2/theme"
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -40,6 +41,23 @@ func (this *appPbGen) LazyInit(obs observer.Observer) error {
|
|||||||
pcm := service.GetDbService().GetPbConf()
|
pcm := service.GetDbService().GetPbConf()
|
||||||
logrus.Debugf("%v", pcm)
|
logrus.Debugf("%v", pcm)
|
||||||
|
|
||||||
|
// 打开目录
|
||||||
|
openFolder := func(entry *widget.Entry) {
|
||||||
|
dConf := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||||
|
if lu == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
entry.Text = lu.Path()
|
||||||
|
entry.Refresh()
|
||||||
|
}, toolWin.w)
|
||||||
|
luri, _ := storage.ListerForURI(storage.NewFileURI("."))
|
||||||
|
dConf.SetLocation(luri)
|
||||||
|
dConf.SetConfirmText("打开")
|
||||||
|
dConf.SetDismissText("取消")
|
||||||
|
dConf.Resize(fyne.NewSize(750, 500))
|
||||||
|
dConf.Show()
|
||||||
|
}
|
||||||
|
|
||||||
content := container.NewMax()
|
content := container.NewMax()
|
||||||
content.Objects = []fyne.CanvasObject{}
|
content.Objects = []fyne.CanvasObject{}
|
||||||
|
|
||||||
@ -54,8 +72,13 @@ func (this *appPbGen) LazyInit(obs observer.Observer) error {
|
|||||||
outDir.PlaceHolder = "go输出目录"
|
outDir.PlaceHolder = "go输出目录"
|
||||||
|
|
||||||
form := widget.NewForm(
|
form := widget.NewForm(
|
||||||
widget.NewFormItem("proto目录", protoDir),
|
widget.NewFormItem("proto目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||||
widget.NewFormItem("输出目录", outDir),
|
openFolder(protoDir)
|
||||||
|
this.folderList.initItem(protoDir.Text)
|
||||||
|
}), protoDir)),
|
||||||
|
widget.NewFormItem("输出目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||||
|
openFolder(outDir)
|
||||||
|
}), outDir)),
|
||||||
)
|
)
|
||||||
|
|
||||||
if pcm != nil {
|
if pcm != nil {
|
||||||
|
@ -114,8 +114,10 @@ const (
|
|||||||
TableRtask = "rtask"
|
TableRtask = "rtask"
|
||||||
// 随机任务触发记录
|
// 随机任务触发记录
|
||||||
TableRtaskRecord = "rrecord"
|
TableRtaskRecord = "rrecord"
|
||||||
///爬塔排行
|
///记录用户爬塔排行数据
|
||||||
TablePagodaRank = "pagodarank"
|
TablePagodaRecord = "pagodarecord"
|
||||||
|
///有序的爬塔排行 (正正的排行榜 最多只有50条)
|
||||||
|
TablePagodaRankList = "pagodaranklist"
|
||||||
/// 美食馆
|
/// 美食馆
|
||||||
TableSmithy = "smithy"
|
TableSmithy = "smithy"
|
||||||
/// 赛季塔数据表
|
/// 赛季塔数据表
|
||||||
|
@ -100,17 +100,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
|||||||
mapData["pagodaId"] = cfg.LayerNum
|
mapData["pagodaId"] = cfg.LayerNum
|
||||||
code = this.module.ModifySeasonPagodaData(session.GetUserId(), mapData)
|
code = this.module.ModifySeasonPagodaData(session.GetUserId(), mapData)
|
||||||
}
|
}
|
||||||
|
// 记录爬塔明细数据
|
||||||
rst, _ := this.module.modulerank.GetUserRandData(session.GetUserId())
|
|
||||||
if rst.Uid == "" {
|
|
||||||
rst.Uid = session.GetUserId()
|
|
||||||
rst.Id = primitive.NewObjectID().Hex()
|
|
||||||
rst.Type = req.PagodaType
|
|
||||||
rst.Nickname = this.module.ModuleUser.GetUser(session.GetUserId()).Name
|
|
||||||
rst.Lv = this.module.ModuleUser.GetUser(session.GetUserId()).Lv
|
|
||||||
rst.PagodaId = pagoda.PagodaId
|
|
||||||
this.module.modulerank.AddRank(session.GetUserId(), rst)
|
|
||||||
} else {
|
|
||||||
if req.Report != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
sz := make([]*pb.LineUp, 5)
|
sz := make([]*pb.LineUp, 5)
|
||||||
for i, v := range req.Report.Info.Redflist[0].Team {
|
for i, v := range req.Report.Info.Redflist[0].Team {
|
||||||
@ -123,10 +113,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.module.modulerank.updatePagodaRankList(session, seasonPagoda, req.Report.Info.Redflist[0].Leadpos, sz)
|
this.module.modulerank.addPagodaRankList(session, seasonPagoda, req.Report.Info.Redflist[0].Leadpos, sz)
|
||||||
}
|
|
||||||
mapData["pagodaId"] = cfg.LayerNum
|
|
||||||
this.module.modulerank.ChangeUserRank(session.GetUserId(), mapData)
|
|
||||||
}
|
}
|
||||||
pagoda.PagodaId = seasonPagoda.PagodaId
|
pagoda.PagodaId = seasonPagoda.PagodaId
|
||||||
pagoda.Type = seasonPagoda.Type
|
pagoda.Type = seasonPagoda.Type
|
||||||
|
@ -14,16 +14,21 @@ func (this *apiComp) RankListCheck(session comm.IUserSession, req *pb.PagodaRank
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *apiComp) RankList(session comm.IUserSession, req *pb.PagodaRankListReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) RankList(session comm.IUserSession, req *pb.PagodaRankListReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
szRank []*pb.DBPagodaRank
|
||||||
|
err error
|
||||||
|
)
|
||||||
code = this.RankListCheck(session, req)
|
code = this.RankListCheck(session, req)
|
||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if req.FloorId == 0 && req.Friend == false {
|
||||||
szRank, err := this.module.modulerank.GetRankData()
|
szRank, err = this.module.modulerank.GetRankData()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_DBError
|
code = pb.ErrorCode_DBError
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), PagodaRankListResp, &pb.PagodaRankListResp{Ranks: szRank})
|
session.SendMsg(string(this.module.GetType()), PagodaRankListResp, &pb.PagodaRankListResp{Ranks: szRank})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ type ModelRank struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *ModelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
this.TableName = comm.TablePagodaRank
|
this.TableName = comm.TablePagodaRecord
|
||||||
err = this.MCompModel.Init(service, module, comp, options)
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
this.modulePagoda = module.(*Pagoda)
|
this.modulePagoda = module.(*Pagoda)
|
||||||
return
|
return
|
||||||
@ -49,7 +49,7 @@ func (this *ModelRank) ChangeUserRank(uid string, value map[string]interface{})
|
|||||||
|
|
||||||
func (this *ModelRank) GetRankData() (data []*pb.DBPagodaRank, err error) {
|
func (this *ModelRank) GetRankData() (data []*pb.DBPagodaRank, err error) {
|
||||||
data = make([]*pb.DBPagodaRank, 0)
|
data = make([]*pb.DBPagodaRank, 0)
|
||||||
err = this.Redis.LRange(comm.TablePagodaRank, 0, -1, &data)
|
err = this.Redis.LRange(comm.TablePagodaRankList, 0, -1, &data)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ func (this *ModelRank) getPagodaRankList(uid string) []*pb.DBPagodaRank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 插入新的排行数据
|
// 插入新的排行数据
|
||||||
func (this *ModelRank) updatePagodaRankList(session comm.IUserSession, data *pb.DBSeasonPagoda, Leadpos int32, line []*pb.LineUp) {
|
func (this *ModelRank) addPagodaRankList(session comm.IUserSession, data *pb.DBSeasonPagoda, Leadpos int32, line []*pb.LineUp) {
|
||||||
userinfo := this.modulePagoda.ModuleUser.GetUser(session.GetUserId())
|
userinfo := this.modulePagoda.ModuleUser.GetUser(session.GetUserId())
|
||||||
new := &pb.DBPagodaRank{
|
new := &pb.DBPagodaRank{
|
||||||
Id: primitive.NewObjectID().Hex(),
|
Id: primitive.NewObjectID().Hex(),
|
||||||
|
@ -61,7 +61,7 @@ func (this *ModelSeasonPagoda) addNewSeasonPagoda(uId string, data *pb.DBSeasonP
|
|||||||
// 赛季结束 清理所有塔数据
|
// 赛季结束 清理所有塔数据
|
||||||
func (this *ModelSeasonPagoda) DleAllSeasonData() {
|
func (this *ModelSeasonPagoda) DleAllSeasonData() {
|
||||||
this.DB.DeleteMany(core.SqlTable(this.TableName), bson.M{})
|
this.DB.DeleteMany(core.SqlTable(this.TableName), bson.M{})
|
||||||
err := this.Redis.Ltrim(comm.TablePagodaRank, 0, -1)
|
err := this.Redis.Ltrim(comm.TablePagodaRecord, 0, -1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("delete failed")
|
log.Errorf("delete failed")
|
||||||
}
|
}
|
||||||
|
24
modules/rtask/api_finish.go
Normal file
24
modules/rtask/api_finish.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package rtask
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (this *apiComp) BattleFinishCheck(session comm.IUserSession, req *pb.RtaskBattleFinishReq) (code pb.ErrorCode) {
|
||||||
|
if req.Result == 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.RtaskBattleFinishReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
if code = this.BattleFinishCheck(session, req); code != pb.ErrorCode_Success {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
@ -12,6 +12,7 @@ const (
|
|||||||
gameRtaskChoose = "game_rdtaskchoose.json"
|
gameRtaskChoose = "game_rdtaskchoose.json"
|
||||||
gameRtaskCondi = "game_rdtaskcondi.json"
|
gameRtaskCondi = "game_rdtaskcondi.json"
|
||||||
gameRtaskSide = "game_rdtaskside.json"
|
gameRtaskSide = "game_rdtaskside.json"
|
||||||
|
gameRtaskBattle = "game_rdtaskbattle.json"
|
||||||
)
|
)
|
||||||
|
|
||||||
type configureComp struct {
|
type configureComp struct {
|
||||||
@ -25,6 +26,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
|||||||
gameRtaskChoose: cfg.NewGameRdtaskChoose,
|
gameRtaskChoose: cfg.NewGameRdtaskChoose,
|
||||||
gameRtaskCondi: cfg.NewGameRdtaskCondi,
|
gameRtaskCondi: cfg.NewGameRdtaskCondi,
|
||||||
gameRtaskSide: cfg.NewGameRdtaskSide,
|
gameRtaskSide: cfg.NewGameRdtaskSide,
|
||||||
|
gameRtaskBattle: cfg.NewGameRdtaskBattle,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -93,6 +95,22 @@ func (this *configureComp) getRtaskSide() (data *cfg.GameRdtaskSide, err error)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *configureComp) getRtaskBattle() (data *cfg.GameRdtaskBattle, err error) {
|
||||||
|
var (
|
||||||
|
v interface{}
|
||||||
|
ok bool
|
||||||
|
)
|
||||||
|
if v, err = this.GetConfigure(gameRtaskBattle); err != nil {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
if data, ok = v.(*cfg.GameRdtaskBattle); !ok {
|
||||||
|
err = fmt.Errorf("%T is *cfg.GameRdtaskBattle", v)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 获取选项配置
|
// 获取选项配置
|
||||||
func (this *configureComp) getRtaskChooseCfg(id int32) *cfg.GameRdtaskChooseData {
|
func (this *configureComp) getRtaskChooseCfg(id int32) *cfg.GameRdtaskChooseData {
|
||||||
cfg, err := this.getRtaskChoose()
|
cfg, err := this.getRtaskChoose()
|
||||||
@ -145,3 +163,17 @@ func (this *configureComp) getRtaskById(taskId int32) (data *cfg.GameRdtaskData)
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 战斗配置
|
||||||
|
func (this *configureComp) getRtaskBattleById(id int32) (data *cfg.GameRdtaskBattleData) {
|
||||||
|
cfg, err := this.getRtaskBattle()
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if cfg != nil {
|
||||||
|
if data, ok := cfg.GetDataMap()[id]; ok {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
@ -18,7 +18,7 @@ type forumComp struct {
|
|||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
func (this *forumComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *forumComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
|
||||||
this.TableName = comm.TablePagodaRank
|
this.TableName = comm.TablePagodaRecord
|
||||||
this.MCompModel.Init(service, module, comp, options)
|
this.MCompModel.Init(service, module, comp, options)
|
||||||
this.service = service
|
this.service = service
|
||||||
return
|
return
|
||||||
|
@ -22,7 +22,7 @@ type PagodaRank struct {
|
|||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
func (this *PagodaRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *PagodaRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
|
|
||||||
this.TableName = comm.TablePagodaRank
|
this.TableName = comm.TablePagodaRecord
|
||||||
this.MCompModel.Init(service, module, comp, options)
|
this.MCompModel.Init(service, module, comp, options)
|
||||||
this.service = service
|
this.service = service
|
||||||
return
|
return
|
||||||
@ -37,7 +37,7 @@ func (this *PagodaRank) Start() (err error) {
|
|||||||
// 处理排行榜排序
|
// 处理排行榜排序
|
||||||
func (this *PagodaRank) Timer() {
|
func (this *PagodaRank) Timer() {
|
||||||
data := make([]interface{}, 0) // options.Find().SetLimit(comm.MaxRankList)
|
data := make([]interface{}, 0) // options.Find().SetLimit(comm.MaxRankList)
|
||||||
if _data, err := this.DB.Find(comm.TablePagodaRank, bson.M{}, options.Find().SetSort(bson.M{"pagodaId": -1}).SetLimit(comm.MaxRankList)); err == nil {
|
if _data, err := this.DB.Find(comm.TablePagodaRecord, bson.M{}, options.Find().SetSort(bson.M{"pagodaId": -1}).SetLimit(comm.MaxRankList)); err == nil {
|
||||||
for _data.Next(context.TODO()) {
|
for _data.Next(context.TODO()) {
|
||||||
temp := &pb.DBPagodaRank{}
|
temp := &pb.DBPagodaRank{}
|
||||||
if err = _data.Decode(temp); err == nil {
|
if err = _data.Decode(temp); err == nil {
|
||||||
@ -46,9 +46,9 @@ func (this *PagodaRank) Timer() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
err := this.Redis.RPush(comm.TablePagodaRank, data...)
|
err := this.Redis.RPush(comm.TablePagodaRankList, data...)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = this.Redis.Ltrim(comm.TablePagodaRank, -1*len(data), -1) //对一个列表进行修剪
|
err = this.Redis.Ltrim(comm.TablePagodaRankList, -1*len(data), -1) //对一个列表进行修剪
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("delete failed")
|
log.Errorf("delete failed")
|
||||||
}
|
}
|
||||||
|
@ -437,8 +437,8 @@ type PagodaRankListReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
FloorId int32 `protobuf:"varint,1,opt,name=floorId,proto3" json:"floorId"` // 层数
|
FloorId int32 `protobuf:"varint,1,opt,name=floorId,proto3" json:"floorId"` // 层数 0 标识总榜
|
||||||
Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type"` // 塔类型
|
Friend bool `protobuf:"varint,2,opt,name=friend,proto3" json:"friend"` // true 好友榜
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PagodaRankListReq) Reset() {
|
func (x *PagodaRankListReq) Reset() {
|
||||||
@ -480,11 +480,11 @@ func (x *PagodaRankListReq) GetFloorId() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PagodaRankListReq) GetType() int32 {
|
func (x *PagodaRankListReq) GetFriend() bool {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Type
|
return x.Friend
|
||||||
}
|
}
|
||||||
return 0
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
type PagodaRankListResp struct {
|
type PagodaRankListResp struct {
|
||||||
@ -575,15 +575,16 @@ var file_pagoda_pagoda_msg_proto_rawDesc = []byte{
|
|||||||
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73,
|
0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||||
0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
0x09, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||||
0x22, 0x41, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
|
0x22, 0x45, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69,
|
||||||
0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64,
|
0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x49, 0x64, 0x12,
|
||||||
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74,
|
0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e,
|
0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x50, 0x61, 0x67, 0x6f, 0x64,
|
||||||
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x61, 0x6e,
|
0x61, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a,
|
||||||
0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67,
|
0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44,
|
||||||
0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06,
|
0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e,
|
||||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -504,6 +504,133 @@ func (x *RtaskGetRewardResp) GetRtaskSubId() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 战斗完成
|
||||||
|
type RtaskBattleFinishReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
|
||||||
|
ChooseId int32 `protobuf:"varint,2,opt,name=chooseId,proto3" json:"chooseId"` //选项配置ID
|
||||||
|
RtaskSubId int32 `protobuf:"varint,3,opt,name=rtaskSubId,proto3" json:"rtaskSubId"` //支线任务ID
|
||||||
|
Result int32 `protobuf:"varint,4,opt,name=result,proto3" json:"result"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) Reset() {
|
||||||
|
*x = RtaskBattleFinishReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rtask_rtask_msg_proto_msgTypes[9]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RtaskBattleFinishReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rtask_rtask_msg_proto_msgTypes[9]
|
||||||
|
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 RtaskBattleFinishReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RtaskBattleFinishReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{9}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) GetRtaskId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RtaskId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) GetChooseId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ChooseId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) GetRtaskSubId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RtaskSubId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishReq) GetResult() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Result
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type RtaskBattleFinishResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Bid int32 `protobuf:"varint,1,opt,name=bid,proto3" json:"bid"` //战斗配置ID
|
||||||
|
RtaskId int32 `protobuf:"varint,2,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishResp) Reset() {
|
||||||
|
*x = RtaskBattleFinishResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rtask_rtask_msg_proto_msgTypes[10]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RtaskBattleFinishResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rtask_rtask_msg_proto_msgTypes[10]
|
||||||
|
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 RtaskBattleFinishResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RtaskBattleFinishResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{10}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishResp) GetBid() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Bid
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RtaskBattleFinishResp) GetRtaskId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RtaskId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// 测试使用
|
// 测试使用
|
||||||
type RtaskTestReq struct {
|
type RtaskTestReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -518,7 +645,7 @@ type RtaskTestReq struct {
|
|||||||
func (x *RtaskTestReq) Reset() {
|
func (x *RtaskTestReq) Reset() {
|
||||||
*x = RtaskTestReq{}
|
*x = RtaskTestReq{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_rtask_rtask_msg_proto_msgTypes[9]
|
mi := &file_rtask_rtask_msg_proto_msgTypes[11]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -531,7 +658,7 @@ func (x *RtaskTestReq) String() string {
|
|||||||
func (*RtaskTestReq) ProtoMessage() {}
|
func (*RtaskTestReq) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RtaskTestReq) ProtoReflect() protoreflect.Message {
|
func (x *RtaskTestReq) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_rtask_rtask_msg_proto_msgTypes[9]
|
mi := &file_rtask_rtask_msg_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -544,7 +671,7 @@ func (x *RtaskTestReq) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RtaskTestReq.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RtaskTestReq.ProtoReflect.Descriptor instead.
|
||||||
func (*RtaskTestReq) Descriptor() ([]byte, []int) {
|
func (*RtaskTestReq) Descriptor() ([]byte, []int) {
|
||||||
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{9}
|
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{11}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RtaskTestReq) GetRtaskType() int32 {
|
func (x *RtaskTestReq) GetRtaskType() int32 {
|
||||||
@ -579,7 +706,7 @@ type RtaskTestResp struct {
|
|||||||
func (x *RtaskTestResp) Reset() {
|
func (x *RtaskTestResp) Reset() {
|
||||||
*x = RtaskTestResp{}
|
*x = RtaskTestResp{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_rtask_rtask_msg_proto_msgTypes[10]
|
mi := &file_rtask_rtask_msg_proto_msgTypes[12]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -592,7 +719,7 @@ func (x *RtaskTestResp) String() string {
|
|||||||
func (*RtaskTestResp) ProtoMessage() {}
|
func (*RtaskTestResp) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RtaskTestResp) ProtoReflect() protoreflect.Message {
|
func (x *RtaskTestResp) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_rtask_rtask_msg_proto_msgTypes[10]
|
mi := &file_rtask_rtask_msg_proto_msgTypes[12]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -605,7 +732,7 @@ func (x *RtaskTestResp) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RtaskTestResp.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RtaskTestResp.ProtoReflect.Descriptor instead.
|
||||||
func (*RtaskTestResp) Descriptor() ([]byte, []int) {
|
func (*RtaskTestResp) Descriptor() ([]byte, []int) {
|
||||||
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{10}
|
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{12}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RtaskTestResp) GetFlag() bool {
|
func (x *RtaskTestResp) GetFlag() bool {
|
||||||
@ -658,16 +785,29 @@ var file_rtask_rtask_msg_proto_rawDesc = []byte{
|
|||||||
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
|
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
|
||||||
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64,
|
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62,
|
||||||
0x49, 0x64, 0x22, 0x5e, 0x0a, 0x0c, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52,
|
0x49, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74,
|
||||||
0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18,
|
0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
|
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74,
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05,
|
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49,
|
||||||
0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64,
|
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49,
|
||||||
0x69, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69,
|
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18,
|
||||||
0x49, 0x64, 0x22, 0x23, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52,
|
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49,
|
||||||
0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x43, 0x0a, 0x15, 0x52, 0x74, 0x61,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
|
0x03, 0x62, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18,
|
||||||
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x5e,
|
||||||
|
0x0a, 0x0c, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c,
|
||||||
|
0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||||
|
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61,
|
||||||
|
0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18,
|
||||||
|
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x23,
|
||||||
|
0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||||
|
0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66,
|
||||||
|
0x6c, 0x61, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -682,7 +822,7 @@ func file_rtask_rtask_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_rtask_rtask_msg_proto_rawDescData
|
return file_rtask_rtask_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_rtask_rtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
var file_rtask_rtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||||
var file_rtask_rtask_msg_proto_goTypes = []interface{}{
|
var file_rtask_rtask_msg_proto_goTypes = []interface{}{
|
||||||
(*RtaskApplyReq)(nil), // 0: RtaskApplyReq
|
(*RtaskApplyReq)(nil), // 0: RtaskApplyReq
|
||||||
(*RtaskApplyResp)(nil), // 1: RtaskApplyResp
|
(*RtaskApplyResp)(nil), // 1: RtaskApplyResp
|
||||||
@ -693,8 +833,10 @@ var file_rtask_rtask_msg_proto_goTypes = []interface{}{
|
|||||||
(*RtaskFinishPush)(nil), // 6: RtaskFinishPush
|
(*RtaskFinishPush)(nil), // 6: RtaskFinishPush
|
||||||
(*RtaskGetRewardReq)(nil), // 7: RtaskGetRewardReq
|
(*RtaskGetRewardReq)(nil), // 7: RtaskGetRewardReq
|
||||||
(*RtaskGetRewardResp)(nil), // 8: RtaskGetRewardResp
|
(*RtaskGetRewardResp)(nil), // 8: RtaskGetRewardResp
|
||||||
(*RtaskTestReq)(nil), // 9: RtaskTestReq
|
(*RtaskBattleFinishReq)(nil), // 9: RtaskBattleFinishReq
|
||||||
(*RtaskTestResp)(nil), // 10: RtaskTestResp
|
(*RtaskBattleFinishResp)(nil), // 10: RtaskBattleFinishResp
|
||||||
|
(*RtaskTestReq)(nil), // 11: RtaskTestReq
|
||||||
|
(*RtaskTestResp)(nil), // 12: RtaskTestResp
|
||||||
}
|
}
|
||||||
var file_rtask_rtask_msg_proto_depIdxs = []int32{
|
var file_rtask_rtask_msg_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for method output_type
|
0, // [0:0] is the sub-list for method output_type
|
||||||
@ -819,7 +961,7 @@ func file_rtask_rtask_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_rtask_rtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
file_rtask_rtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*RtaskTestReq); i {
|
switch v := v.(*RtaskBattleFinishReq); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -831,6 +973,30 @@ func file_rtask_rtask_msg_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_rtask_rtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
file_rtask_rtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*RtaskBattleFinishResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rtask_rtask_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*RtaskTestReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rtask_rtask_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*RtaskTestResp); i {
|
switch v := v.(*RtaskTestResp); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -849,7 +1015,7 @@ func file_rtask_rtask_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_rtask_rtask_msg_proto_rawDesc,
|
RawDescriptor: file_rtask_rtask_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 11,
|
NumMessages: 13,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -627,8 +627,5 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
|||||||
if tables.Robot, err = NewGameRobot(buf) ; err != nil {
|
if tables.Robot, err = NewGameRobot(buf) ; err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if buf, err = loader("game_jumpview") ; err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return tables, nil
|
return tables, nil
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ type GameRdtaskChooseData struct {
|
|||||||
Id int32
|
Id int32
|
||||||
Num int32
|
Num int32
|
||||||
PreTid int32
|
PreTid int32
|
||||||
|
GotoLevel string
|
||||||
NeedItem []int32
|
NeedItem []int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ func (_v *GameRdtaskChooseData)Deserialize(_buf map[string]interface{}) (err err
|
|||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["num"].(float64); !_ok_ { err = errors.New("num error"); return }; _v.Num = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["num"].(float64); !_ok_ { err = errors.New("num error"); return }; _v.Num = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["preTid"].(float64); !_ok_ { err = errors.New("preTid error"); return }; _v.PreTid = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["preTid"].(float64); !_ok_ { err = errors.New("preTid error"); return }; _v.PreTid = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; if _v.GotoLevel, _ok_ = _buf["gotoLevel"].(string); !_ok_ { err = errors.New("gotoLevel error"); return } }
|
||||||
{
|
{
|
||||||
var _arr_ []interface{}
|
var _arr_ []interface{}
|
||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
|
Loading…
Reference in New Issue
Block a user