diff --git a/comm/const.go b/comm/const.go index 56bc17c35..b8653bc09 100644 --- a/comm/const.go +++ b/comm/const.go @@ -462,6 +462,13 @@ const ( //专武装备数据表 TableExclusive = "exclusive" + + //实时竞技场 + TableRealarena = "realarena" + //实时竞技场 战斗记录 + TableRealarenaRecord = "realarenarecord" + //实时竞技场排名 + TableRealarenaRank = "realarenarank" ) // RPC服务接口定义处 diff --git a/comm/imodule.go b/comm/imodule.go index beefa10b0..807caccda 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -523,7 +523,7 @@ type ( //添加武馆资源 AddItems(session IUserSession, items map[string]int32, bPush bool) (errdata *pb.ErrorData) //pvp切磋结果通知 - ChallengeResults(bid, red, bule string, winSide int32) + ChallengeResults(bid, red, bule string, winSide int32, report *pb.BattleReport) // 清除玩家踢馆状态 CleanUpNpc(uid string) @@ -767,6 +767,6 @@ type ( //实时竞技场 IRealarena interface { //pvp切磋结果通知 - ChallengeResults(bid, red, bule string, winSide int32) + ChallengeResults(bid, red, bule string, winSide int32, report *pb.BattleReport) } ) diff --git a/modules/practice/module.go b/modules/practice/module.go index 4419c0194..111a94d84 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -235,7 +235,7 @@ func (this *Practice) OpenCmdNotice(session comm.IUserSession, keys ...string) { // } } -func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) { +func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32, report *pb.BattleReport) { this.Debug("ChallengeResults", log.Field{Key: "bid", Value: bid}, log.Field{Key: "red", Value: red}, diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 3e39fc9c6..6cdd11e1b 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -265,12 +265,12 @@ func (this *Pvp) PvpFinishPush(out *pb.BattleFinishPush) { case pb.PlayType_friendsmeet: go func() { this.gameInvite.GameInviteEnd(3, battle.Red.Uid) - this.practice.ChallengeResults(out.Battleid, battle.Red.Uid, battle.Blue.Uid, out.WinSide) + this.practice.ChallengeResults(out.Battleid, battle.Red.Uid, battle.Blue.Uid, out.WinSide, out.Report) }() break case pb.PlayType_realarena: go func() { - this.realarena.ChallengeResults(out.Battleid, battle.Red.Uid, battle.Blue.Uid, out.WinSide) + this.realarena.ChallengeResults(out.Battleid, battle.Red.Uid, battle.Blue.Uid, out.WinSide, out.Report) }() break } @@ -323,7 +323,7 @@ func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) { } go func() { this.gameInvite.GameInviteEnd(3, battle.Red.Uid) - this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, winside) + this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, winside, nil) }() break } diff --git a/modules/realarena/model.go b/modules/realarena/model.go index 4c075be7c..9fe9e2320 100644 --- a/modules/realarena/model.go +++ b/modules/realarena/model.go @@ -3,6 +3,7 @@ package realarena import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -29,7 +30,7 @@ type modelComp struct { // 组件初始化接口 func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { - this.TableName = comm.TableExclusive + this.TableName = comm.TableRealarena this.MCompModel.Init(service, module, comp, opt) this.module = module.(*RealArena) //创建uid索引 @@ -40,9 +41,12 @@ func (this *modelComp) Init(service core.IService, module core.IModule, comp cor } func (this *modelComp) Start() (err error) { - this.whichissue = &pb.DBRealArenaWhichIssue{} - this.module.ModuleTools.GetGlobalData(GlobalWhichIssueKey, this.whichissue) - this.computeWhich() + err = this.MCompModel.Start() + event.RegisterGO(core.Event_ServiceStartEnd, func() { + this.whichissue = &pb.DBRealArenaWhichIssue{} + this.module.ModuleTools.GetGlobalData(GlobalWhichIssueKey, this.whichissue) + this.computeWhich() + }) return } diff --git a/modules/realarena/modelrank.go b/modules/realarena/modelrank.go index 7bb73b47d..da31d4333 100644 --- a/modules/realarena/modelrank.go +++ b/modules/realarena/modelrank.go @@ -21,7 +21,7 @@ type modelRank struct { // 组件初始化接口 func (this *modelRank) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { - this.TableName = comm.TableArenaRank + this.TableName = comm.TableRealarenaRank this.MCompModel.Init(service, module, comp, opt) this.module = module.(*RealArena) diff --git a/modules/realarena/modelrecord.go b/modules/realarena/modelrecord.go new file mode 100644 index 000000000..998176113 --- /dev/null +++ b/modules/realarena/modelrecord.go @@ -0,0 +1,30 @@ +package realarena + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +// /装备 数据组件 +type modelRecordComp struct { + modules.MCompModel + module *RealArena + whichissue *pb.DBRealArenaWhichIssue +} + +// 组件初始化接口 +func (this *modelRecordComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { + this.TableName = comm.TableRealarenaRecord + this.MCompModel.Init(service, module, comp, opt) + this.module = module.(*RealArena) + //创建uid索引 + _, err = this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} diff --git a/modules/realarena/module.go b/modules/realarena/module.go index 34d3b2fea..013e5292d 100644 --- a/modules/realarena/module.go +++ b/modules/realarena/module.go @@ -180,7 +180,7 @@ func (this *RealArena) endgame(ctx context.Context, req *pb.RPC_RealArenaTrustee } //战斗结束 -func (this *RealArena) ChallengeResults(roomid, red, bule string, winSide int32) { +func (this *RealArena) ChallengeResults(roomid, red, bule string, winSide int32, report *pb.BattleReport) { this.Debug("ChallengeResults", log.Field{Key: "roomid", Value: roomid}) var ( room *Room diff --git a/modules/realarena/romm.go b/modules/realarena/romm.go index a3adebef2..e3f9dbcf8 100644 --- a/modules/realarena/romm.go +++ b/modules/realarena/romm.go @@ -162,7 +162,7 @@ func (this *Room) UserOffline(uid string) (err error) { if this.members[0].User.Uid == uid { winSide = 2 } - this.module.ChallengeResults(this.Id, this.members[0].User.Uid, this.members[1].User.Uid, winSide) + this.module.ChallengeResults(this.Id, this.members[0].User.Uid, this.members[1].User.Uid, winSide, nil) return } diff --git a/pb/battle_msg.pb.go b/pb/battle_msg.pb.go index 82e1cc536..63ce5b4a1 100644 --- a/pb/battle_msg.pb.go +++ b/pb/battle_msg.pb.go @@ -1761,8 +1761,9 @@ type BattleFinishPush struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"` - WinSide int32 `protobuf:"varint,2,opt,name=winSide,proto3" json:"winSide"` + Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"` + WinSide int32 `protobuf:"varint,2,opt,name=winSide,proto3" json:"winSide"` + Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` } func (x *BattleFinishPush) Reset() { @@ -1811,6 +1812,13 @@ func (x *BattleFinishPush) GetWinSide() int32 { return 0 } +func (x *BattleFinishPush) GetReport() *BattleReport { + if x != nil { + return x.Report + } + return nil +} + //战斗认输 请求 type BattleConcedeReq struct { state protoimpl.MessageState @@ -2371,55 +2379,58 @@ var file_battle_battle_msg_proto_rawDesc = []byte{ 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, - 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x48, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x6f, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x53, 0x69, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x22, - 0x42, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, - 0x69, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, - 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, - 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, - 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 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, 0x24, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, - 0x6d, 0x64, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x43, 0x6d, 0x64, 0x73, 0x22, 0xf2, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x6f, 0x6e, 0x65, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x06, 0x64, 0x69, 0x42, - 0x75, 0x66, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x79, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x64, 0x69, 0x42, 0x75, 0x66, 0x66, 0x12, - 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, - 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, - 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, - 0x70, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, - 0x6f, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x42, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, - 0x42, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x50, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x05, 0x50, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x13, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 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, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, - 0x73, 0x69, 0x64, 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, 0x2e, 0x0a, - 0x09, 0x64, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x53, 0x69, 0x64, 0x65, 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, 0x42, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 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, 0x24, 0x0a, 0x07, + 0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d, + 0x64, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, + 0x64, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x22, 0xf2, 0x01, 0x0a, + 0x0f, 0x53, 0x74, 0x72, 0x6f, 0x6e, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x24, 0x0a, 0x06, 0x64, 0x69, 0x42, 0x75, 0x66, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x44, 0x79, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, + 0x64, 0x69, 0x42, 0x75, 0x66, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x42, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x42, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, + 0x50, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x50, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, + 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x50, + 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 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, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x69, 0x64, 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, 0x2e, 0x0a, 0x09, 0x64, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x65, 0x66, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2511,21 +2522,22 @@ var file_battle_battle_msg_proto_depIdxs = []int32{ 35, // 32: BattleInCmdReq.in:type_name -> BattleCmd 35, // 33: BattleInCmdResp.in:type_name -> BattleCmd 35, // 34: BattleOutCmdPush.cmd:type_name -> BattleCmd - 11, // 35: BattleStateInfo.info:type_name -> BattleInfo - 35, // 36: BattleStateInfo.outCmds:type_name -> BattleCmd - 35, // 37: BattleStateInfo.inputCmds:type_name -> BattleCmd - 37, // 38: StroneBattleReq.diBuff:type_name -> DySkillData - 32, // 39: StroneBattleReq.role:type_name -> BattleRole - 33, // 40: StroneBattleReq.Btype:type_name -> BattleType - 30, // 41: StroneBattleReq.Ptype:type_name -> PlayType - 30, // 42: BattlePVEPlunderReq.ptype:type_name -> PlayType - 2, // 43: BattlePVEPlunderReq.format:type_name -> BattleFormation - 2, // 44: BattlePVEPlunderReq.defformat:type_name -> BattleFormation - 45, // [45:45] is the sub-list for method output_type - 45, // [45:45] is the sub-list for method input_type - 45, // [45:45] is the sub-list for extension type_name - 45, // [45:45] is the sub-list for extension extendee - 0, // [0:45] is the sub-list for field type_name + 12, // 35: BattleFinishPush.report:type_name -> BattleReport + 11, // 36: BattleStateInfo.info:type_name -> BattleInfo + 35, // 37: BattleStateInfo.outCmds:type_name -> BattleCmd + 35, // 38: BattleStateInfo.inputCmds:type_name -> BattleCmd + 37, // 39: StroneBattleReq.diBuff:type_name -> DySkillData + 32, // 40: StroneBattleReq.role:type_name -> BattleRole + 33, // 41: StroneBattleReq.Btype:type_name -> BattleType + 30, // 42: StroneBattleReq.Ptype:type_name -> PlayType + 30, // 43: BattlePVEPlunderReq.ptype:type_name -> PlayType + 2, // 44: BattlePVEPlunderReq.format:type_name -> BattleFormation + 2, // 45: BattlePVEPlunderReq.defformat:type_name -> BattleFormation + 46, // [46:46] is the sub-list for method output_type + 46, // [46:46] is the sub-list for method input_type + 46, // [46:46] is the sub-list for extension type_name + 46, // [46:46] is the sub-list for extension extendee + 0, // [0:46] is the sub-list for field type_name } func init() { file_battle_battle_msg_proto_init() } diff --git a/services/cmd/main.go b/services/cmd/main.go index 397aff427..71a542daa 100644 --- a/services/cmd/main.go +++ b/services/cmd/main.go @@ -281,15 +281,15 @@ func syncServer() { `) case "battle": exesshcomd("10.0.0.9", ` - cd /home/liwei/dfbattle/output; ./stop.sh; + cd /home/liwei/dfbattle/docker_battle; ./stop.sh; cd /home/liwei/fightdll; svn update; sudo cp -f /home/liwei/fightdll/FightRunner.dll /home/liwei/dfbattle/lib/FightRunner.dll; sudo cp -f /home/liwei/fightdll/GameFight.dll /home/liwei/dfbattle/lib/GameFight.dll; sudo cp -f /home/liwei/fightdll/GameProto.dll /home/liwei/dfbattle/lib/GameProto.dll; sudo cp -r -f /home/liwei/fightdll/GameConfig/* /home/liwei/dfbattle/GameConfig/; - cd /home/liwei/dfbattle; dotnet clean; dotnet build -o output; - sudo cp -r -f /home/liwei/dfbattle/GameConfig/* /home/liwei/dfbattle/output/GameConfig/; - cd /home/liwei/dfbattle/output; ./start.sh ; + cd /home/liwei/dfbattle; dotnet clean; dotnet build -o docker_battle; + sudo cp -r -f /home/liwei/dfbattle/GameConfig/* /home/liwei/dfbattle/docker_battle/GameConfig/; + cd /home/liwei/dfbattle/docker_battle; ./start.sh ; cd /home/liwei/dfbattle; git add ./lib/* ./GameConfig/*; git commit -m 同步战斗服; git push; `) }