From 9507b8ceaab6bf8c406cceca6301cb7655827945 Mon Sep 17 00:00:00 2001
From: liwei <2211068034@qq.com>
Date: Fri, 28 Jul 2023 12:00:30 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/battle/configure.go | 19 +++++
modules/battle/modelBattle.go | 135 ++++++++++++----------------------
modules/battle/module.go | 81 +++++++++++++++++---
3 files changed, 136 insertions(+), 99 deletions(-)
diff --git a/modules/battle/configure.go b/modules/battle/configure.go
index 54ff3f637..5f859f9d8 100644
--- a/modules/battle/configure.go
+++ b/modules/battle/configure.go
@@ -63,6 +63,25 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
return
}
+func (this *configureComp) GetBattleReady(id int32) (conf *cfg.GameBattleReadyData, err error) {
+ var (
+ v interface{}
+ ok bool
+ )
+
+ if v, err = this.GetConfigure(game_battleready); err != nil {
+ this.module.Errorln(err)
+ return
+ } else {
+ if conf, ok = v.(*cfg.GameBattleReady).GetDataMap()[id]; !ok {
+ err = fmt.Errorf("not found:%d ", id)
+ this.module.Errorln(err)
+ return
+ }
+ }
+ return
+}
+
// 查询阵容表
func (this *configureComp) GetMonsterFormat(id int32) (result []*cfg.GameMonsterFormatData, err error) {
this.mformatlock.RLock()
diff --git a/modules/battle/modelBattle.go b/modules/battle/modelBattle.go
index 266ca4a92..2b24c68d5 100644
--- a/modules/battle/modelBattle.go
+++ b/modules/battle/modelBattle.go
@@ -43,7 +43,7 @@ func (this *modelBattleComp) queryrecord(oid string) (record *pb.DBBattleRecord,
}
// 创建pve 战斗记录
-func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattleEVEReq) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
+func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattleEVEReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
@@ -53,7 +53,7 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
RedCompId: session.GetUserId(),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Buleformat)),
- Tasks: make([]int32, 0),
+ Tasks: conf.BattleEvents,
}
var (
battletas *cfg.GameBattletasktestingData
@@ -88,13 +88,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
if record.Redflist[0].Team[i], errdata = this.createBattleRole(hero, tid, i); errdata != nil {
return
}
- // if buff != nil {
- // if conf, err := this.module.configure.GetHeroConfig(hero.HeroID); err == nil {
- // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
- // record.Redflist[0].Team[i].PandaBuff = buff.Buffid
- // }
- // }
- // }
} else {
record.Redflist[0].Team[i] = nil
}
@@ -142,48 +135,20 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
// }
}
}
- if req.Sysformat != nil && len(req.Sysformat) > 0 {
- for i, v := range req.Sysformat {
- if v == 0 {
- continue
- }
- if captain, masters, errdata = this.createMasterRoles(100, i, v); errdata != nil {
- return
- }
- record.Redflist[i].Systeam = masters
- if record.Redflist[i].Leadpos == -1 && captain != -1 {
- record.Redflist[i].Leadpos = captain
- }
- // if buff != nil {
- // for _, v := range masters {
- // if conf, err := this.module.configure.GetHeroConfig(v.HeroID); err == nil {
- // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
- // v.PandaBuff = buff.Buffid
- // }
- // }
- // }
- // }
+ if conf.DefaultHero != 0 {
+ if captain, masters, errdata = this.createMasterRoles(100, 0, conf.DefaultHero); errdata != nil {
+ return
+ }
+ record.Redflist[0].Systeam = masters
+ if record.Redflist[0].Leadpos == -1 && captain != -1 {
+ record.Redflist[0].Leadpos = captain
}
}
- if req.Backupformat != nil && len(req.Backupformat) > 0 {
- for i, v := range req.Backupformat {
- if v == 0 {
- continue
- }
- if captain, masters, errdata = this.createMasterRoles(100, i, v); errdata != nil {
- return
- }
- record.Redflist[i].Backupteam = masters
- // if buff != nil {
- // for _, v := range masters {
- // if conf, err := this.module.configure.GetHeroConfig(v.HeroID); err == nil {
- // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
- // v.PandaBuff = buff.Buffid
- // }
- // }
- // }
- // }
+ if conf.AssistTeam != 0 {
+ if captain, masters, errdata = this.createMasterRoles(100, 0, conf.AssistTeam); errdata != nil {
+ return
}
+ record.Redflist[0].Backupteam = masters
}
} else {
record.Redflist = make([]*pb.DBBattleFormt, len(req.Sysformat))
@@ -195,15 +160,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
Leadpos: captain,
Systeam: masters,
}
- // if buff != nil {
- // for _, v := range masters {
- // if conf, err := this.module.configure.GetHeroConfig(v.HeroID); err == nil {
- // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
- // v.PandaBuff = buff.Buffid
- // }
- // }
- // }
- // }
}
if req.Backupformat != nil && len(req.Backupformat) > 0 {
for i, v := range req.Backupformat {
@@ -211,15 +167,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
return
}
record.Redflist[i].Backupteam = masters
- // if buff != nil {
- // for _, v := range masters {
- // if conf, err := this.module.configure.GetHeroConfig(v.HeroID); err == nil {
- // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
- // v.PandaBuff = buff.Buffid
- // }
- // }
- // }
- // }
}
}
}
@@ -237,10 +184,11 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
}
// 创建pve 战斗记录
-func (this *modelBattleComp) createpve(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVEReq) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
+func (this *modelBattleComp) createpve(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVEReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
var (
- heros []*pb.DBHero = make([]*pb.DBHero, 5)
- // buff *cfg.GamePandamasBuffData
+ heros []*pb.DBHero = make([]*pb.DBHero, 5)
+ captain int32
+ masters []*pb.BattleRole
)
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
@@ -252,13 +200,13 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, conn *db.DBCon
Redflist: make([]*pb.DBBattleFormt, 1),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
+ Tasks: conf.BattleEvents,
}
record.Redflist[0] = &pb.DBBattleFormt{
Leadpos: req.Format.Leadpos,
Team: make([]*pb.BattleRole, len(req.Format.Format)),
}
model := db.NewDBModel(comm.TableHero, time.Hour, conn)
- // buff, _ = this.getGlobalBuff(session.GetUserId())
//自己的英雄阵营
for i, v := range req.Format.Format {
if v != "" {
@@ -274,13 +222,6 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, conn *db.DBCon
if record.Redflist[0].Team[i], errdata = this.createBattleRole(heros[i], tid, i); errdata != nil {
return
}
- // if buff != nil {
- // if conf, err := this.module.configure.GetHeroConfig(heros[i].HeroID); err == nil {
- // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
- // record.Redflist[0].Team[i].PandaBuff = buff.Buffid
- // }
- // }
- // }
} else {
record.Redflist[0].Team[i] = nil
}
@@ -327,17 +268,31 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, conn *db.DBCon
// }
}
}
- if ok := this.checkBattlereadyCapskill(req.Format.Leadpos, heros); !ok {
- errdata = &pb.ErrorData{
- Code: pb.ErrorCode_BattleCapskillCheckFailed,
- Title: pb.ErrorCode_BattleCapskillCheckFailed.ToString(),
+
+ if conf.DefaultHero != 0 {
+ if captain, masters, errdata = this.createMasterRoles(100, 0, conf.DefaultHero); errdata != nil {
+ return
+ }
+ record.Redflist[0].Systeam = masters
+ if record.Redflist[0].Leadpos == -1 && captain != -1 {
+ record.Redflist[0].Leadpos = captain
}
- return
}
- var (
- captain int32
- masters []*pb.BattleRole
- )
+ if conf.AssistTeam != 0 {
+ if captain, masters, errdata = this.createMasterRoles(100, 0, conf.AssistTeam); errdata != nil {
+ return
+ }
+ record.Redflist[0].Backupteam = masters
+ }
+ //队长级 弃用
+ // if ok := this.checkBattlereadyCapskill(req.Format.Leadpos, heros); !ok {
+ // errdata = &pb.ErrorData{
+ // Code: pb.ErrorCode_BattleCapskillCheckFailed,
+ // Title: pb.ErrorCode_BattleCapskillCheckFailed.ToString(),
+ // }
+ // return
+ // }
+
for i, v := range req.Mformat {
if captain, masters, errdata = this.createMasterRoles(200, i, v); errdata != nil {
return
@@ -351,7 +306,7 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, conn *db.DBCon
}
// 创建pve 战斗记录
-func (this *modelBattleComp) createpvb(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVBReq) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
+func (this *modelBattleComp) createpvb(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVBReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
var (
// buff *cfg.GamePandamasBuffData
)
@@ -468,7 +423,7 @@ func (this *modelBattleComp) createpvb(session comm.IUserSession, conn *db.DBCon
}
// 创建pvp 战斗请求
-func (this *modelBattleComp) createpvp(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVPReq) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
+func (this *modelBattleComp) createpvp(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVPReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
@@ -529,7 +484,7 @@ func (this *modelBattleComp) createpvp(session comm.IUserSession, conn *db.DBCon
}
// 创建pvp 战斗请求
-func (this *modelBattleComp) creatertpvp(redmodel, bluemodel *db.DBModel, btype pb.BattleType, req *pb.BattleRTPVPReq) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
+func (this *modelBattleComp) creatertpvp(redmodel, bluemodel *db.DBModel, btype pb.BattleType, req *pb.BattleRTPVPReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
record = &pb.DBBattleRecord{
Id: primitive.NewObjectID().Hex(),
Title: req.Title,
@@ -609,7 +564,7 @@ func (this *modelBattleComp) creatertpvp(redmodel, bluemodel *db.DBModel, btype
}
// 创建pve 战斗记录
-func (this *modelBattleComp) createlpve(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattleLPVEReq) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
+func (this *modelBattleComp) createlpve(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattleLPVEReq, conf *cfg.GameBattleReadyData) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
var (
heros []*pb.DBHero = make([]*pb.DBHero, 5)
// buff *cfg.GamePandamasBuffData
diff --git a/modules/battle/module.go b/modules/battle/module.go
index 5bbaeb01e..e10ab3f6b 100644
--- a/modules/battle/module.go
+++ b/modules/battle/module.go
@@ -8,6 +8,7 @@ import (
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
+ cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/sys/db"
"time"
)
@@ -96,6 +97,7 @@ func (this *Battle) QueryBattleRecord(oid string) (errdata *pb.ErrorData, record
// 创建pve战斗
func (this *Battle) CreateEveBattle(session comm.IUserSession, req *pb.BattleEVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
conn *db.DBConn
err error
)
@@ -114,7 +116,16 @@ func (this *Battle) CreateEveBattle(session comm.IUserSession, req *pb.BattleEVE
return
}
- if record, errdata = this.modelBattle.createeve(session, conn, pb.BattleType_eve, req); errdata != nil {
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+
+ if record, errdata = this.modelBattle.createeve(session, conn, pb.BattleType_eve, req, conf); errdata != nil {
return
}
return
@@ -123,6 +134,7 @@ func (this *Battle) CreateEveBattle(session comm.IUserSession, req *pb.BattleEVE
// 创建pve战斗
func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
conn *db.DBConn
err error
)
@@ -140,6 +152,14 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
this.Errorf("session:%v err:", session, err)
return
}
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
if req.Format == nil || req.Format.Format == nil || len(req.Format.Format) != 5 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
@@ -157,13 +177,12 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
for _, v := range req.Format.Friendformat {
if v != "" {
flag = true
- // this.ModuleBuried.SendToRtask(session, comm.Rtype108, 1)
go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype108, 1))
break
}
}
- if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req); errdata != nil {
+ if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req, conf); errdata != nil {
return
}
if flag {
@@ -175,6 +194,7 @@ func (this *Battle) CreatePveBattle(session comm.IUserSession, req *pb.BattlePVE
// 创建pve战斗
func (this *Battle) CreatePvbBattle(session comm.IUserSession, req *pb.BattlePVBReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
conn *db.DBConn
err error
)
@@ -199,7 +219,15 @@ func (this *Battle) CreatePvbBattle(session comm.IUserSession, req *pb.BattlePVB
}
return
}
- if record, errdata = this.modelBattle.createpvb(session, conn, pb.BattleType_pvb, req); errdata != nil {
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+ if record, errdata = this.modelBattle.createpvb(session, conn, pb.BattleType_pvb, req, conf); errdata != nil {
return
}
return
@@ -208,6 +236,7 @@ func (this *Battle) CreatePvbBattle(session comm.IUserSession, req *pb.BattlePVB
// 创建pve战斗
func (this *Battle) CreatePvpBattle(session comm.IUserSession, req *pb.BattlePVPReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
conn *db.DBConn
err error
)
@@ -225,7 +254,15 @@ func (this *Battle) CreatePvpBattle(session comm.IUserSession, req *pb.BattlePVP
this.Errorf("session:%v err:", session, err)
return
}
- if record, errdata = this.modelBattle.createpvp(session, conn, pb.BattleType_pvp, req); errdata != nil {
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+ if record, errdata = this.modelBattle.createpvp(session, conn, pb.BattleType_pvp, req, conf); errdata != nil {
return
}
return
@@ -234,6 +271,7 @@ func (this *Battle) CreatePvpBattle(session comm.IUserSession, req *pb.BattlePVP
// 只有跨服环境下才可使用
func (this *Battle) CreateRtPvpBattle(req *pb.BattleRTPVPReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
redmodel *db.DBModel
bluemodel *db.DBModel
err error
@@ -261,7 +299,15 @@ func (this *Battle) CreateRtPvpBattle(req *pb.BattleRTPVPReq) (errdata *pb.Error
}
return
}
- if record, errdata = this.modelBattle.creatertpvp(redmodel, bluemodel, pb.BattleType_rtpvp, req); errdata != nil {
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+ if record, errdata = this.modelBattle.creatertpvp(redmodel, bluemodel, pb.BattleType_rtpvp, req, conf); errdata != nil {
return
}
return
@@ -270,6 +316,7 @@ func (this *Battle) CreateRtPvpBattle(req *pb.BattleRTPVPReq) (errdata *pb.Error
// 创建连续战斗
func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLPVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
conn *db.DBConn
err error
)
@@ -309,8 +356,15 @@ func (this *Battle) CreateLPVEBattle(session comm.IUserSession, req *pb.BattleLP
break
}
}
-
- if record, errdata = this.modelBattle.createlpve(session, conn, pb.BattleType_lpev, req); errdata != nil {
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+ if record, errdata = this.modelBattle.createlpve(session, conn, pb.BattleType_lpev, req, conf); errdata != nil {
return
}
if flag {
@@ -474,6 +528,7 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
// 创建石阵秘境战斗
func (this *Battle) CreateStoneBattle(session comm.IUserSession, req *pb.BattlePVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
var (
+ conf *cfg.GameBattleReadyData
conn *db.DBConn
err error
)
@@ -504,6 +559,14 @@ func (this *Battle) CreateStoneBattle(session comm.IUserSession, req *pb.BattleP
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
var flag bool
for _, v := range req.Format.Friendformat {
if v != "" {
@@ -514,7 +577,7 @@ func (this *Battle) CreateStoneBattle(session comm.IUserSession, req *pb.BattleP
}
}
- if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req); errdata != nil {
+ if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req, conf); errdata != nil {
return
}
if flag {
From 8c8c670279b4a3c20bd752b046e56f88d1ca84ad Mon Sep 17 00:00:00 2001
From: liwei <2211068034@qq.com>
Date: Fri, 28 Jul 2023 14:13:12 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/battle/module.go | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/battle/module.go b/modules/battle/module.go
index bba29df14..01ba17d16 100644
--- a/modules/battle/module.go
+++ b/modules/battle/module.go
@@ -553,7 +553,14 @@ func (this *Battle) CreateStoneBattle(session comm.IUserSession, req *pb.BattleP
}
return
}
-
+ if conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req, conf); errdata != nil {
return
}
From c852f93d64b9e963e36458deabfb3742e4f7c45e Mon Sep 17 00:00:00 2001
From: liwei <2211068034@qq.com>
Date: Fri, 28 Jul 2023 14:19:52 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=88=98=E6=96=97?=
=?UTF-8?q?=E5=8D=8F=E8=AE=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/academy/api_challenge.go | 5 +++--
modules/academy/api_teaching.go | 5 +++--
modules/arena/api_challenge.go | 5 +++--
modules/arena/api_plot.go | 5 +++--
modules/combat/api_challenge.go | 5 +++--
modules/enchant/api_challenge.go | 5 +++--
modules/guildgve/api_challenge.go | 1 +
modules/hunting/api_challenge.go | 5 +++--
modules/mainline/api_challenge.go | 1 +
modules/mline/api_challenge.go | 5 +++--
modules/moonfantasy/api_battle.go | 1 +
modules/pagoda/api_challenge.go | 5 +++--
modules/pagoda/api_racechallenge.go | 5 +++--
modules/practice/api_npcbattkle.go | 5 +++--
modules/pvp/module.go | 25 +++++++++++++------------
modules/viking/api_challenge.go | 5 +++--
modules/worldtask/api_battlestart.go | 1 +
modules/wtask/api_battlestart.go | 1 +
18 files changed, 54 insertions(+), 36 deletions(-)
diff --git a/modules/academy/api_challenge.go b/modules/academy/api_challenge.go
index 5a335b2b7..466155b28 100644
--- a/modules/academy/api_challenge.go
+++ b/modules/academy/api_challenge.go
@@ -6,13 +6,13 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.AcademyChallengeReq) (errdata *pb.ErrorData) {
return
}
-///挑战
+// /挑战
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.AcademyChallengeReq) (errdata *pb.ErrorData) {
var (
level *cfg.GameTeachingData
@@ -30,6 +30,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.AcademyChallen
return
}
if errdata, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{
+ Rulesid: level.Battleready,
Ptype: pb.PlayType_academy,
Format: nil,
Sysformat: level.UsFormatList,
diff --git a/modules/academy/api_teaching.go b/modules/academy/api_teaching.go
index 1000b453b..f4cc2dd34 100644
--- a/modules/academy/api_teaching.go
+++ b/modules/academy/api_teaching.go
@@ -6,13 +6,13 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) TeachingCheck(session comm.IUserSession, req *pb.AcademyTeachingReq) (errdata *pb.ErrorData) {
return
}
-///挑战
+// /挑战
func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeachingReq) (errdata *pb.ErrorData) {
var (
level *cfg.GameHeroStrategyData
@@ -32,6 +32,7 @@ func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeaching
return
}
if errdata, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{
+ Rulesid: level.Battleready,
Ptype: pb.PlayType_heroteaching,
Format: nil,
Sysformat: level.UsFormatList,
diff --git a/modules/arena/api_challenge.go b/modules/arena/api_challenge.go
index 01585a46e..53766bd9e 100644
--- a/modules/arena/api_challenge.go
+++ b/modules/arena/api_challenge.go
@@ -6,7 +6,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.ArenaChallengeReq) (errdata *pb.ErrorData) {
if (!req.Isai && req.Playerid == "") || (req.Isai && req.MformatId == 0) || req.Battle.Format == nil || len(req.Battle.Format) != 5 {
errdata = &pb.ErrorData{
@@ -17,7 +17,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.ArenaChal
return
}
-///挑战
+// /挑战
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallengeReq) (errdata *pb.ErrorData) {
var (
red *pb.DBArenaUser
@@ -116,6 +116,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
return
}
if errdata, record = this.module.battle.CreatePvpBattle(session, &pb.BattlePVPReq{
+ Rulesid: 105,
Ptype: pb.PlayType_arena,
Redformat: &pb.PVPFormation{Uid: red.Uid, Leadpos: red.Attack.Leadpos, Format: red.Attack.Formt},
Buleformat: &pb.PVPFormation{Uid: bule.Uid, Leadpos: bule.Defend.Leadpos, Format: bule.Defend.Formt},
diff --git a/modules/arena/api_plot.go b/modules/arena/api_plot.go
index 3e54cf776..81330d609 100644
--- a/modules/arena/api_plot.go
+++ b/modules/arena/api_plot.go
@@ -8,13 +8,13 @@ import (
"time"
)
-//参数校验
+// 参数校验
func (this *apiComp) PlotCheck(session comm.IUserSession, req *pb.ArenaPlotReq) (errdata *pb.ErrorData) {
return
}
-///获取自己的排行榜信息
+// /获取自己的排行榜信息
func (this *apiComp) Plot(session comm.IUserSession, req *pb.ArenaPlotReq) (errdata *pb.ErrorData) {
var (
npc *cfg.GameArenaChallengeNpcData
@@ -59,6 +59,7 @@ func (this *apiComp) Plot(session comm.IUserSession, req *pb.ArenaPlotReq) (errd
index = ndata.Index
}
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: npc.BattleReadyID,
Ptype: pb.PlayType_arena,
Format: req.Battle,
Mformat: []int32{npc.MonsterformatId[index]},
diff --git a/modules/combat/api_challenge.go b/modules/combat/api_challenge.go
index b0c68b0a5..02e90c95e 100644
--- a/modules/combat/api_challenge.go
+++ b/modules/combat/api_challenge.go
@@ -6,13 +6,13 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.CombatChallengeReq) (errdata *pb.ErrorData) {
return
}
-///挑战
+// /挑战
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.CombatChallengeReq) (errdata *pb.ErrorData) {
var (
manster *cfg.GameCombatMansterData
@@ -32,6 +32,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.CombatChalleng
return
}
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: manster.BattleReadyID,
Ptype: pb.PlayType_combat,
Format: req.Battle,
Mformat: manster.FormatList,
diff --git a/modules/enchant/api_challenge.go b/modules/enchant/api_challenge.go
index 0b8994287..0607f590c 100644
--- a/modules/enchant/api_challenge.go
+++ b/modules/enchant/api_challenge.go
@@ -6,7 +6,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.EnchantChallengeReq) (errdata *pb.ErrorData) {
if req.BossType <= 0 || req.Battle == nil {
errdata = &pb.ErrorData{
@@ -18,7 +18,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.EnchantCh
return
}
-///挑战主线关卡
+// /挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallengeReq) (errdata *pb.ErrorData) {
errdata = this.ChallengeCheck(session, req)
@@ -70,6 +70,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
}
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: battleconf.BattleReadyID,
Ptype: pb.PlayType_enchant,
Title: "",
Format: req.Battle,
diff --git a/modules/guildgve/api_challenge.go b/modules/guildgve/api_challenge.go
index aa4e9c636..942c40389 100644
--- a/modules/guildgve/api_challenge.go
+++ b/modules/guildgve/api_challenge.go
@@ -69,6 +69,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.GuildGveChalle
// }
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: conf.BattleReadyID,
Ptype: pb.PlayType_moonfantasy,
Format: req.Battle,
Mformat: conf.Boss,
diff --git a/modules/hunting/api_challenge.go b/modules/hunting/api_challenge.go
index 6a5a90346..86cce3ce5 100644
--- a/modules/hunting/api_challenge.go
+++ b/modules/hunting/api_challenge.go
@@ -7,7 +7,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.HuntingChallengeReq) (errdata *pb.ErrorData) {
if req.BossType <= 0 && req.Difficulty > 0 || req.Battle == nil {
errdata = &pb.ErrorData{
@@ -19,7 +19,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.HuntingCh
return
}
-///挑战主线关卡
+// /挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallengeReq) (errdata *pb.ErrorData) {
var (
ps int32
@@ -101,6 +101,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: cfgData.BattleReadyID,
Ptype: pb.PlayType_hunting,
Title: "",
Format: req.Battle,
diff --git a/modules/mainline/api_challenge.go b/modules/mainline/api_challenge.go
index 42d7820b2..2e97fbdcf 100644
--- a/modules/mainline/api_challenge.go
+++ b/modules/mainline/api_challenge.go
@@ -78,6 +78,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: conf.BattleReadyID,
Ptype: pb.PlayType_mainline,
Title: "",
Format: req.Battle,
diff --git a/modules/mline/api_challenge.go b/modules/mline/api_challenge.go
index b88a7fce2..3e0be6489 100644
--- a/modules/mline/api_challenge.go
+++ b/modules/mline/api_challenge.go
@@ -8,7 +8,7 @@ import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MlineChallengeReq) (errdata *pb.ErrorData) {
if req.StageId == 0 {
errdata = &pb.ErrorData{
@@ -19,7 +19,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MlineChal
return
}
-///挑战主线关卡
+// /挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MlineChallengeReq) (errdata *pb.ErrorData) {
var (
curChapter *pb.DBMline // 当前章节信息
@@ -118,6 +118,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MlineChallenge
}
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: stageConf.BattleReadyID,
Ptype: pb.PlayType_mainline,
Title: "",
Format: req.Battle,
diff --git a/modules/moonfantasy/api_battle.go b/modules/moonfantasy/api_battle.go
index db02620d8..cdfb5c04e 100644
--- a/modules/moonfantasy/api_battle.go
+++ b/modules/moonfantasy/api_battle.go
@@ -107,6 +107,7 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.MoonfantasyBattle
}
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: boss.BattleReadyID,
Ptype: pb.PlayType_moonfantasy,
Format: req.Battle,
Mformat: boss.Monsterformatid,
diff --git a/modules/pagoda/api_challenge.go b/modules/pagoda/api_challenge.go
index abba8ed13..63672d91b 100644
--- a/modules/pagoda/api_challenge.go
+++ b/modules/pagoda/api_challenge.go
@@ -5,7 +5,7 @@ import (
"go_dreamfactory/pb"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.PagodaChallengeReq) (errdata *pb.ErrorData) {
if req.Cid <= 0 {
errdata = &pb.ErrorData{
@@ -17,7 +17,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.PagodaCha
return
}
-///挑战主线关卡
+// /挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChallengeReq) (errdata *pb.ErrorData) {
var (
pagoda *pb.DBPagoda
@@ -77,6 +77,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
}
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: conf.BattleReadyID,
Ptype: pb.PlayType_pagoda,
Title: "",
Format: req.Battle,
diff --git a/modules/pagoda/api_racechallenge.go b/modules/pagoda/api_racechallenge.go
index 2905581e6..21a74e7fc 100644
--- a/modules/pagoda/api_racechallenge.go
+++ b/modules/pagoda/api_racechallenge.go
@@ -6,7 +6,7 @@ import (
"go_dreamfactory/sys/configure"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeRaceCheck(session comm.IUserSession, req *pb.PagodaChallengeRaceReq) (errdata *pb.ErrorData) {
if req.Cid <= 0 {
errdata = &pb.ErrorData{
@@ -18,7 +18,7 @@ func (this *apiComp) ChallengeRaceCheck(session comm.IUserSession, req *pb.Pagod
return
}
-///阵营塔开始挑战
+// /阵营塔开始挑战
func (this *apiComp) ChallengeRace(session comm.IUserSession, req *pb.PagodaChallengeRaceReq) (errdata *pb.ErrorData) {
var (
pagoda *pb.DBPagodaRace
@@ -114,6 +114,7 @@ func (this *apiComp) ChallengeRace(session comm.IUserSession, req *pb.PagodaChal
pType = pb.PlayType_race
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: conf.BattlereadyID,
Ptype: pType,
Title: "",
Format: req.Battle,
diff --git a/modules/practice/api_npcbattkle.go b/modules/practice/api_npcbattkle.go
index b6d67cd9d..b9e2621e0 100644
--- a/modules/practice/api_npcbattkle.go
+++ b/modules/practice/api_npcbattkle.go
@@ -5,13 +5,13 @@ import (
"go_dreamfactory/pb"
)
-//参数校验
+// 参数校验
func (this *apiComp) NPCBattkleCheck(session comm.IUserSession, req *pb.PracticeNPCBattkleReq) (errdata *pb.ErrorData) {
return
}
-///npc 战斗请求
+// /npc 战斗请求
func (this *apiComp) NPCBattkle(session comm.IUserSession, req *pb.PracticeNPCBattkleReq) (errdata *pb.ErrorData) {
var (
err error
@@ -28,6 +28,7 @@ func (this *apiComp) NPCBattkle(session comm.IUserSession, req *pb.PracticeNPCBa
}
if errdata, record = this.module.battle.CreateLPVEBattle(session, &pb.BattleLPVEReq{
+ Rulesid: 111,
Ptype: pb.PlayType_practicenpc,
Format: req.Formation,
Monsterleadpos: room.Captain,
diff --git a/modules/pvp/module.go b/modules/pvp/module.go
index 76ac97a49..403a274b1 100644
--- a/modules/pvp/module.go
+++ b/modules/pvp/module.go
@@ -39,12 +39,12 @@ type Pvp struct {
battles map[string]*BattleItem
}
-//模块名
+// 模块名
func (this *Pvp) GetType() core.M_Modules {
return comm.ModulePvp
}
-//模块初始化接口 注册用户创建角色事件
+// 模块初始化接口 注册用户创建角色事件
func (this *Pvp) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
this.battles = make(map[string]*BattleItem)
err = this.ModuleBase.Init(service, module, options)
@@ -68,7 +68,7 @@ func (this *Pvp) Start() (err error) {
return
}
-//装备组件
+// 装备组件
func (this *Pvp) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.apicomp = this.RegisterComp(new(apiComp)).(*apiComp)
@@ -80,7 +80,7 @@ func (this *Pvp) QueryBattle(id string) (battle *pb.DBPvpBattle, err error) {
return
}
-//创建Pvp
+// 创建Pvp
func (this *Pvp) CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleId string, errdata *pb.ErrorData) {
this.Debug("CreatePvp", log.Field{Key: "ptype", Value: ptype.String()}, log.Field{Key: "red", Value: red.String()}, log.Field{Key: "blue", Value: blue.String()})
var (
@@ -132,7 +132,7 @@ func (this *Pvp) CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleI
return
}
-//推送战斗输出指令
+// 推送战斗输出指令
func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) {
this.Debug("PvpOutCmdPush", log.Field{Key: "args", Value: out})
var (
@@ -195,7 +195,7 @@ func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) {
}
}
-//推送战斗结束
+// 推送战斗结束
func (this *Pvp) PvpFinishPush(out *pb.BattleFinishPush) {
var (
battle *BattleItem
@@ -225,7 +225,7 @@ func (this *Pvp) PvpFinishPush(out *pb.BattleFinishPush) {
}
}
-//准备超时 取消战斗
+// 准备超时 取消战斗
func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) {
this.Debug("readyTimeOut", log.Field{Key: "args", Value: args})
var (
@@ -268,7 +268,7 @@ func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) {
}
}
-//操作倒计时
+// 操作倒计时
func (this *Pvp) operateTimeOut(task *timewheel.Task, args ...interface{}) {
this.Debug("operateTimeOut", log.Field{Key: "args", Value: args})
var (
@@ -299,7 +299,7 @@ func (this *Pvp) operateTimeOut(task *timewheel.Task, args ...interface{}) {
}
}
-//开始战斗
+// 开始战斗
func (this *Pvp) startBattle(battle *BattleItem) {
this.Debug("PVPStart", log.Field{Key: "battleId", Value: battle.Id})
var (
@@ -309,6 +309,7 @@ func (this *Pvp) startBattle(battle *BattleItem) {
err error
)
if errdata, record = this.battle.CreateRtPvpBattle(&pb.BattleRTPVPReq{
+ Rulesid: 111,
Ptype: pb.PlayType_friendsmeet,
Title: "",
RedCompId: battle.Red.Uid,
@@ -368,7 +369,7 @@ func (this *Pvp) startBattle(battle *BattleItem) {
}
}
-//用户离线处理 弃用
+// 用户离线处理 弃用
func (this *Pvp) userlogin(session comm.IUserSession) {
// var (
// result []*pb.DBPvpBattle
@@ -407,7 +408,7 @@ func (this *Pvp) userlogin(session comm.IUserSession) {
// this.Debug("GetPvpInfo", log.Field{Key: "uid", Value: session.GetSessionId()}, log.Field{Key: "list", Value: push.String()})
}
-//用户离线处理
+// 用户离线处理
func (this *Pvp) useroffline(uid, sessionid string) {
var (
result []*pb.DBPvpBattle
@@ -448,7 +449,7 @@ func (this *Pvp) useroffline(uid, sessionid string) {
}
-//托管
+// 托管
func (this *Pvp) trusteeship(ctx context.Context, req *pb.RPC_PVPTrusteeshipReq, resp *pb.RPC_PVPTrusteeshipResp) (err error) {
var (
battle *BattleItem
diff --git a/modules/viking/api_challenge.go b/modules/viking/api_challenge.go
index 938a19826..d9c335fb4 100644
--- a/modules/viking/api_challenge.go
+++ b/modules/viking/api_challenge.go
@@ -6,7 +6,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
-//参数校验
+// 参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.VikingChallengeReq) (errdata *pb.ErrorData) {
if req.BossId <= 0 && req.Difficulty > 0 || req.Battle == nil {
errdata = &pb.ErrorData{
@@ -18,7 +18,7 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.VikingCha
return
}
-///挑战主线关卡
+// /挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChallengeReq) (errdata *pb.ErrorData) {
var (
ps int32
@@ -97,6 +97,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: cfgData.BattleReadyID,
Ptype: pb.PlayType_viking,
Title: "",
Format: req.Battle,
diff --git a/modules/worldtask/api_battlestart.go b/modules/worldtask/api_battlestart.go
index 052ee021b..e13f80383 100644
--- a/modules/worldtask/api_battlestart.go
+++ b/modules/worldtask/api_battlestart.go
@@ -53,6 +53,7 @@ func (this *apiComp) Battlestart(session comm.IUserSession, req *pb.WorldtaskBat
record *pb.DBBattleRecord
)
errdata, record = b.CreateEveBattle(session, &pb.BattleEVEReq{
+ Rulesid: battleConf.BattleReadyID,
Ptype: pb.PlayType_rtask,
Format: req.Battle,
Buleformat: battleConf.FormatList,
diff --git a/modules/wtask/api_battlestart.go b/modules/wtask/api_battlestart.go
index aa3aa625f..8f2215668 100644
--- a/modules/wtask/api_battlestart.go
+++ b/modules/wtask/api_battlestart.go
@@ -41,6 +41,7 @@ func (this *apiComp) BattleStart(session comm.IUserSession, req *pb.WTaskBattleS
}
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: battleConf.BattleReadyID,
Ptype: pb.PlayType_moonfantasy,
Format: req.Battle,
Mformat: battleConf.FormatList,
From 1b06e0af29bf614c148b804a95c04b79528dd671 Mon Sep 17 00:00:00 2001
From: liwei <2211068034@qq.com>
Date: Fri, 28 Jul 2023 15:30:48 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=8D=E5=90=88?=
=?UTF-8?q?=E8=B0=83=E6=9F=A5=E4=BB=BB=E5=8A=A1=E7=9B=B8=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bin/json/game_buriedtype.json | 7 +
bin/json/game_mainstage.json | 98 +++-
bin/json/game_trendchose.json | 20 +-
bin/json/game_worldrd.json | 158 +++++++
bin/json/game_worldtask.json | 2 +-
modules/wtask/api_battleevent.go | 69 +++
modules/wtask/api_eventcomplete.go | 99 ++++
modules/wtask/api_eventtarget.go | 62 +++
modules/wtask/configure.go | 61 +++
modules/wtask/modelWTask.go | 1 +
pb/battle_db.pb.go | 391 ++++++----------
pb/wtask_db.pb.go | 102 ++--
pb/wtask_msg.pb.go | 542 ++++++++++++++++++++--
sys/configure/structs/Game.WorldRd.go | 42 ++
sys/configure/structs/Game.WorldRdData.go | 62 +++
sys/configure/structs/Tables.go | 7 +
16 files changed, 1371 insertions(+), 352 deletions(-)
create mode 100644 bin/json/game_worldrd.json
create mode 100644 modules/wtask/api_battleevent.go
create mode 100644 modules/wtask/api_eventcomplete.go
create mode 100644 modules/wtask/api_eventtarget.go
create mode 100644 sys/configure/structs/Game.WorldRd.go
create mode 100644 sys/configure/structs/Game.WorldRdData.go
diff --git a/bin/json/game_buriedtype.json b/bin/json/game_buriedtype.json
index 83ebdbaf4..992a4a81d 100644
--- a/bin/json/game_buriedtype.json
+++ b/bin/json/game_buriedtype.json
@@ -1175,5 +1175,12 @@
"id": 206,
"insert": 2,
"filter": []
+ },
+ {
+ "id": 207,
+ "insert": 1,
+ "filter": [
+ "eq"
+ ]
}
]
\ No newline at end of file
diff --git a/bin/json/game_mainstage.json b/bin/json/game_mainstage.json
index 9541de95b..a4c07dae0 100644
--- a/bin/json/game_mainstage.json
+++ b/bin/json/game_mainstage.json
@@ -1,4 +1,58 @@
[
+ {
+ "id": 1100100,
+ "chapterid": 11001,
+ "group_id": 100100,
+ "previous_group_id": [],
+ "previoustage": 0,
+ "Episodetype": 0,
+ "openlevel": 1,
+ "EditorStage": 0,
+ "venturemodel": "",
+ "venturetype": 0,
+ "ventureavatar": [],
+ "herocolor": 0,
+ "heroimg": "",
+ "bubbletext": {
+ "key": "",
+ "text": ""
+ },
+ "animation": "",
+ "hide": 0,
+ "destroy": 1,
+ "progress": 0,
+ "frontstoryid": 0,
+ "afterstoryid": 0,
+ "maingroupName": {
+ "key": "",
+ "text": ""
+ },
+ "mainlineName": {
+ "key": "",
+ "text": ""
+ },
+ "title": {
+ "key": "",
+ "text": ""
+ },
+ "desc": {
+ "key": "",
+ "text": ""
+ },
+ "exp": 0,
+ "hero_exp": 0,
+ "ps_consume": [],
+ "ps_mg": [],
+ "firstaward": [],
+ "lotteryward": 0,
+ "commonaward": [],
+ "BattleReadyID": 0,
+ "FormatList": [],
+ "star": [],
+ "star_type": [],
+ "star_value": [],
+ "challengeward": 0
+ },
{
"id": 1100101,
"chapterid": 11001,
@@ -9,8 +63,12 @@
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
- "venturetype": 0,
- "ventureavatar": [],
+ "venturetype": 1,
+ "ventureavatar": [
+ "Person/34004/34004_exhibition.prefab",
+ "Person/44005/44005_exhibition.prefab",
+ "Person/45003/45003_exhibition.prefab"
+ ],
"herocolor": 1,
"heroimg": "zxgq_js_34004",
"bubbletext": {
@@ -5887,7 +5945,7 @@
100123
],
"previoustage": 0,
- "Episodetype": 2,
+ "Episodetype": 5,
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
@@ -6314,7 +6372,7 @@
],
"BattleReadyID": 118,
"FormatList": [
- 101071
+ 104081
],
"star": [
1,
@@ -6440,10 +6498,10 @@
{
"id": 1100202,
"chapterid": 11002,
- "group_id": 0,
+ "group_id": 100202,
"previous_group_id": [],
"previoustage": 1100202,
- "Episodetype": 1,
+ "Episodetype": 4,
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
@@ -6542,10 +6600,10 @@
{
"id": 1100203,
"chapterid": 11002,
- "group_id": 0,
+ "group_id": 100202,
"previous_group_id": [],
"previoustage": 1100203,
- "Episodetype": 1,
+ "Episodetype": 4,
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
@@ -6644,7 +6702,7 @@
{
"id": 1100204,
"chapterid": 11002,
- "group_id": 0,
+ "group_id": 100203,
"previous_group_id": [],
"previoustage": 1100204,
"Episodetype": 1,
@@ -6746,7 +6804,7 @@
{
"id": 1100205,
"chapterid": 11002,
- "group_id": 0,
+ "group_id": 100204,
"previous_group_id": [],
"previoustage": 1100205,
"Episodetype": 1,
@@ -6848,10 +6906,10 @@
{
"id": 1100206,
"chapterid": 11002,
- "group_id": 0,
+ "group_id": 100205,
"previous_group_id": [],
"previoustage": 1100206,
- "Episodetype": 1,
+ "Episodetype": 5,
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
@@ -6950,7 +7008,7 @@
{
"id": 1100207,
"chapterid": 11002,
- "group_id": 0,
+ "group_id": 100206,
"previous_group_id": [],
"previoustage": 1100207,
"Episodetype": 1,
@@ -7052,7 +7110,7 @@
{
"id": 1100208,
"chapterid": 11003,
- "group_id": 0,
+ "group_id": 100207,
"previous_group_id": [],
"previoustage": 1100208,
"Episodetype": 1,
@@ -7154,7 +7212,7 @@
{
"id": 1100209,
"chapterid": 11003,
- "group_id": 0,
+ "group_id": 100208,
"previous_group_id": [],
"previoustage": 1100301,
"Episodetype": 1,
@@ -7256,10 +7314,10 @@
{
"id": 1100210,
"chapterid": 11003,
- "group_id": 0,
+ "group_id": 100209,
"previous_group_id": [],
"previoustage": 1100302,
- "Episodetype": 1,
+ "Episodetype": 6,
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
@@ -7358,7 +7416,7 @@
{
"id": 1100211,
"chapterid": 11003,
- "group_id": 0,
+ "group_id": 100210,
"previous_group_id": [],
"previoustage": 1100303,
"Episodetype": 1,
@@ -7460,10 +7518,10 @@
{
"id": 1100212,
"chapterid": 11003,
- "group_id": 0,
+ "group_id": 100211,
"previous_group_id": [],
"previoustage": 1100304,
- "Episodetype": 1,
+ "Episodetype": 7,
"openlevel": 1,
"EditorStage": 0,
"venturemodel": "",
diff --git a/bin/json/game_trendchose.json b/bin/json/game_trendchose.json
index d34e84213..76cfdc061 100644
--- a/bin/json/game_trendchose.json
+++ b/bin/json/game_trendchose.json
@@ -175,8 +175,8 @@
},
"chosetype": 2,
"chosenum": 0,
- "startstory": 50020010,
- "constory": 50020030,
+ "startstory": 10000010,
+ "constory": 10000020,
"get": [
1001
],
@@ -200,8 +200,8 @@
},
"chosetype": 2,
"chosenum": 0,
- "startstory": 50020010,
- "constory": 50020030,
+ "startstory": 10000010,
+ "constory": 10000020,
"get": [
1001
],
@@ -225,8 +225,8 @@
},
"chosetype": 2,
"chosenum": 0,
- "startstory": 50020010,
- "constory": 50020030,
+ "startstory": 10000010,
+ "constory": 10000020,
"get": [
1001
],
@@ -250,8 +250,8 @@
},
"chosetype": 2,
"chosenum": 0,
- "startstory": 50020010,
- "constory": 50020030,
+ "startstory": 10000010,
+ "constory": 10000020,
"get": [
1001
],
@@ -275,8 +275,8 @@
},
"chosetype": 2,
"chosenum": 0,
- "startstory": 50020010,
- "constory": 50020030,
+ "startstory": 10000010,
+ "constory": 10000020,
"get": [
1001
],
diff --git a/bin/json/game_worldrd.json b/bin/json/game_worldrd.json
new file mode 100644
index 000000000..6f997ef8e
--- /dev/null
+++ b/bin/json/game_worldrd.json
@@ -0,0 +1,158 @@
+[
+ {
+ "id": 1,
+ "group": 1001,
+ "eventname": {
+ "key": "eventname_1",
+ "text": "无事发生"
+ },
+ "eventweight": 1000,
+ "eventtype": 0,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 2,
+ "group": 1001,
+ "eventname": {
+ "key": "eventname_2",
+ "text": "打怪"
+ },
+ "eventweight": 1000,
+ "eventtype": 1,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 3,
+ "group": 1001,
+ "eventname": {
+ "key": "eventname_3",
+ "text": "打怪"
+ },
+ "eventweight": 1000,
+ "eventtype": 1,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 4,
+ "group": 1001,
+ "eventname": {
+ "key": "eventname_4",
+ "text": "打怪"
+ },
+ "eventweight": 1000,
+ "eventtype": 1,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 5,
+ "group": 1001,
+ "eventname": {
+ "key": "eventname_5",
+ "text": "获取金币"
+ },
+ "eventweight": 1000,
+ "eventtype": 2,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 6,
+ "group": 1001,
+ "eventname": {
+ "key": "eventname_6",
+ "text": "获取金币"
+ },
+ "eventweight": 1000,
+ "eventtype": 2,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 7,
+ "group": 1002,
+ "eventname": {
+ "key": "eventname_7",
+ "text": "无事发生"
+ },
+ "eventweight": 1000,
+ "eventtype": 0,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 8,
+ "group": 1002,
+ "eventname": {
+ "key": "eventname_8",
+ "text": "打怪"
+ },
+ "eventweight": 1000,
+ "eventtype": 1,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 9,
+ "group": 1002,
+ "eventname": {
+ "key": "eventname_9",
+ "text": "打怪"
+ },
+ "eventweight": 1000,
+ "eventtype": 1,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 10,
+ "group": 1002,
+ "eventname": {
+ "key": "eventname_10",
+ "text": "打怪"
+ },
+ "eventweight": 1000,
+ "eventtype": 1,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 11,
+ "group": 1002,
+ "eventname": {
+ "key": "eventname_11",
+ "text": "获取金币"
+ },
+ "eventweight": 1000,
+ "eventtype": 2,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ },
+ {
+ "id": 12,
+ "group": 1002,
+ "eventname": {
+ "key": "eventname_12",
+ "text": "获取金币"
+ },
+ "eventweight": 1000,
+ "eventtype": 2,
+ "battleready": 0,
+ "battleid": 0,
+ "getitem": []
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json
index 21618d85c..933eaca33 100644
--- a/bin/json/game_worldtask.json
+++ b/bin/json/game_worldtask.json
@@ -1104,7 +1104,7 @@
},
"get_item": [],
"trigger": 0,
- "npc": 10230,
+ "npc": 0,
"completetask": [
12070250
],
diff --git a/modules/wtask/api_battleevent.go b/modules/wtask/api_battleevent.go
new file mode 100644
index 000000000..e0973789a
--- /dev/null
+++ b/modules/wtask/api_battleevent.go
@@ -0,0 +1,69 @@
+package wtask
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/lego/sys/log"
+ "go_dreamfactory/pb"
+ cfg "go_dreamfactory/sys/configure/structs"
+)
+
+// 参数校验
+func (this *apiComp) BattleEventCheck(session comm.IUserSession, req *pb.WTaskBattleEventReq) (errdata *pb.ErrorData) {
+ if req.Group == 0 || req.Event == 0 || req.Battle == nil {
+ this.module.Error("世界任务战斗开始参数错误",
+ log.Field{Key: "uid", Value: session.GetUserId()},
+ log.Field{Key: "params", Value: req.String()},
+ )
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ReqParameterError,
+ Title: pb.ErrorCode_ReqParameterError.ToString(),
+ Message: "BattleConfId is 0",
+ }
+ }
+ return
+}
+
+// /获取系统公告
+func (this *apiComp) BattleEvent(session comm.IUserSession, req *pb.WTaskBattleEventReq) (errdata *pb.ErrorData) {
+ var (
+ conf *cfg.GameWorldRdData
+ record *pb.DBBattleRecord
+ err error
+ )
+ if errdata = this.BattleEventCheck(session, req); errdata != nil {
+ return
+ }
+ if conf, err = this.module.configure.getGameWorldRdData(req.Event); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+
+ if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
+ Rulesid: conf.Battleready,
+ Ptype: pb.PlayType_rtask,
+ Format: req.Battle,
+ Mformat: []int32{conf.Battleid},
+ }); err != nil {
+ return
+ }
+ session.SendMsg(string(this.module.GetType()), "battlestart", &pb.WTaskBattleEventResp{
+ Group: req.Group,
+ Event: req.Event,
+ Info: &pb.BattleInfo{
+ Id: record.Id,
+ Rulesid: conf.Battleready,
+ Btype: record.Btype,
+ Ptype: record.Ptype,
+ RedCompId: record.RedCompId,
+ Redflist: record.Redflist,
+ BlueCompId: record.BlueCompId,
+ Buleflist: record.Buleflist,
+ Tasks: []int32{conf.Battleid},
+ },
+ })
+ return
+}
diff --git a/modules/wtask/api_eventcomplete.go b/modules/wtask/api_eventcomplete.go
new file mode 100644
index 000000000..9362b650c
--- /dev/null
+++ b/modules/wtask/api_eventcomplete.go
@@ -0,0 +1,99 @@
+package wtask
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+ cfg "go_dreamfactory/sys/configure/structs"
+)
+
+// 参数校验
+func (this *apiComp) EventCompleteCheck(session comm.IUserSession, req *pb.WTaskEventCompleteReq) (errdata *pb.ErrorData) {
+
+ return
+}
+
+// /获取系统公告
+func (this *apiComp) EventComplete(session comm.IUserSession, req *pb.WTaskEventCompleteReq) (errdata *pb.ErrorData) {
+ var (
+ info *pb.DBWTask
+ conf *cfg.GameWorldRdData
+ event int32
+ iswin bool
+ award []*pb.UserAssets
+ err error
+ ok bool
+ )
+ if errdata = this.EventCompleteCheck(session, req); errdata != nil {
+ return
+ }
+
+ if conf, err = this.module.configure.getGameWorldRdData(req.Event); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+
+ if conf.Eventtype == 1 {
+ if errdata, iswin = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
+ return
+ }
+ if !iswin {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ReqParameterError,
+ Title: pb.ErrorCode_ReqParameterError.ToString(),
+ Message: "battle no win!",
+ }
+ }
+
+ }
+
+ if info, err = this.module.modelwtask.getUserWTasks(session.GetUserId()); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_DBError,
+ Title: pb.ErrorCode_DBError.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+
+ if event, ok = info.Events[req.Group]; !ok {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ReqParameterError,
+ Title: pb.ErrorCode_ReqParameterError.ToString(),
+ Message: "no target event",
+ }
+ return
+ }
+
+ if conf.Eventtype == 2 {
+ if errdata = this.module.DispenseRes(session, conf.Getitem, true); err != nil {
+ return
+ }
+ award = make([]*pb.UserAssets, 0)
+ for _, v := range conf.Getitem {
+ award = append(award, &pb.UserAssets{
+ A: v.A,
+ T: v.T,
+ N: v.N,
+ })
+ }
+ }
+
+ delete(info.Events, req.Group)
+ if err = this.module.modelwtask.Change(session.GetUserId(), map[string]interface{}{
+ "events": info.Events,
+ }); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_DBError,
+ Title: pb.ErrorCode_DBError.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+
+ session.SendMsg(string(this.module.GetType()), "eventtarget", &pb.WTaskEventCompleteResp{Group: req.Group, Event: event, Award: award})
+ return
+}
diff --git a/modules/wtask/api_eventtarget.go b/modules/wtask/api_eventtarget.go
new file mode 100644
index 000000000..e122117a1
--- /dev/null
+++ b/modules/wtask/api_eventtarget.go
@@ -0,0 +1,62 @@
+package wtask
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+ cfg "go_dreamfactory/sys/configure/structs"
+)
+
+// 参数校验
+func (this *apiComp) EventTargetCheck(session comm.IUserSession, req *pb.WTaskEventTargetReq) (errdata *pb.ErrorData) {
+
+ return
+}
+
+// /获取系统公告
+func (this *apiComp) EventTarget(session comm.IUserSession, req *pb.WTaskEventTargetReq) (errdata *pb.ErrorData) {
+ var (
+ info *pb.DBWTask
+ conf *cfg.GameWorldRdData
+ event int32
+ err error
+ ok bool
+ )
+ if errdata = this.EventTargetCheck(session, req); errdata != nil {
+ return
+ }
+
+ if info, err = this.module.modelwtask.getUserWTasks(session.GetUserId()); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_DBError,
+ Title: pb.ErrorCode_DBError.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+
+ if event, ok = info.Events[req.Group]; !ok {
+ if conf, err = this.module.configure.getGameWorldRdDataByGroup(req.Group); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+ event = conf.Id
+ info.Events[req.Group] = event
+ if err = this.module.modelwtask.Change(session.GetUserId(), map[string]interface{}{
+ "events": info.Events,
+ }); err != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_DBError,
+ Title: pb.ErrorCode_DBError.ToString(),
+ Message: err.Error(),
+ }
+ return
+ }
+ }
+
+ session.SendMsg(string(this.module.GetType()), "eventtarget", &pb.WTaskEventTargetResp{Group: req.Group, Event: event})
+ return
+}
diff --git a/modules/wtask/configure.go b/modules/wtask/configure.go
index 7c39a054b..0e0b3cc0a 100644
--- a/modules/wtask/configure.go
+++ b/modules/wtask/configure.go
@@ -19,6 +19,7 @@ const (
gamesearchitemall = "game_searchitemall.json"
gamesearchitembox = "game_searchitembox.json"
game_worlddeal = "game_worlddeal.json"
+ game_worldrd = "game_worldrd.json"
)
type configureComp struct {
@@ -31,6 +32,8 @@ type configureComp struct {
opencmdTask map[string][]*cfg.GameWorldTaskData //key 功能开启
daylock sync.RWMutex
daygroupTasks map[int32][]*cfg.GameAnnulartask_LibraryData //key 条件ID
+ evevtlock sync.RWMutex
+ groupEvents map[int32][]*cfg.GameWorldRdData //事件组
}
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
@@ -48,6 +51,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
})
this.condlTask = make(map[int32][]*cfg.GameWorldTaskData)
configure.RegisterConfigure(gameWorldTask, cfg.NewGameBuriedCondi, this.updateconfigure)
+ configure.RegisterConfigure(game_worldrd, cfg.NewGameWorldRd, this.updateeventconfigure)
return
}
@@ -114,6 +118,30 @@ func (this *configureComp) updateconfigure() {
this.lock.Unlock()
}
+// 更新任务配置表
+func (this *configureComp) updateeventconfigure() {
+ var (
+ v interface{}
+ groupEvents map[int32][]*cfg.GameWorldRdData //事件组
+ err error
+ )
+ if v, err = this.GetConfigure(game_worldrd); err != nil {
+ return
+ } else {
+ groupEvents = make(map[int32][]*cfg.GameWorldRdData)
+ for _, conf := range v.(*cfg.GameWorldRd).GetDataList() {
+ if _, ok := groupEvents[conf.Group]; !ok {
+ groupEvents[conf.Group] = make([]*cfg.GameWorldRdData, 0)
+ }
+ groupEvents[conf.Group] = append(groupEvents[conf.Group], conf)
+ }
+
+ this.evevtlock.Lock()
+ this.groupEvents = groupEvents
+ this.evevtlock.Unlock()
+ }
+}
+
func (this *configureComp) getcondlTask() map[int32][]*cfg.GameWorldTaskData {
this.lock.RLock()
defer this.lock.RUnlock()
@@ -261,3 +289,36 @@ func (this *configureComp) getGameWorldDeal(ids []int32) (confs []*cfg.GameWorld
}
return
}
+
+// 随机事件
+func (this *configureComp) getGameWorldRdDataByGroup(group int32) (conf *cfg.GameWorldRdData, err error) {
+ this.evevtlock.RLock()
+ events, ok := this.groupEvents[group]
+ this.evevtlock.RUnlock()
+ if !ok {
+ err = comm.NewNotFoundConfErr(modulename, game_worldrd, group)
+ this.module.Errorf("err:%v", err)
+ return
+ }
+ weight := comm.RandShuffle(len(events))
+ conf = events[weight[0]]
+ return
+}
+
+func (this *configureComp) getGameWorldRdData(id int32) (conf *cfg.GameWorldRdData, err error) {
+ var (
+ v interface{}
+ ok bool
+ )
+ if v, err = this.GetConfigure(game_worldrd); err != nil {
+ return
+ } else {
+ if conf, ok = v.(*cfg.GameWorldRd).GetDataMap()[id]; !ok {
+ err = comm.NewNotFoundConfErr(modulename, gameWorldTask, id)
+ this.module.Errorf("err:%v", err)
+ return
+ }
+
+ }
+ return
+}
diff --git a/modules/wtask/modelWTask.go b/modules/wtask/modelWTask.go
index 095f374a4..647be2637 100644
--- a/modules/wtask/modelWTask.go
+++ b/modules/wtask/modelWTask.go
@@ -47,6 +47,7 @@ func (this *ModelWTask) getUserWTasks(uid string) (results *pb.DBWTask, err erro
Groups: make(map[int32]int32),
Boxs: make(map[int32]*pb.DBWTaskBox),
Exchange: make(map[int32]int32),
+ Events: make(map[int32]int32),
}
err = this.Add(uid, results)
}
diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go
index f8953cc6a..762c0f69d 100644
--- a/pb/battle_db.pb.go
+++ b/pb/battle_db.pb.go
@@ -103,7 +103,6 @@ const (
PlayType_race PlayType = 15 // 阵营 塔
PlayType_cycle PlayType = 16 // 循环塔
PlayType_guildgve PlayType = 17 //工会gve
- PlayType_stone PlayType = 18 // 石阵秘境
)
// Enum value maps for PlayType.
@@ -127,7 +126,6 @@ var (
15: "race",
16: "cycle",
17: "guildgve",
- 18: "stone",
}
PlayType_value = map[string]int32{
"null": 0,
@@ -148,7 +146,6 @@ var (
"race": 15,
"cycle": 16,
"guildgve": 17,
- "stone": 18,
}
)
@@ -276,98 +273,33 @@ func (DBBattleComp) EnumDescriptor() ([]byte, []int) {
return file_battle_battle_db_proto_rawDescGZIP(), []int{3}
}
-//动态技能
-type DySkillData struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- SkillID int32 `protobuf:"varint,1,opt,name=skillID,proto3" json:"skillID"`
- SkillLv int32 `protobuf:"varint,2,opt,name=skillLv,proto3" json:"skillLv"`
- Param int32 `protobuf:"varint,3,opt,name=param,proto3" json:"param"`
-}
-
-func (x *DySkillData) Reset() {
- *x = DySkillData{}
- if protoimpl.UnsafeEnabled {
- mi := &file_battle_battle_db_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DySkillData) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DySkillData) ProtoMessage() {}
-
-func (x *DySkillData) ProtoReflect() protoreflect.Message {
- mi := &file_battle_battle_db_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DySkillData.ProtoReflect.Descriptor instead.
-func (*DySkillData) Descriptor() ([]byte, []int) {
- return file_battle_battle_db_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *DySkillData) GetSkillID() int32 {
- if x != nil {
- return x.SkillID
- }
- return 0
-}
-
-func (x *DySkillData) GetSkillLv() int32 {
- if x != nil {
- return x.SkillLv
- }
- return 0
-}
-
-func (x *DySkillData) GetParam() int32 {
- if x != nil {
- return x.Param
- }
- return 0
-}
-
type BattleRole struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Tid int32 `protobuf:"varint,1,opt,name=tid,proto3" json:"tid"` // 临时id
- Oid string `protobuf:"bytes,2,opt,name=oid,proto3" json:"oid"` // 玩家英雄数据库id
- Pos int32 `protobuf:"varint,3,opt,name=pos,proto3" json:"pos"` // 站位坐标
- HeroID string `protobuf:"bytes,4,opt,name=heroID,proto3" json:"heroID" bson:"heroID"` //英雄的配置表ID
- Star int32 `protobuf:"varint,5,opt,name=star,proto3" json:"star"` // 英雄星级
- Lv int32 `protobuf:"varint,6,opt,name=lv,proto3" json:"lv"` // 英雄等级
- CaptainSkill int32 `protobuf:"varint,7,opt,name=captainSkill,proto3" json:"captainSkill" bson:"captainSkill"` //队长技能
- MainSuitSkill int32 `protobuf:"varint,8,opt,name=mainSuitSkill,proto3" json:"mainSuitSkill" bson:"mainSuitSkill"` /// 主套装技能
- SubSuitSkill int32 `protobuf:"varint,9,opt,name=subSuitSkill,proto3" json:"subSuitSkill" bson:"subSuitSkill"` /// 副套装技能
- NormalSkill []*SkillData `protobuf:"bytes,10,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能
- EquipSkill []*SkillData `protobuf:"bytes,11,rep,name=equipSkill,proto3" json:"equipSkill" bson:"equipSkill"` //装备技能
- BattleBeforeSkill []*DySkillData `protobuf:"bytes,12,rep,name=battleBeforeSkill,proto3" json:"battleBeforeSkill" bson:"battleBeforeSkill"` //战前技能
- Property map[int32]int32 `protobuf:"bytes,13,rep,name=property,proto3" json:"property" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //基础属性
- Ishelp bool `protobuf:"varint,14,opt,name=ishelp,proto3" json:"ishelp"` //是否是助战英雄
- Isboos int32 `protobuf:"varint,15,opt,name=isboos,proto3" json:"isboos"` //是否是boos
- Monsterid int32 `protobuf:"varint,16,opt,name=monsterid,proto3" json:"monsterid"` //怪物id
- Currhp int32 `protobuf:"varint,17,opt,name=currhp,proto3" json:"currhp"` //当前血量
+ Tid int32 `protobuf:"varint,1,opt,name=tid,proto3" json:"tid"` // 临时id
+ Oid string `protobuf:"bytes,2,opt,name=oid,proto3" json:"oid"` // 玩家英雄数据库id
+ Pos int32 `protobuf:"varint,3,opt,name=pos,proto3" json:"pos"` // 站位坐标
+ HeroID string `protobuf:"bytes,4,opt,name=heroID,proto3" json:"heroID" bson:"heroID"` //英雄的配置表ID
+ Star int32 `protobuf:"varint,5,opt,name=star,proto3" json:"star"` // 英雄星级
+ Lv int32 `protobuf:"varint,6,opt,name=lv,proto3" json:"lv"` // 英雄等级
+ CaptainSkill int32 `protobuf:"varint,7,opt,name=captainSkill,proto3" json:"captainSkill" bson:"captainSkill"` //队长技能
+ MainSuitSkill int32 `protobuf:"varint,8,opt,name=mainSuitSkill,proto3" json:"mainSuitSkill" bson:"mainSuitSkill"` /// 主套装技能
+ SubSuitSkill int32 `protobuf:"varint,9,opt,name=subSuitSkill,proto3" json:"subSuitSkill" bson:"subSuitSkill"` /// 副套装技能
+ NormalSkill []*SkillData `protobuf:"bytes,10,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能
+ EquipSkill []*SkillData `protobuf:"bytes,11,rep,name=equipSkill,proto3" json:"equipSkill" bson:"equipSkill"` //普通技能
+ Property map[int32]int32 `protobuf:"bytes,13,rep,name=property,proto3" json:"property" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //基础属性
+ Ishelp bool `protobuf:"varint,14,opt,name=ishelp,proto3" json:"ishelp"` //是否是助战英雄
+ Isboos int32 `protobuf:"varint,15,opt,name=isboos,proto3" json:"isboos"` //是否是boos
+ Monsterid int32 `protobuf:"varint,16,opt,name=monsterid,proto3" json:"monsterid"` //怪物id
+ Currhp int32 `protobuf:"varint,17,opt,name=currhp,proto3" json:"currhp"` //当前血量
}
func (x *BattleRole) Reset() {
*x = BattleRole{}
if protoimpl.UnsafeEnabled {
- mi := &file_battle_battle_db_proto_msgTypes[1]
+ mi := &file_battle_battle_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -380,7 +312,7 @@ func (x *BattleRole) String() string {
func (*BattleRole) ProtoMessage() {}
func (x *BattleRole) ProtoReflect() protoreflect.Message {
- mi := &file_battle_battle_db_proto_msgTypes[1]
+ mi := &file_battle_battle_db_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -393,7 +325,7 @@ func (x *BattleRole) ProtoReflect() protoreflect.Message {
// Deprecated: Use BattleRole.ProtoReflect.Descriptor instead.
func (*BattleRole) Descriptor() ([]byte, []int) {
- return file_battle_battle_db_proto_rawDescGZIP(), []int{1}
+ return file_battle_battle_db_proto_rawDescGZIP(), []int{0}
}
func (x *BattleRole) GetTid() int32 {
@@ -473,13 +405,6 @@ func (x *BattleRole) GetEquipSkill() []*SkillData {
return nil
}
-func (x *BattleRole) GetBattleBeforeSkill() []*DySkillData {
- if x != nil {
- return x.BattleBeforeSkill
- }
- return nil
-}
-
func (x *BattleRole) GetProperty() map[int32]int32 {
if x != nil {
return x.Property
@@ -530,7 +455,7 @@ type DBBattleFormt struct {
func (x *DBBattleFormt) Reset() {
*x = DBBattleFormt{}
if protoimpl.UnsafeEnabled {
- mi := &file_battle_battle_db_proto_msgTypes[2]
+ mi := &file_battle_battle_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -543,7 +468,7 @@ func (x *DBBattleFormt) String() string {
func (*DBBattleFormt) ProtoMessage() {}
func (x *DBBattleFormt) ProtoReflect() protoreflect.Message {
- mi := &file_battle_battle_db_proto_msgTypes[2]
+ mi := &file_battle_battle_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -556,7 +481,7 @@ func (x *DBBattleFormt) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBBattleFormt.ProtoReflect.Descriptor instead.
func (*DBBattleFormt) Descriptor() ([]byte, []int) {
- return file_battle_battle_db_proto_rawDescGZIP(), []int{2}
+ return file_battle_battle_db_proto_rawDescGZIP(), []int{1}
}
func (x *DBBattleFormt) GetLeadpos() int32 {
@@ -611,7 +536,7 @@ type DBBattleRecord struct {
func (x *DBBattleRecord) Reset() {
*x = DBBattleRecord{}
if protoimpl.UnsafeEnabled {
- mi := &file_battle_battle_db_proto_msgTypes[3]
+ mi := &file_battle_battle_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -624,7 +549,7 @@ func (x *DBBattleRecord) String() string {
func (*DBBattleRecord) ProtoMessage() {}
func (x *DBBattleRecord) ProtoReflect() protoreflect.Message {
- mi := &file_battle_battle_db_proto_msgTypes[3]
+ mi := &file_battle_battle_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -637,7 +562,7 @@ func (x *DBBattleRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBBattleRecord.ProtoReflect.Descriptor instead.
func (*DBBattleRecord) Descriptor() ([]byte, []int) {
- return file_battle_battle_db_proto_rawDescGZIP(), []int{3}
+ return file_battle_battle_db_proto_rawDescGZIP(), []int{2}
}
func (x *DBBattleRecord) GetId() string {
@@ -736,110 +661,100 @@ var File_battle_battle_db_proto protoreflect.FileDescriptor
var file_battle_battle_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x44, 0x79, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44,
- 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x12, 0x18, 0x0a,
- 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
- 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x22, 0xdc, 0x04,
- 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03,
- 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x10,
- 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64,
- 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70,
- 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74,
- 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e,
- 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x22,
- 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x6b, 0x69,
- 0x6c, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x69, 0x74, 0x53, 0x6b,
- 0x69, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x69, 0x6e, 0x53,
- 0x75, 0x69, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x53,
- 0x75, 0x69, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
- 0x73, 0x75, 0x62, 0x53, 0x75, 0x69, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x2c, 0x0a, 0x0b,
- 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x0a, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x6e,
- 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x2a, 0x0a, 0x0a, 0x65, 0x71,
- 0x75, 0x69, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a,
- 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69,
- 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x3a, 0x0a, 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
- 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x79, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52,
- 0x11, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x53, 0x6b, 0x69,
- 0x6c, 0x6c, 0x12, 0x35, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0d,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c,
- 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
- 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x68,
- 0x65, 0x6c, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x68, 0x65, 0x6c,
- 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x06, 0x69, 0x73, 0x62, 0x6f, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x6f, 0x6e,
- 0x73, 0x74, 0x65, 0x72, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x6f,
- 0x6e, 0x73, 0x74, 0x65, 0x72, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68,
- 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x1a,
- 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79,
- 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
- 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a,
- 0x0d, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18,
- 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d,
- 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
- 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x79, 0x73,
- 0x74, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74,
- 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d,
- 0x12, 0x2b, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c,
- 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xbd, 0x03,
- 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
- 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
- 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79,
- 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54,
- 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c,
- 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x65, 0x76,
- 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
- 0x0e, 0x32, 0x0d, 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65,
- 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f,
- 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43,
- 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73,
- 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74,
- 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73,
- 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18,
- 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49,
- 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46,
- 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12,
- 0x2f, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0b,
- 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
- 0x6f, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
- 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52,
- 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73,
- 0x18, 0x0d, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2a, 0x4e, 0x0a,
- 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e,
- 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a,
- 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12,
- 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x70, 0x76,
- 0x70, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x70, 0x65, 0x76, 0x10, 0x06, 0x2a, 0x83, 0x02,
- 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75,
- 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
- 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09,
- 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e,
- 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67,
- 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73,
- 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b,
- 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68,
- 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0a, 0x0a,
- 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x6e, 0x63,
- 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
- 0x79, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x6d, 0x65,
- 0x65, 0x74, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65,
- 0x6e, 0x70, 0x63, 0x10, 0x0e, 0x12, 0x08, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x10, 0x0f, 0x12,
- 0x09, 0x0a, 0x05, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x10, 0x10, 0x12, 0x0c, 0x0a, 0x08, 0x67, 0x75,
- 0x69, 0x6c, 0x64, 0x67, 0x76, 0x65, 0x10, 0x11, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x6e,
- 0x65, 0x10, 0x12, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x04, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
+ 0x6f, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72,
+ 0x6f, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49,
+ 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e,
+ 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x61, 0x70,
+ 0x74, 0x61, 0x69, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x69,
+ 0x6e, 0x53, 0x75, 0x69, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x0d, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x75, 0x69, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12,
+ 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x53, 0x75, 0x69, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18,
+ 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x53, 0x75, 0x69, 0x74, 0x53, 0x6b,
+ 0x69, 0x6c, 0x6c, 0x12, 0x2c, 0x0a, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x6b, 0x69,
+ 0x6c, 0x6c, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c,
+ 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x6b, 0x69, 0x6c,
+ 0x6c, 0x12, 0x2a, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18,
+ 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74,
+ 0x61, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x35, 0x0a,
+ 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f,
+ 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70,
+ 0x65, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0e,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x16, 0x0a, 0x06,
+ 0x69, 0x73, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x73,
+ 0x62, 0x6f, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72, 0x69,
+ 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x6f, 0x6e, 0x73, 0x74, 0x65, 0x72,
+ 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x18, 0x11, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72,
+ 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
+ 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x42, 0x61,
+ 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61,
+ 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64,
+ 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04,
+ 0x74, 0x65, 0x61, 0x6d, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f,
+ 0x6c, 0x65, 0x52, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x0a, 0x0a, 0x62,
+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, 0x62, 0x61,
+ 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xbd, 0x03, 0x0a, 0x0e, 0x44, 0x42, 0x42,
+ 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62,
+ 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05,
+ 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a,
+ 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x42,
+ 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61,
+ 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64,
+ 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72,
+ 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09,
+ 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52,
+ 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x6f,
+ 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0e, 0x32,
+ 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x0b,
+ 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x72,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42,
+ 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75,
+ 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28,
+ 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2a, 0x4e, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74,
+ 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12,
+ 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10,
+ 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76,
+ 0x65, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x70, 0x76, 0x70, 0x10, 0x05, 0x12, 0x08,
+ 0x0a, 0x04, 0x6c, 0x70, 0x65, 0x76, 0x10, 0x06, 0x2a, 0xf8, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61,
+ 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12,
+ 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a,
+ 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61,
+ 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10,
+ 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x10, 0x05, 0x12, 0x0f, 0x0a,
+ 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09,
+ 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61,
+ 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65,
+ 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62,
+ 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10,
+ 0x0b, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x10, 0x0c, 0x12, 0x0f,
+ 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x6d, 0x65, 0x65, 0x74, 0x10, 0x0d, 0x12,
+ 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x6e, 0x70, 0x63, 0x10, 0x0e,
+ 0x12, 0x08, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x10, 0x0f, 0x12, 0x09, 0x0a, 0x05, 0x63, 0x79,
+ 0x63, 0x6c, 0x65, 0x10, 0x10, 0x12, 0x0c, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x6c, 0x64, 0x67, 0x76,
+ 0x65, 0x10, 0x11, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74,
0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65,
0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07,
@@ -861,39 +776,37 @@ func file_battle_battle_db_proto_rawDescGZIP() []byte {
}
var file_battle_battle_db_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
-var file_battle_battle_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_battle_battle_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_battle_battle_db_proto_goTypes = []interface{}{
(BattleType)(0), // 0: BattleType
(PlayType)(0), // 1: PlayType
(BBattleState)(0), // 2: BBattleState
(DBBattleComp)(0), // 3: DBBattleComp
- (*DySkillData)(nil), // 4: DySkillData
- (*BattleRole)(nil), // 5: BattleRole
- (*DBBattleFormt)(nil), // 6: DBBattleFormt
- (*DBBattleRecord)(nil), // 7: DBBattleRecord
- nil, // 8: BattleRole.PropertyEntry
- (*SkillData)(nil), // 9: SkillData
+ (*BattleRole)(nil), // 4: BattleRole
+ (*DBBattleFormt)(nil), // 5: DBBattleFormt
+ (*DBBattleRecord)(nil), // 6: DBBattleRecord
+ nil, // 7: BattleRole.PropertyEntry
+ (*SkillData)(nil), // 8: SkillData
}
var file_battle_battle_db_proto_depIdxs = []int32{
- 9, // 0: BattleRole.normalSkill:type_name -> SkillData
- 9, // 1: BattleRole.equipSkill:type_name -> SkillData
- 4, // 2: BattleRole.battleBeforeSkill:type_name -> DySkillData
- 8, // 3: BattleRole.property:type_name -> BattleRole.PropertyEntry
- 5, // 4: DBBattleFormt.team:type_name -> BattleRole
- 5, // 5: DBBattleFormt.systeam:type_name -> BattleRole
- 5, // 6: DBBattleFormt.backupteam:type_name -> BattleRole
- 0, // 7: DBBattleRecord.btype:type_name -> BattleType
- 1, // 8: DBBattleRecord.ptype:type_name -> PlayType
- 2, // 9: DBBattleRecord.state:type_name -> BBattleState
- 6, // 10: DBBattleRecord.redflist:type_name -> DBBattleFormt
- 6, // 11: DBBattleRecord.buleflist:type_name -> DBBattleFormt
- 3, // 12: DBBattleRecord.roundresult:type_name -> DBBattleComp
- 3, // 13: DBBattleRecord.result:type_name -> DBBattleComp
- 14, // [14:14] is the sub-list for method output_type
- 14, // [14:14] is the sub-list for method input_type
- 14, // [14:14] is the sub-list for extension type_name
- 14, // [14:14] is the sub-list for extension extendee
- 0, // [0:14] is the sub-list for field type_name
+ 8, // 0: BattleRole.normalSkill:type_name -> SkillData
+ 8, // 1: BattleRole.equipSkill:type_name -> SkillData
+ 7, // 2: BattleRole.property:type_name -> BattleRole.PropertyEntry
+ 4, // 3: DBBattleFormt.team:type_name -> BattleRole
+ 4, // 4: DBBattleFormt.systeam:type_name -> BattleRole
+ 4, // 5: DBBattleFormt.backupteam:type_name -> BattleRole
+ 0, // 6: DBBattleRecord.btype:type_name -> BattleType
+ 1, // 7: DBBattleRecord.ptype:type_name -> PlayType
+ 2, // 8: DBBattleRecord.state:type_name -> BBattleState
+ 5, // 9: DBBattleRecord.redflist:type_name -> DBBattleFormt
+ 5, // 10: DBBattleRecord.buleflist:type_name -> DBBattleFormt
+ 3, // 11: DBBattleRecord.roundresult:type_name -> DBBattleComp
+ 3, // 12: DBBattleRecord.result:type_name -> DBBattleComp
+ 13, // [13:13] is the sub-list for method output_type
+ 13, // [13:13] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
}
func init() { file_battle_battle_db_proto_init() }
@@ -904,18 +817,6 @@ func file_battle_battle_db_proto_init() {
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_battle_battle_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DySkillData); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_battle_battle_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BattleRole); i {
case 0:
return &v.state
@@ -927,7 +828,7 @@ func file_battle_battle_db_proto_init() {
return nil
}
}
- file_battle_battle_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ file_battle_battle_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBBattleFormt); i {
case 0:
return &v.state
@@ -939,7 +840,7 @@ func file_battle_battle_db_proto_init() {
return nil
}
}
- file_battle_battle_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ file_battle_battle_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBBattleRecord); i {
case 0:
return &v.state
@@ -958,7 +859,7 @@ func file_battle_battle_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_battle_battle_db_proto_rawDesc,
NumEnums: 4,
- NumMessages: 5,
+ NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pb/wtask_db.pb.go b/pb/wtask_db.pb.go
index 684232ae2..39369a44f 100644
--- a/pb/wtask_db.pb.go
+++ b/pb/wtask_db.pb.go
@@ -35,7 +35,8 @@ type DBWTask struct {
Groups map[int32]int32 `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //任务组状态 key表示组id value:0 任务组未完成 1:任务组已完成 2:任务组奖励已领取
Boxs map[int32]*DBWTaskBox `protobuf:"bytes,8,rep,name=boxs,proto3" json:"boxs" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //世界宝箱
Exchange map[int32]int32 `protobuf:"bytes,9,rep,name=exchange,proto3" json:"exchange" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //兑换记录 每日重置
- Dailytaskgroup int32 `protobuf:"varint,10,opt,name=dailytaskgroup,proto3" json:"dailytaskgroup"` //日常任务组id
+ Events map[int32]int32 `protobuf:"bytes,10,rep,name=events,proto3" json:"events" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //当前事件组
+ Dailytaskgroup int32 `protobuf:"varint,11,opt,name=dailytaskgroup,proto3" json:"dailytaskgroup"` //日常任务组id
}
func (x *DBWTask) Reset() {
@@ -133,6 +134,13 @@ func (x *DBWTask) GetExchange() map[int32]int32 {
return nil
}
+func (x *DBWTask) GetEvents() map[int32]int32 {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
func (x *DBWTask) GetDailytaskgroup() int32 {
if x != nil {
return x.Dailytaskgroup
@@ -248,8 +256,8 @@ var File_wtask_wtask_db_proto protoreflect.FileDescriptor
var file_wtask_wtask_db_proto_rawDesc = []byte{
0x0a, 0x14, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x75, 0x72, 0x69, 0x65, 0x64, 0x2f, 0x62,
- 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97,
- 0x04, 0x0a, 0x07, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x75, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80,
+ 0x05, 0x0a, 0x07, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 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, 0x20, 0x0a, 0x0b,
0x63, 0x75, 0x72, 0x72, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
@@ -268,34 +276,40 @@ var file_wtask_wtask_db_proto_rawDesc = []byte{
0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e,
- 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x67,
- 0x72, 0x6f, 0x75, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x64, 0x61, 0x69, 0x6c,
- 0x79, 0x74, 0x61, 0x73, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x09, 0x42, 0x6f, 0x78, 0x73, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x6f, 0x78,
- 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45,
- 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
- 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x70, 0x0a, 0x0a, 0x44, 0x42, 0x57, 0x54,
- 0x61, 0x73, 0x6b, 0x42, 0x6f, 0x78, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x78, 0x73, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x6f,
- 0x78, 0x2e, 0x42, 0x6f, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x78,
- 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x6f, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
- 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
- 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x46, 0x0a, 0x0b, 0x44, 0x42,
- 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63,
- 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f,
- 0x6e, 0x49, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6c,
- 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x33,
+ 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
+ 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x74, 0x61, 0x73, 0x6b, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x74,
+ 0x61, 0x73, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x1a, 0x44, 0x0a, 0x09, 0x42, 0x6f, 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x6f, 0x78, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x63,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+ 0x01, 0x22, 0x70, 0x0a, 0x0a, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x6f, 0x78, 0x12,
+ 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e,
+ 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x6f, 0x78, 0x2e, 0x42, 0x6f, 0x78, 0x73, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x78, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x6f,
+ 0x78, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x22, 0x46, 0x0a, 0x0b, 0x44, 0x42, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x74,
+ 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x03, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x49, 0x50, 0x72, 0x6f, 0x67, 0x72,
+ 0x65, 0x73, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x6c, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
+ 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -310,7 +324,7 @@ func file_wtask_wtask_db_proto_rawDescGZIP() []byte {
return file_wtask_wtask_db_proto_rawDescData
}
-var file_wtask_wtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_wtask_wtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_wtask_wtask_db_proto_goTypes = []interface{}{
(*DBWTask)(nil), // 0: DBWTask
(*DBWTaskBox)(nil), // 1: DBWTaskBox
@@ -318,21 +332,23 @@ var file_wtask_wtask_db_proto_goTypes = []interface{}{
nil, // 3: DBWTask.GroupsEntry
nil, // 4: DBWTask.BoxsEntry
nil, // 5: DBWTask.ExchangeEntry
- nil, // 6: DBWTaskBox.BoxsEntry
- (*ConIProgress)(nil), // 7: ConIProgress
+ nil, // 6: DBWTask.EventsEntry
+ nil, // 7: DBWTaskBox.BoxsEntry
+ (*ConIProgress)(nil), // 8: ConIProgress
}
var file_wtask_wtask_db_proto_depIdxs = []int32{
3, // 0: DBWTask.groups:type_name -> DBWTask.GroupsEntry
4, // 1: DBWTask.boxs:type_name -> DBWTask.BoxsEntry
5, // 2: DBWTask.exchange:type_name -> DBWTask.ExchangeEntry
- 6, // 3: DBWTaskBox.boxs:type_name -> DBWTaskBox.BoxsEntry
- 7, // 4: DBWTaskItem.conlds:type_name -> ConIProgress
- 1, // 5: DBWTask.BoxsEntry.value:type_name -> DBWTaskBox
- 6, // [6:6] is the sub-list for method output_type
- 6, // [6:6] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+ 6, // 3: DBWTask.events:type_name -> DBWTask.EventsEntry
+ 7, // 4: DBWTaskBox.boxs:type_name -> DBWTaskBox.BoxsEntry
+ 8, // 5: DBWTaskItem.conlds:type_name -> ConIProgress
+ 1, // 6: DBWTask.BoxsEntry.value:type_name -> DBWTaskBox
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
}
func init() { file_wtask_wtask_db_proto_init() }
@@ -385,7 +401,7 @@ func file_wtask_wtask_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_wtask_wtask_db_proto_rawDesc,
NumEnums: 0,
- NumMessages: 7,
+ NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pb/wtask_msg.pb.go b/pb/wtask_msg.pb.go
index 2d3113b2c..5846e05a1 100644
--- a/pb/wtask_msg.pb.go
+++ b/pb/wtask_msg.pb.go
@@ -1155,6 +1155,366 @@ func (x *WTaskExchangeResp) GetAward() []*UserAssets {
return nil
}
+//世界任务 事件触发 请求
+type WTaskEventTargetReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"`
+}
+
+func (x *WTaskEventTargetReq) Reset() {
+ *x = WTaskEventTargetReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WTaskEventTargetReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WTaskEventTargetReq) ProtoMessage() {}
+
+func (x *WTaskEventTargetReq) ProtoReflect() protoreflect.Message {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[21]
+ 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 WTaskEventTargetReq.ProtoReflect.Descriptor instead.
+func (*WTaskEventTargetReq) Descriptor() ([]byte, []int) {
+ return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *WTaskEventTargetReq) GetGroup() int32 {
+ if x != nil {
+ return x.Group
+ }
+ return 0
+}
+
+//世界任务 事件触发 回应
+type WTaskEventTargetResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"`
+ Event int32 `protobuf:"varint,2,opt,name=event,proto3" json:"event"`
+}
+
+func (x *WTaskEventTargetResp) Reset() {
+ *x = WTaskEventTargetResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WTaskEventTargetResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WTaskEventTargetResp) ProtoMessage() {}
+
+func (x *WTaskEventTargetResp) ProtoReflect() protoreflect.Message {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[22]
+ 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 WTaskEventTargetResp.ProtoReflect.Descriptor instead.
+func (*WTaskEventTargetResp) Descriptor() ([]byte, []int) {
+ return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *WTaskEventTargetResp) GetGroup() int32 {
+ if x != nil {
+ return x.Group
+ }
+ return 0
+}
+
+func (x *WTaskEventTargetResp) GetEvent() int32 {
+ if x != nil {
+ return x.Event
+ }
+ return 0
+}
+
+//世界任务 战斗事件 请求
+type WTaskBattleEventReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"`
+ Event int32 `protobuf:"varint,2,opt,name=event,proto3" json:"event"`
+ Battle *BattleFormation `protobuf:"bytes,3,opt,name=battle,proto3" json:"battle"` //战斗类型
+}
+
+func (x *WTaskBattleEventReq) Reset() {
+ *x = WTaskBattleEventReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WTaskBattleEventReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WTaskBattleEventReq) ProtoMessage() {}
+
+func (x *WTaskBattleEventReq) ProtoReflect() protoreflect.Message {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[23]
+ 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 WTaskBattleEventReq.ProtoReflect.Descriptor instead.
+func (*WTaskBattleEventReq) Descriptor() ([]byte, []int) {
+ return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *WTaskBattleEventReq) GetGroup() int32 {
+ if x != nil {
+ return x.Group
+ }
+ return 0
+}
+
+func (x *WTaskBattleEventReq) GetEvent() int32 {
+ if x != nil {
+ return x.Event
+ }
+ return 0
+}
+
+func (x *WTaskBattleEventReq) GetBattle() *BattleFormation {
+ if x != nil {
+ return x.Battle
+ }
+ return nil
+}
+
+//世界任务 战斗事件 回应
+type WTaskBattleEventResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"`
+ Event int32 `protobuf:"varint,2,opt,name=event,proto3" json:"event"`
+ Info *BattleInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info"` //战斗信息
+}
+
+func (x *WTaskBattleEventResp) Reset() {
+ *x = WTaskBattleEventResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WTaskBattleEventResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WTaskBattleEventResp) ProtoMessage() {}
+
+func (x *WTaskBattleEventResp) ProtoReflect() protoreflect.Message {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[24]
+ 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 WTaskBattleEventResp.ProtoReflect.Descriptor instead.
+func (*WTaskBattleEventResp) Descriptor() ([]byte, []int) {
+ return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *WTaskBattleEventResp) GetGroup() int32 {
+ if x != nil {
+ return x.Group
+ }
+ return 0
+}
+
+func (x *WTaskBattleEventResp) GetEvent() int32 {
+ if x != nil {
+ return x.Event
+ }
+ return 0
+}
+
+func (x *WTaskBattleEventResp) GetInfo() *BattleInfo {
+ if x != nil {
+ return x.Info
+ }
+ return nil
+}
+
+//世界任务 事件完成 请求
+type WTaskEventCompleteReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"`
+ Event int32 `protobuf:"varint,2,opt,name=event,proto3" json:"event"`
+ Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报 打怪事件完成需要提交战报
+}
+
+func (x *WTaskEventCompleteReq) Reset() {
+ *x = WTaskEventCompleteReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WTaskEventCompleteReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WTaskEventCompleteReq) ProtoMessage() {}
+
+func (x *WTaskEventCompleteReq) ProtoReflect() protoreflect.Message {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[25]
+ 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 WTaskEventCompleteReq.ProtoReflect.Descriptor instead.
+func (*WTaskEventCompleteReq) Descriptor() ([]byte, []int) {
+ return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *WTaskEventCompleteReq) GetGroup() int32 {
+ if x != nil {
+ return x.Group
+ }
+ return 0
+}
+
+func (x *WTaskEventCompleteReq) GetEvent() int32 {
+ if x != nil {
+ return x.Event
+ }
+ return 0
+}
+
+func (x *WTaskEventCompleteReq) GetReport() *BattleReport {
+ if x != nil {
+ return x.Report
+ }
+ return nil
+}
+
+//世界任务 事件完成 回应
+type WTaskEventCompleteResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group int32 `protobuf:"varint,1,opt,name=group,proto3" json:"group"`
+ Event int32 `protobuf:"varint,2,opt,name=event,proto3" json:"event"`
+ Award []*UserAssets `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //奖励
+}
+
+func (x *WTaskEventCompleteResp) Reset() {
+ *x = WTaskEventCompleteResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WTaskEventCompleteResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WTaskEventCompleteResp) ProtoMessage() {}
+
+func (x *WTaskEventCompleteResp) ProtoReflect() protoreflect.Message {
+ mi := &file_wtask_wtask_msg_proto_msgTypes[26]
+ 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 WTaskEventCompleteResp.ProtoReflect.Descriptor instead.
+func (*WTaskEventCompleteResp) Descriptor() ([]byte, []int) {
+ return file_wtask_wtask_msg_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *WTaskEventCompleteResp) GetGroup() int32 {
+ if x != nil {
+ return x.Group
+ }
+ return 0
+}
+
+func (x *WTaskEventCompleteResp) GetEvent() int32 {
+ if x != nil {
+ return x.Event
+ }
+ return 0
+}
+
+func (x *WTaskEventCompleteResp) GetAward() []*UserAssets {
+ if x != nil {
+ return x.Award
+ }
+ return nil
+}
+
var File_wtask_wtask_msg_proto protoreflect.FileDescriptor
var file_wtask_wtask_msg_proto_rawDesc = []byte{
@@ -1270,8 +1630,42 @@ var file_wtask_wtask_msg_proto_rawDesc = []byte{
0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x69, 0x64,
0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x03, 0x65, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x61,
0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65,
- 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06,
- 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x2b,
+ 0x0a, 0x13, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x42, 0x0a, 0x14, 0x57,
+ 0x54, 0x61, 0x73, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22,
+ 0x6b, 0x0a, 0x13, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x76,
+ 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05,
+ 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x76, 0x65,
+ 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x63, 0x0a, 0x14,
+ 0x57, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76,
+ 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74,
+ 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
+ 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66,
+ 0x6f, 0x22, 0x6a, 0x0a, 0x15, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43,
+ 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x67, 0x0a,
+ 0x16, 0x57, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
+ 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, 0x0a,
+ 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x76,
+ 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52,
+ 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1286,7 +1680,7 @@ func file_wtask_wtask_msg_proto_rawDescGZIP() []byte {
return file_wtask_wtask_msg_proto_rawDescData
}
-var file_wtask_wtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
+var file_wtask_wtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
var file_wtask_wtask_msg_proto_goTypes = []interface{}{
(*WTaskInfoReq)(nil), // 0: WTaskInfoReq
(*WTaskInfoResp)(nil), // 1: WTaskInfoResp
@@ -1309,37 +1703,47 @@ var file_wtask_wtask_msg_proto_goTypes = []interface{}{
(*WTaskBoxReceiveResp)(nil), // 18: WTaskBoxReceiveResp
(*WTaskExchangeReq)(nil), // 19: WTaskExchangeReq
(*WTaskExchangeResp)(nil), // 20: WTaskExchangeResp
- nil, // 21: WTaskFinishResp.GroupsEntry
- nil, // 22: WTaskBoxChangePush.BoxsEntry
- (*DBWTask)(nil), // 23: DBWTask
- (*DBWTaskItem)(nil), // 24: DBWTaskItem
- (*UserAssets)(nil), // 25: UserAssets
- (*BattleFormation)(nil), // 26: BattleFormation
- (*BattleInfo)(nil), // 27: BattleInfo
- (*BattleReport)(nil), // 28: BattleReport
- (*DBWTaskBox)(nil), // 29: DBWTaskBox
+ (*WTaskEventTargetReq)(nil), // 21: WTaskEventTargetReq
+ (*WTaskEventTargetResp)(nil), // 22: WTaskEventTargetResp
+ (*WTaskBattleEventReq)(nil), // 23: WTaskBattleEventReq
+ (*WTaskBattleEventResp)(nil), // 24: WTaskBattleEventResp
+ (*WTaskEventCompleteReq)(nil), // 25: WTaskEventCompleteReq
+ (*WTaskEventCompleteResp)(nil), // 26: WTaskEventCompleteResp
+ nil, // 27: WTaskFinishResp.GroupsEntry
+ nil, // 28: WTaskBoxChangePush.BoxsEntry
+ (*DBWTask)(nil), // 29: DBWTask
+ (*DBWTaskItem)(nil), // 30: DBWTaskItem
+ (*UserAssets)(nil), // 31: UserAssets
+ (*BattleFormation)(nil), // 32: BattleFormation
+ (*BattleInfo)(nil), // 33: BattleInfo
+ (*BattleReport)(nil), // 34: BattleReport
+ (*DBWTaskBox)(nil), // 35: DBWTaskBox
}
var file_wtask_wtask_msg_proto_depIdxs = []int32{
- 23, // 0: WTaskInfoResp.info:type_name -> DBWTask
- 24, // 1: WTaskInfoResp.accepts:type_name -> DBWTaskItem
- 24, // 2: WTaskAcceptResp.accepts:type_name -> DBWTaskItem
- 24, // 3: WTaskCompleteCondiResp.progress:type_name -> DBWTaskItem
- 25, // 4: WTaskFinishResp.award:type_name -> UserAssets
- 21, // 5: WTaskFinishResp.groups:type_name -> WTaskFinishResp.GroupsEntry
- 25, // 6: WTaskChapterRewardResp.award:type_name -> UserAssets
- 24, // 7: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem
- 26, // 8: WTaskBattleStartReq.battle:type_name -> BattleFormation
- 27, // 9: WTaskBattleStartResp.info:type_name -> BattleInfo
- 28, // 10: WTaskBattleFinishReq.report:type_name -> BattleReport
- 22, // 11: WTaskBoxChangePush.boxs:type_name -> WTaskBoxChangePush.BoxsEntry
- 25, // 12: WTaskBoxReceiveResp.award:type_name -> UserAssets
- 25, // 13: WTaskExchangeResp.award:type_name -> UserAssets
- 29, // 14: WTaskBoxChangePush.BoxsEntry.value:type_name -> DBWTaskBox
- 15, // [15:15] is the sub-list for method output_type
- 15, // [15:15] is the sub-list for method input_type
- 15, // [15:15] is the sub-list for extension type_name
- 15, // [15:15] is the sub-list for extension extendee
- 0, // [0:15] is the sub-list for field type_name
+ 29, // 0: WTaskInfoResp.info:type_name -> DBWTask
+ 30, // 1: WTaskInfoResp.accepts:type_name -> DBWTaskItem
+ 30, // 2: WTaskAcceptResp.accepts:type_name -> DBWTaskItem
+ 30, // 3: WTaskCompleteCondiResp.progress:type_name -> DBWTaskItem
+ 31, // 4: WTaskFinishResp.award:type_name -> UserAssets
+ 27, // 5: WTaskFinishResp.groups:type_name -> WTaskFinishResp.GroupsEntry
+ 31, // 6: WTaskChapterRewardResp.award:type_name -> UserAssets
+ 30, // 7: WTaskAcceptChangePush.accepts:type_name -> DBWTaskItem
+ 32, // 8: WTaskBattleStartReq.battle:type_name -> BattleFormation
+ 33, // 9: WTaskBattleStartResp.info:type_name -> BattleInfo
+ 34, // 10: WTaskBattleFinishReq.report:type_name -> BattleReport
+ 28, // 11: WTaskBoxChangePush.boxs:type_name -> WTaskBoxChangePush.BoxsEntry
+ 31, // 12: WTaskBoxReceiveResp.award:type_name -> UserAssets
+ 31, // 13: WTaskExchangeResp.award:type_name -> UserAssets
+ 32, // 14: WTaskBattleEventReq.battle:type_name -> BattleFormation
+ 33, // 15: WTaskBattleEventResp.info:type_name -> BattleInfo
+ 34, // 16: WTaskEventCompleteReq.report:type_name -> BattleReport
+ 31, // 17: WTaskEventCompleteResp.award:type_name -> UserAssets
+ 35, // 18: WTaskBoxChangePush.BoxsEntry.value:type_name -> DBWTaskBox
+ 19, // [19:19] is the sub-list for method output_type
+ 19, // [19:19] is the sub-list for method input_type
+ 19, // [19:19] is the sub-list for extension type_name
+ 19, // [19:19] is the sub-list for extension extendee
+ 0, // [0:19] is the sub-list for field type_name
}
func init() { file_wtask_wtask_msg_proto_init() }
@@ -1603,6 +2007,78 @@ func file_wtask_wtask_msg_proto_init() {
return nil
}
}
+ file_wtask_wtask_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WTaskEventTargetReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_wtask_wtask_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WTaskEventTargetResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_wtask_wtask_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WTaskBattleEventReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_wtask_wtask_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WTaskBattleEventResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_wtask_wtask_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WTaskEventCompleteReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_wtask_wtask_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WTaskEventCompleteResp); 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{
@@ -1610,7 +2086,7 @@ func file_wtask_wtask_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_wtask_wtask_msg_proto_rawDesc,
NumEnums: 0,
- NumMessages: 23,
+ NumMessages: 29,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/sys/configure/structs/Game.WorldRd.go b/sys/configure/structs/Game.WorldRd.go
new file mode 100644
index 000000000..a8597d54e
--- /dev/null
+++ b/sys/configure/structs/Game.WorldRd.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameWorldRd struct {
+ _dataMap map[int32]*GameWorldRdData
+ _dataList []*GameWorldRdData
+}
+
+func NewGameWorldRd(_buf []map[string]interface{}) (*GameWorldRd, error) {
+ _dataList := make([]*GameWorldRdData, 0, len(_buf))
+ dataMap := make(map[int32]*GameWorldRdData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameWorldRdData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Id] = _v
+ }
+ }
+ return &GameWorldRd{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameWorldRd) GetDataMap() map[int32]*GameWorldRdData {
+ return table._dataMap
+}
+
+func (table *GameWorldRd) GetDataList() []*GameWorldRdData {
+ return table._dataList
+}
+
+func (table *GameWorldRd) Get(key int32) *GameWorldRdData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.WorldRdData.go b/sys/configure/structs/Game.WorldRdData.go
new file mode 100644
index 000000000..e95f5c0b8
--- /dev/null
+++ b/sys/configure/structs/Game.WorldRdData.go
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameWorldRdData struct {
+ Id int32
+ Group int32
+ Eventname string
+ Eventweight int32
+ Eventtype int32
+ Battleready int32
+ Battleid int32
+ Getitem []*Gameatn
+}
+
+const TypeId_GameWorldRdData = -584372430
+
+func (*GameWorldRdData) GetTypeId() int32 {
+ return -584372430
+}
+
+func (_v *GameWorldRdData)Deserialize(_buf map[string]interface{}) (err error) {
+ { 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["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
+ {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["eventname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Eventname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Eventname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["eventweight"].(float64); !_ok_ { err = errors.New("eventweight error"); return }; _v.Eventweight = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["eventtype"].(float64); !_ok_ { err = errors.New("eventtype error"); return }; _v.Eventtype = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["battleready"].(float64); !_ok_ { err = errors.New("battleready error"); return }; _v.Battleready = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["battleid"].(float64); !_ok_ { err = errors.New("battleid error"); return }; _v.Battleid = int32(_tempNum_) }
+ {
+ var _arr_ []interface{}
+ var _ok_ bool
+ if _arr_, _ok_ = _buf["getitem"].([]interface{}); !_ok_ { err = errors.New("getitem error"); return }
+
+ _v.Getitem = make([]*Gameatn, 0, len(_arr_))
+
+ for _, _e_ := range _arr_ {
+ var _list_v_ *Gameatn
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
+ _v.Getitem = append(_v.Getitem, _list_v_)
+ }
+ }
+
+ return
+}
+
+func DeserializeGameWorldRdData(_buf map[string]interface{}) (*GameWorldRdData, error) {
+ v := &GameWorldRdData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go
index b060e6bc2..91dc969aa 100644
--- a/sys/configure/structs/Tables.go
+++ b/sys/configure/structs/Tables.go
@@ -99,6 +99,7 @@ type Tables struct {
WorldTask *GameWorldTask
WorldAll *GameWorldAll
WorldDeal *GameWorldDeal
+ WorldRd *GameWorldRd
Teaching *GameTeaching
HeroStrategy *GameHeroStrategy
FightGlobalEvent *GameFightGlobalEvent
@@ -750,6 +751,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.WorldDeal, err = NewGameWorldDeal(buf) ; err != nil {
return nil, err
}
+ if buf, err = loader("game_worldrd") ; err != nil {
+ return nil, err
+ }
+ if tables.WorldRd, err = NewGameWorldRd(buf) ; err != nil {
+ return nil, err
+ }
if buf, err = loader("game_teaching") ; err != nil {
return nil, err
}