上传关卡通关判断

This commit is contained in:
liwei1dao 2022-11-16 17:07:57 +08:00
parent 2ab6d09c06
commit da20143ec2
19 changed files with 1269 additions and 624 deletions

View File

@ -1,6 +1,7 @@
[
{
"id": 10001,
"scene": "LevelDemo",
"formatList": [
110211,
110212
@ -9,12 +10,8 @@
1001,
1002
],
"passformatList": [
110211,
110212
],
"passformatList": [],
"passdroplist": [
1001,
1002
],
"award": [
@ -27,17 +24,18 @@
},
{
"id": 10002,
"scene": "LevelDemo",
"formatList": [
110212,
110213
],
"droplist": [
1002
1001
],
"passformatList": [
110212
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -48,17 +46,18 @@
},
{
"id": 10003,
"scene": "LevelDemo",
"formatList": [
110213,
110214
],
"droplist": [
1003
1001
],
"passformatList": [
110213
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -69,17 +68,18 @@
},
{
"id": 20001,
"scene": "LevelDemo",
"formatList": [
110214,
110215
],
"droplist": [
1004
1001
],
"passformatList": [
110214
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -90,17 +90,18 @@
},
{
"id": 20002,
"scene": "LevelDemo",
"formatList": [
110215,
110216
],
"droplist": [
1005
1001
],
"passformatList": [
110215
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -111,17 +112,18 @@
},
{
"id": 20003,
"scene": "LevelDemo",
"formatList": [
110216,
120031
],
"droplist": [
1006
1001
],
"passformatList": [
110216
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -132,17 +134,18 @@
},
{
"id": 30001,
"scene": "LevelDemo_Fcamer",
"formatList": [
120031,
120032
],
"droplist": [
1007
1001
],
"passformatList": [
120031
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -153,17 +156,18 @@
},
{
"id": 30002,
"scene": "LevelDemo_Fcamer",
"formatList": [
120032,
120033
],
"droplist": [
1008
1001
],
"passformatList": [
120032
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -174,17 +178,18 @@
},
{
"id": 30003,
"scene": "LevelDemo_Fcamer",
"formatList": [
120033,
120034
],
"droplist": [
1009
1001
],
"passformatList": [
120033
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -195,17 +200,18 @@
},
{
"id": 40001,
"scene": "LevelDemo_Fcamer",
"formatList": [
120034,
120035
],
"droplist": [
1010
1001
],
"passformatList": [
120034
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -216,16 +222,17 @@
},
{
"id": 40002,
"scene": "LevelDemo_Fcamer",
"formatList": [
120035
],
"droplist": [
1011
1001
],
"passformatList": [
120035
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -236,16 +243,17 @@
},
{
"id": 40003,
"scene": "LevelDemo_Fcamer",
"formatList": [
120036
],
"droplist": [
1012
1001
],
"passformatList": [
120036
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -256,16 +264,17 @@
},
{
"id": 50001,
"scene": "LevelDemo_Fcamer",
"formatList": [
130011
],
"droplist": [
1013
1001
],
"passformatList": [
130011
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -276,16 +285,17 @@
},
{
"id": 50002,
"scene": "LevelDemo_Fcamer",
"formatList": [
130012
],
"droplist": [
1014
1001
],
"passformatList": [
130012
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",
@ -296,16 +306,17 @@
},
{
"id": 50003,
"scene": "LevelDemo_Fcamer",
"formatList": [
130013
],
"droplist": [
1015
1001
],
"passformatList": [
130013
"passformatList": [],
"passdroplist": [
1001
],
"passdroplist": [],
"award": [
{
"a": "attr",

View File

@ -2,8 +2,8 @@
{
"id": 110211,
"formatList": [
101072,
101073
101071,
101072
],
"award": [
{

View File

@ -4,11 +4,15 @@
"FormatList": [
700011
],
"captainId": "250011",
"buff": [],
"battlestory": [],
"teammate": [],
"numberofteam": 0,
"battleteam": []
"DefaultHero": 700011,
"SelectableHero": [],
"LockSlots": [
3,
4
],
"AssistTeam": 710003,
"EventList": [
12
]
}
]

File diff suppressed because it is too large Load Diff

View File

@ -232,7 +232,8 @@ const ( //Rpc
// 充值发货
Rpc_ModulePayDelivery core.Rpc_Key = "Rpc_ModulePayDelivery" //充值发货
// 配置更新
Rpc_ConfigureUpDate core.Rpc_Key = "Rpc_ConfigureUpDate" //配置更新
// 羁绊信息
Rpc_ModuleFetter core.Rpc_Key = "Rpc_ModuleFetter"

View File

@ -48,9 +48,11 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.AcademyChallen
return
}
cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{
Ptype: pb.PlayType_academy,
Redformat: level.UsFormatList,
Buleformat: level.FormatList,
Ptype: pb.PlayType_academy,
Format: nil,
Sysformat: level.UsFormatList,
Backupformat: nil,
Buleformat: level.FormatList,
})
return
}

View File

@ -48,9 +48,11 @@ func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeaching
return
}
cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{
Ptype: pb.PlayType_heroteaching,
Redformat: level.UsFormatList,
Buleformat: level.FormatList,
Ptype: pb.PlayType_heroteaching,
Format: nil,
Sysformat: level.UsFormatList,
Backupformat: nil,
Buleformat: level.FormatList,
})
return
}

View File

@ -52,7 +52,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
Ptype: req.Ptype,
State: pb.BBattleState_in,
RedCompId: session.GetUserId(),
Redflist: make([]*pb.DBBattleFormt, len(req.Redformat)),
BlueCompId: "",
Buleflist: make([]*pb.DBBattleFormt, len(req.Buleformat)),
}
@ -60,15 +59,99 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon
captain int32
masters []*pb.BattleRole
)
for i, v := range req.Redformat {
if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success {
return
if req.Format != nil {
model := db.NewDBModel(comm.TableHero, time.Hour, conn)
record.Redflist = make([]*pb.DBBattleFormt, 1)
//自己的英雄阵营
for i, v := range req.Format.Format {
if v != "" {
hero := &pb.DBHero{}
if err := model.GetListObj(session.GetUserId(), v, hero); err != nil {
code = pb.ErrorCode_HeroNoExist
return
}
tid := 100 + i
if record.Redflist[0].Team[i], code = this.createBattleRole(hero, tid, i); code != pb.ErrorCode_Success {
return
}
} else {
record.Redflist[0].Team[i] = nil
}
}
record.Redflist[i] = &pb.DBBattleFormt{
Leadpos: captain,
Team: masters,
//好友的英雄阵营
for i, v := range req.Format.Friendformat {
if v != "" {
var (
hero *pb.DBHero
err error
)
// 获取好友英雄信息
if this.module.IsCross() {
if hero, err = this.module.friend.UseAssistHero(session.GetUserId(), v); err != nil {
this.module.Errorln(err)
code = pb.ErrorCode_HeroNoExist
return
}
} else { //获取跨服数据
hero = &pb.DBHero{}
if err = this.module.service.AcrossClusterRpcCall(
context.Background(),
this.module.GetCrossTag(),
comm.Service_Worker,
string(comm.Rpc_ModuleFriendUseAssitHero),
pb.RPCGeneralReqA2{Param1: session.GetUserId(), Param2: v},
hero); err != nil {
this.module.Errorln(err)
}
}
tid := 100 + i
if record.Redflist[0].Team[i], code = this.createBattleRole(hero, tid, i); code != pb.ErrorCode_Success {
return
}
record.Redflist[0].Team[i].Ishelp = true
}
}
if req.Sysformat != nil && len(req.Sysformat) > 0 {
for i, v := range req.Sysformat {
if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success {
return
}
record.Redflist[i].Systeam = masters
if record.Redflist[i].Leadpos == -1 && captain != -1 {
record.Redflist[i].Leadpos = captain
}
}
}
if req.Backupformat != nil && len(req.Backupformat) > 0 {
for i, v := range req.Backupformat {
if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success {
return
}
record.Redflist[i].Backupteam = masters
}
}
} else {
record.Redflist = make([]*pb.DBBattleFormt, len(req.Sysformat))
for i, v := range req.Sysformat {
if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success {
return
}
record.Redflist[i] = &pb.DBBattleFormt{
Leadpos: captain,
Systeam: masters,
}
}
if req.Backupformat != nil && len(req.Backupformat) > 0 {
for i, v := range req.Backupformat {
if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success {
return
}
record.Redflist[i].Backupteam = masters
}
}
}
for i, v := range req.Buleformat {
if captain, masters, code = this.createMasterRoles(200, i, v); code != pb.ErrorCode_Success {
return
@ -270,6 +353,7 @@ func (this *modelBattleComp) createMasterRoles(comp, wheel int, fid int32) (capt
code = pb.ErrorCode_ConfigNoFound
return
}
captain = -1
roles = make([]*pb.BattleRole, len(result))
for i, v := range result {
if v != nil {

View File

@ -19,8 +19,9 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
var (
iswin bool
info *pb.DBCombatUser
level *cfg.GameCombatLevelData
manster *cfg.GameCombatMansterData
pass bool
// group []*cfg.GameTeachingData
err error
)
@ -35,6 +36,10 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
code = pb.ErrorCode_DBError
return
}
if level, err = this.module.configure.getCombatLevel(info.Currlevel); err != nil {
code = pb.ErrorCode_DBError
return
}
if manster, err = this.module.configure.getGameCombatManster(req.Manster); err != nil {
code = pb.ErrorCode_ConfigNoFound
return
@ -52,8 +57,33 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
return
}
for _, v := range level.Passdroplist {
ispass := false
for _, v1 := range info.Passdrop {
if v == v1 {
ispass = true
}
}
if !ispass {
pass = false
break
}
}
for _, v := range level.PassformatList {
ispass := false
for _, v1 := range info.Passmanster {
if v == v1 {
ispass = true
}
}
if !ispass {
pass = false
break
}
}
this.module.DispenseRes(session, manster.Award, true)
}
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Issucc: true})
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Issucc: true, Pass: pass})
return
}

View File

@ -3,6 +3,7 @@ package combat
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto"
)
@ -16,9 +17,10 @@ func (this *apiComp) DropCheck(session comm.IUserSession, req *pb.CombatDropReq)
///奖励领取
func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (code pb.ErrorCode, data proto.Message) {
var (
info *pb.DBCombatUser
atns []*pb.UserAssets
err error
info *pb.DBCombatUser
level *cfg.GameCombatLevelData
atns []*pb.UserAssets
err error
)
if code = this.DropCheck(session, req); code != pb.ErrorCode_Success {
return
@ -28,7 +30,10 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod
code = pb.ErrorCode_DBError
return
}
if level, err = this.module.configure.getCombatLevel(info.Currlevel); err != nil {
code = pb.ErrorCode_DBError
return
}
for _, v := range info.Passdrop {
if v == req.Drop {
code = pb.ErrorCode_ReqParameterError
@ -51,6 +56,33 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod
N: v.N,
}
}
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code, Atns: atns})
pass := true
for _, v := range level.Passdroplist {
ispass := false
for _, v1 := range info.Passdrop {
if v == v1 {
ispass = true
}
}
if !ispass {
pass = false
break
}
}
for _, v := range level.PassformatList {
ispass := false
for _, v1 := range info.Passmanster {
if v == v1 {
ispass = true
}
}
if !ispass {
pass = false
break
}
}
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code, Atns: atns, Pass: pass})
return
}

42
modules/web/api_upload.go Normal file
View File

@ -0,0 +1,42 @@
package web
import (
"context"
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/gin/engine"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"strconv"
)
//上传配置文件
func (this *Api_Comp) Upload(c *engine.Context) {
filenum := c.PostForm("filenum")
if filenum != "" {
if n, err := strconv.Atoi(filenum); err != nil {
this.module.Errorln(err)
return
} else {
for i := 0; i < n; i++ {
if fn, err := c.FormFile(fmt.Sprintf("file_%d", i)); err != nil {
this.module.Errorln(err)
return
} else {
if err = c.SaveUploadedFile(fn, fmt.Sprintf("%s/%s", configure.ConfigurePath(), fn.Filename)); err != nil {
this.module.Errorln(err)
return
}
}
}
}
if err := this.module.service.RpcBroadcast(
context.Background(),
comm.Service_Worker,
string(comm.Rpc_ConfigureUpDate),
&pb.EmptyReq{},
&pb.EmptyResp{}); err != nil {
this.module.Errorln(err)
}
}
}

View File

@ -36,13 +36,15 @@ func (this *apiComp) Battlestart(session comm.IUserSession, req *pb.WorldtaskBat
record *pb.DBBattleRecord
resp *pb.WorldtaskBattleStartResp
)
code, record = b.CreatePveBattle(session, &pb.BattlePVEReq{
code, record = b.CreateEveBattle(session, &pb.BattleEVEReq{
Ptype: pb.PlayType_rtask,
Format: &pb.BattleFormation{
Leadpos: req.Leadpos,
Format: req.Teamids,
},
Mformat: battleConf.FormatList,
Sysformat: []int32{battleConf.DefaultHero},
Backupformat: []int32{battleConf.AssistTeam},
Buleformat: battleConf.FormatList,
})
if code != pb.ErrorCode_Success {
@ -59,6 +61,7 @@ func (this *apiComp) Battlestart(session comm.IUserSession, req *pb.WorldtaskBat
Redflist: record.Redflist,
BlueCompId: record.BlueCompId,
Buleflist: record.Buleflist,
Tasks: battleConf.EventList,
},
}
}

View File

@ -395,8 +395,10 @@ type DBBattleFormt struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Leadpos int32 `protobuf:"varint,1,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
Team []*BattleRole `protobuf:"bytes,2,rep,name=team,proto3" json:"team"`
Leadpos int32 `protobuf:"varint,1,opt,name=leadpos,proto3" json:"leadpos"` //队长位置
Team []*BattleRole `protobuf:"bytes,2,rep,name=team,proto3" json:"team"` //自己的战队
Systeam []*BattleRole `protobuf:"bytes,3,rep,name=systeam,proto3" json:"systeam"` //系统辅助战队
Backupteam []*BattleRole `protobuf:"bytes,4,rep,name=backupteam,proto3" json:"backupteam"` //后援战队
}
func (x *DBBattleFormt) Reset() {
@ -445,6 +447,20 @@ func (x *DBBattleFormt) GetTeam() []*BattleRole {
return nil
}
func (x *DBBattleFormt) GetSysteam() []*BattleRole {
if x != nil {
return x.Systeam
}
return nil
}
func (x *DBBattleFormt) GetBackupteam() []*BattleRole {
if x != nil {
return x.Backupteam
}
return nil
}
//战斗记录
type DBBattleRecord struct {
state protoimpl.MessageState
@ -615,58 +631,63 @@ var file_battle_battle_db_proto_rawDesc = []byte{
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, 0x09, 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, 0x4a, 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, 0x22, 0xa7, 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, 0x2a,
0x39, 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, 0x2a, 0x99, 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, 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, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75,
0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
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, 0xa7, 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, 0x2a, 0x39, 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, 0x2a,
0x99, 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, 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, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12,
0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -699,18 +720,20 @@ var file_battle_battle_db_proto_depIdxs = []int32{
8, // 1: BattleRole.equipSkill:type_name -> SkillData
7, // 2: BattleRole.property:type_name -> BattleRole.PropertyEntry
4, // 3: DBBattleFormt.team:type_name -> BattleRole
0, // 4: DBBattleRecord.btype:type_name -> BattleType
1, // 5: DBBattleRecord.ptype:type_name -> PlayType
2, // 6: DBBattleRecord.state:type_name -> BBattleState
5, // 7: DBBattleRecord.redflist:type_name -> DBBattleFormt
5, // 8: DBBattleRecord.buleflist:type_name -> DBBattleFormt
3, // 9: DBBattleRecord.roundresult:type_name -> DBBattleComp
3, // 10: DBBattleRecord.result:type_name -> DBBattleComp
11, // [11:11] is the sub-list for method output_type
11, // [11:11] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
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() }

View File

@ -153,10 +153,12 @@ type BattleEVEReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题
Redformat []int32 `protobuf:"varint,3,rep,packed,name=redformat,proto3" json:"redformat"` //红方
Buleformat []int32 `protobuf:"varint,4,rep,packed,name=buleformat,proto3" json:"buleformat"` //蓝方
Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题
Format *BattleFormation `protobuf:"bytes,3,opt,name=format,proto3" json:"format"` //布阵信息
Sysformat []int32 `protobuf:"varint,4,rep,packed,name=sysformat,proto3" json:"sysformat"` //系统辅助
Backupformat []int32 `protobuf:"varint,5,rep,packed,name=backupformat,proto3" json:"backupformat"` //后援辅助
Buleformat []int32 `protobuf:"varint,6,rep,packed,name=buleformat,proto3" json:"buleformat"` //蓝方
}
func (x *BattleEVEReq) Reset() {
@ -205,9 +207,23 @@ func (x *BattleEVEReq) GetTitle() string {
return ""
}
func (x *BattleEVEReq) GetRedformat() []int32 {
func (x *BattleEVEReq) GetFormat() *BattleFormation {
if x != nil {
return x.Redformat
return x.Format
}
return nil
}
func (x *BattleEVEReq) GetSysformat() []int32 {
if x != nil {
return x.Sysformat
}
return nil
}
func (x *BattleEVEReq) GetBackupformat() []int32 {
if x != nil {
return x.Backupformat
}
return nil
}
@ -628,69 +644,74 @@ var file_battle_battle_msg_proto_rawDesc = []byte{
0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03,
0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72,
0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x83,
0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xd1,
0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x56, 0x45, 0x52, 0x65, 0x71, 0x12,
0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09,
0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72,
0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50,
0x56, 0x45, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52,
0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x22, 0x5b, 0x0a, 0x0c, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x06,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44,
0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x01,
0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x50, 0x52, 0x65, 0x71, 0x12, 0x1f,
0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e,
0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x22, 0xa4, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
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, 0x1c, 0x0a, 0x09, 0x72, 0x65,
0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 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, 0x06, 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, 0x07, 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, 0x08, 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, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28,
0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f,
0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f,
0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b,
0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65,
0x74, 0x61, 0x73, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
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, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x12, 0x1c, 0x0a, 0x09, 0x73, 0x79, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20,
0x03, 0x28, 0x05, 0x52, 0x09, 0x73, 0x79, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22,
0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05,
0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45,
0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70,
0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18,
0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5b,
0x0a, 0x0c, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48,
0x65, 0x72, 0x6f, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x0c,
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x50, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05,
0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c,
0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x12, 0x2d, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22,
0xa4, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43,
0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 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, 0x06, 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, 0x07, 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,
0x08, 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, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52,
0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74,
0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x22,
0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x04,
0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61,
0x73, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -722,22 +743,23 @@ var file_battle_battle_msg_proto_goTypes = []interface{}{
}
var file_battle_battle_msg_proto_depIdxs = []int32{
8, // 0: BattleEVEReq.ptype:type_name -> PlayType
8, // 1: BattlePVEReq.ptype:type_name -> PlayType
1, // 2: BattlePVEReq.format:type_name -> BattleFormation
9, // 3: PVPFormation.format:type_name -> DBHero
8, // 4: BattlePVPReq.ptype:type_name -> PlayType
4, // 5: BattlePVPReq.redformat:type_name -> PVPFormation
4, // 6: BattlePVPReq.buleformat:type_name -> PVPFormation
10, // 7: BattleInfo.btype:type_name -> BattleType
8, // 8: BattleInfo.ptype:type_name -> PlayType
11, // 9: BattleInfo.redflist:type_name -> DBBattleFormt
11, // 10: BattleInfo.buleflist:type_name -> DBBattleFormt
6, // 11: BattleReport.info:type_name -> BattleInfo
12, // [12:12] is the sub-list for method output_type
12, // [12:12] is the sub-list for method input_type
12, // [12:12] is the sub-list for extension type_name
12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
1, // 1: BattleEVEReq.format:type_name -> BattleFormation
8, // 2: BattlePVEReq.ptype:type_name -> PlayType
1, // 3: BattlePVEReq.format:type_name -> BattleFormation
9, // 4: PVPFormation.format:type_name -> DBHero
8, // 5: BattlePVPReq.ptype:type_name -> PlayType
4, // 6: BattlePVPReq.redformat:type_name -> PVPFormation
4, // 7: BattlePVPReq.buleformat:type_name -> PVPFormation
10, // 8: BattleInfo.btype:type_name -> BattleType
8, // 9: BattleInfo.ptype:type_name -> PlayType
11, // 10: BattleInfo.redflist:type_name -> DBBattleFormt
11, // 11: BattleInfo.buleflist:type_name -> DBBattleFormt
6, // 12: BattleReport.info:type_name -> BattleInfo
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_msg_proto_init() }

View File

@ -5,6 +5,7 @@ import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go_dreamfactory/sys/db"
"reflect"
"sync"
@ -87,6 +88,7 @@ func (this *SCompGateRoute) Start() (err error) {
this.service.RegisterFunctionName(string(comm.Rpc_GatewayRoute), this.ReceiveMsg) //注册网关路由接收接口
this.service.RegisterFunctionName(string(comm.Rpc_GatewayNoticeUserLogin), this.NoticeUserLogin) //注册用户登录通知
this.service.RegisterFunctionName(string(comm.Rpc_GatewayNoticeUserClose), this.NoticeUserClose) //注册用户离线通知
this.service.RegisterFunctionName(string(comm.Rpc_ConfigureUpDate), this.ConfigureUpDate) //注册配置更新
err = this.ServiceCompBase.Start()
return
}
@ -206,6 +208,12 @@ func (this *SCompGateRoute) NoticeUserClose(ctx context.Context, args *pb.Notice
return nil
}
//RPC_ConfigureUpDate 接收配置更新消息
func (this *SCompGateRoute) ConfigureUpDate(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) error {
configure.Update()
return nil
}
//获取用户的会话对象
func (this *SCompGateRoute) GetUserSession(udata *pb.CacheUser) (session comm.IUserSession) {
session = this.pools.Get().(comm.IUserSession)

View File

@ -47,6 +47,10 @@ type Configure struct {
offsettime time.Duration //偏移时间
}
func (this *Configure) ConfigurePath() string {
return this.options.ConfigurePath
}
func (this *Configure) Start() (err error) {
timer := time.NewTicker(time.Second * time.Duration(this.options.CheckInterval))
go func() {
@ -69,6 +73,10 @@ func (this *Configure) Stop() (err error) {
return
}
func (this *Configure) Update() {
this.checkConfigure()
}
//服务当前时间
func (this *Configure) Now() time.Time {
return time.Now().Add(this.offsettime)

View File

@ -15,8 +15,10 @@ type (
ModTime time.Time // 文件修改时间
}
ISys interface {
ConfigurePath() string
Start() (err error)
Stop() (err error)
Update()
RegisterConfigure(name string, fn interface{}, callback func()) (err error) //注册配置
GetConfigure(name string) (v interface{}, err error) //获取配置
Now() time.Time //服务器当前时间
@ -42,12 +44,20 @@ func NewSys(option ...Option) (sys ISys, err error) {
defsys, err = newSys(options)
return
}
func ConfigurePath() string {
return defsys.ConfigurePath()
}
func Start() (err error) {
return defsys.Start()
}
func Stop() (err error) {
return defsys.Stop()
}
func Update() {
defsys.Update()
}
func RegisterConfigure(name string, fn interface{}, callback func()) (err error) {
return defsys.RegisterConfigure(name, fn, callback)
}

View File

@ -13,12 +13,11 @@ import "errors"
type GameWorldBattleData struct {
Id int32
FormatList []int32
CaptainId string
Buff []int32
Battlestory []int32
Teammate []int32
Numberofteam int32
Battleteam []int32
DefaultHero int32
SelectableHero []string
LockSlots []int32
AssistTeam int32
EventList []int32
}
const TypeId_GameWorldBattleData = 1096332216
@ -43,61 +42,47 @@ func (_v *GameWorldBattleData)Deserialize(_buf map[string]interface{}) (err erro
}
}
{ var _ok_ bool; if _v.CaptainId, _ok_ = _buf["captainId"].(string); !_ok_ { err = errors.New("captainId error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["DefaultHero"].(float64); !_ok_ { err = errors.New("DefaultHero error"); return }; _v.DefaultHero = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["buff"].([]interface{}); !_ok_ { err = errors.New("buff error"); return }
if _arr_, _ok_ = _buf["SelectableHero"].([]interface{}); !_ok_ { err = errors.New("SelectableHero error"); return }
_v.Buff = make([]int32, 0, len(_arr_))
_v.SelectableHero = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Buff = append(_v.Buff, _list_v_)
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.SelectableHero = append(_v.SelectableHero, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["battlestory"].([]interface{}); !_ok_ { err = errors.New("battlestory error"); return }
if _arr_, _ok_ = _buf["LockSlots"].([]interface{}); !_ok_ { err = errors.New("LockSlots error"); return }
_v.Battlestory = make([]int32, 0, len(_arr_))
_v.LockSlots = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Battlestory = append(_v.Battlestory, _list_v_)
_v.LockSlots = append(_v.LockSlots, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["AssistTeam"].(float64); !_ok_ { err = errors.New("AssistTeam error"); return }; _v.AssistTeam = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["teammate"].([]interface{}); !_ok_ { err = errors.New("teammate error"); return }
if _arr_, _ok_ = _buf["EventList"].([]interface{}); !_ok_ { err = errors.New("EventList error"); return }
_v.Teammate = make([]int32, 0, len(_arr_))
_v.EventList = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Teammate = append(_v.Teammate, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["numberofteam"].(float64); !_ok_ { err = errors.New("numberofteam error"); return }; _v.Numberofteam = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["battleteam"].([]interface{}); !_ok_ { err = errors.New("battleteam error"); return }
_v.Battleteam = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Battleteam = append(_v.Battleteam, _list_v_)
_v.EventList = append(_v.EventList, _list_v_)
}
}

View File

@ -26,8 +26,8 @@ type GameWorldTaskData struct {
AutoAccept int32
Overtips int32
Reword []*Gameatn
Day []string
Weather []int32
Day string
Weather int32
}
const TypeId_GameWorldTaskData = -1059668091
@ -91,34 +91,8 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["day"].([]interface{}); !_ok_ { err = errors.New("day error"); return }
_v.Day = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.Day = append(_v.Day, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["weather"].([]interface{}); !_ok_ { err = errors.New("weather error"); return }
_v.Weather = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Weather = append(_v.Weather, _list_v_)
}
}
{ var _ok_ bool; if _v.Day, _ok_ = _buf["day"].(string); !_ok_ { err = errors.New("day error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weather"].(float64); !_ok_ { err = errors.New("weather error"); return }; _v.Weather = int32(_tempNum_) }
return
}