diff --git a/comm/imodule.go b/comm/imodule.go index 6950ce075..172d9ae3e 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -319,6 +319,8 @@ type ( ConcedeBattle(req *pb.BattleConcedeReq) (errdata *pb.ErrorData) //校验战报 CheckBattleReport(session IUserSession, report *pb.BattleReport) (errdata *pb.ErrorData, iswin bool) + ///创建石阵秘境战斗 + CreateStoneBattle(session IUserSession, req *pb.BattlePVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) } IGm interface { CreateCmd(session IUserSession, cmd string) (errdata *pb.ErrorData) diff --git a/modules/battle/module.go b/modules/battle/module.go index a04c8552c..5bbaeb01e 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -470,3 +470,55 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt return nil, false } } + +// 创建石阵秘境战斗 +func (this *Battle) CreateStoneBattle(session comm.IUserSession, req *pb.BattlePVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) { + var ( + conn *db.DBConn + err error + ) + if !this.IsCross() { + conn, err = db.Local() + } else { + conn, err = db.ServerDBConn(session.GetServiecTag()) + } + if err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + this.Errorf("session:%v err:", session, err) + return + } + if req.Format == nil || req.Format.Format == nil || len(req.Format.Format) != 5 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + return + } + if req.Format.Friendformat != nil && len(req.Format.Friendformat) != 5 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + } + var flag bool + 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 { + return + } + if flag { + go this.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype12, 1)) + } + return +} diff --git a/modules/stonehenge/api_challenge.go b/modules/stonehenge/api_challenge.go index b57e1a6c1..ee0f70a65 100644 --- a/modules/stonehenge/api_challenge.go +++ b/modules/stonehenge/api_challenge.go @@ -55,9 +55,9 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.StonehengeBattleR if errdata = this.BattleCheck(session, req); errdata != nil { return // 参数校验失败直接返回 } - // - errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ - Ptype: pb.PlayType_mainline, + // 石阵秘境战斗前准备 + errdata, record := this.module.battle.CreateStoneBattle(session, &pb.BattlePVEReq{ + Ptype: pb.PlayType_stone, Title: "", Format: req.Battle, Mformat: battleConf.FormatList, diff --git a/modules/stonehenge/api_challengeover.go b/modules/stonehenge/api_challengeover.go index 9474b432b..b3699d690 100644 --- a/modules/stonehenge/api_challengeover.go +++ b/modules/stonehenge/api_challengeover.go @@ -89,24 +89,7 @@ func (this *apiComp) BattleOver(session comm.IUserSession, req *pb.StonehengeBat break } } - // 掉落奖励 - if conf, err := this.module.configure.GetStoneEventDataById(req.Eventid); err == nil { - if battleConf, err := this.module.configure.GetBattleConfById(conf.Value1); err == nil { - user := this.module.ModuleUser.GetUser(session.GetUserId()) - if lotteryward := this.module.ModuleTools.GetGroupDataByLottery(battleConf.RewardLottery, user.Vip, user.Lv); len(lotteryward) > 0 { - if errdata, reward = this.module.DispenseAtno(session, lotteryward, true); errdata != nil { - this.module.Debugf("Mline lotteryward DispenseRes err:+%v", lotteryward) - } - } - } - } - // 战斗结束更新英雄信息 - for _, v := range stone.Hero { // 先重置血量 - v.Currhp = 0 - } - for _, v := range req.Report.Alive { // 注意 阵亡英雄不在存货列表内 - stone.Hero[v.HeroID] = v - } + update["hero"] = stone.Hero update["rooms"] = stone.Rooms this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update) diff --git a/modules/stonehenge/api_event.go b/modules/stonehenge/api_event.go index bd3286f4e..90fcf25af 100644 --- a/modules/stonehenge/api_event.go +++ b/modules/stonehenge/api_event.go @@ -86,13 +86,52 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq stone.Rooms.Selectbuff = []int32{} stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1 update["userbuff"] = stone.Userbuff + } else if eventConf.EventType == EventType14 { // 战斗事件合并 + if req.Report == nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("BattleReport is nil"), + } + return + } + bWin := false + errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report) + if errdata != nil { + return + } + if !bWin { // 战斗失败直接返回 + return + } + // 掉落奖励 + if conf, err := this.module.configure.GetStoneEventDataById(req.Eventid); err == nil { + if battleConf, err := this.module.configure.GetBattleConfById(conf.Value1); err == nil { + user := this.module.ModuleUser.GetUser(session.GetUserId()) + if lotteryward := this.module.ModuleTools.GetGroupDataByLottery(battleConf.RewardLottery, user.Vip, user.Lv); len(lotteryward) > 0 { + if errdata, reward = this.module.DispenseAtno(session, lotteryward, true); errdata != nil { + this.module.Debugf("Mline lotteryward DispenseRes err:+%v", lotteryward) + } + } + } + } + + for _, v := range req.Report.Alive { // 注意 阵亡英雄不在存货列表内 + stone.Hero[v.Oid] = v + } } stone.Rooms.Eventid[req.Eventid] = true // // 校验事件有后续事件 if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 newEvent = eventConf.PostEvent stone.Rooms.Eventid[newEvent] = false // - + if newEventConf, err = this.module.configure.GetStoneEventDataById(newEvent); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } // 如果新的事件是3选1 if newEventConf.EventType == EventType25 { for _, v := range stone.Addweight { @@ -100,29 +139,23 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq for k := range stone.Userbuff { ownerbuff[k] = struct{}{} } - stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(eventConf.Value1, v, ownerbuff) + stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(newEventConf.Value1, v, ownerbuff) } } } - - // 校验是否通关 + stone.Rooms.Complete = true for _, v := range roomConf.Condition { - if v == eventConf.EventType { - stone.Rooms.Complete = true - if newEventConf, err = this.module.configure.GetStoneEventDataById(req.Eventid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), - } - return - } - for _, v := range roomConf.Condition { - if v == newEventConf.EventType { - stone.Rooms.Complete = false // 判断新的事件导致传送门关闭 - break + for k, ok := range stone.Rooms.Eventid { + if !ok { + if eventConf, err = this.module.configure.GetStoneEventDataById(k); err == nil { + if eventConf.EventType == v { + stone.Rooms.Complete = false + break + } } } + } + if !stone.Rooms.Complete { break } } @@ -135,6 +168,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq NewEvent: newEvent, Room: stone.Rooms, Reward: reward, + Hero: stone.Hero, }) return } diff --git a/modules/stonehenge/core.go b/modules/stonehenge/core.go index 3fe212b0e..663b07bf2 100644 --- a/modules/stonehenge/core.go +++ b/modules/stonehenge/core.go @@ -1,6 +1,7 @@ package stonehenge const ( + EventType14 = 14 // 战斗事件 EventType16 = 16 // 捡垃圾事件 EventType25 = 25 // buff三选一 ) diff --git a/pb/stonehenge_msg.pb.go b/pb/stonehenge_msg.pb.go index e171898ca..bb6850a09 100644 --- a/pb/stonehenge_msg.pb.go +++ b/pb/stonehenge_msg.pb.go @@ -342,10 +342,11 @@ type StonehengeEventReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id - Param1 int32 `protobuf:"varint,2,opt,name=param1,proto3" json:"param1"` - Param2 int32 `protobuf:"varint,3,opt,name=param2,proto3" json:"param2"` - Param3 int32 `protobuf:"varint,4,opt,name=param3,proto3" json:"param3"` + Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id + Param1 int32 `protobuf:"varint,2,opt,name=param1,proto3" json:"param1"` + Param2 int32 `protobuf:"varint,3,opt,name=param2,proto3" json:"param2"` + Param3 int32 `protobuf:"varint,4,opt,name=param3,proto3" json:"param3"` + Report *BattleReport `protobuf:"bytes,5,opt,name=report,proto3" json:"report"` //战报 } func (x *StonehengeEventReq) Reset() { @@ -408,15 +409,23 @@ func (x *StonehengeEventReq) GetParam3() int32 { return 0 } +func (x *StonehengeEventReq) GetReport() *BattleReport { + if x != nil { + return x.Report + } + return nil +} + type StonehengeEventResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id - NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id - Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"` - Reward []*UserAtno `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward"` // 完成事件获得的奖励 + Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id + NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id + Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"` + Reward []*UserAtno `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward"` // 完成事件获得的奖励 + Hero map[string]*BattleRole `protobuf:"bytes,5,rep,name=hero,proto3" json:"hero" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 英雄信息 } func (x *StonehengeEventResp) Reset() { @@ -479,6 +488,13 @@ func (x *StonehengeEventResp) GetReward() []*UserAtno { return nil } +func (x *StonehengeEventResp) GetHero() map[string]*BattleRole { + if x != nil { + return x.Hero + } + return nil +} + //获取房间信息 type StonehengeGetRoomInfoReq struct { state protoimpl.MessageState @@ -941,69 +957,79 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{ 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f, - 0x72, 0x74, 0x61, 0x6c, 0x22, 0x76, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, - 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x8d, 0x01, 0x0a, - 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, - 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1a, 0x0a, 0x18, - 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, - 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x19, 0x53, 0x74, 0x6f, 0x6e, - 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, - 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, - 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, 0x14, 0x53, - 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, - 0x65, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x18, 0x02, 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, 0x51, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, - 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, + 0x72, 0x74, 0x61, 0x6c, 0x22, 0x9d, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, + 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x12, 0x25, 0x0a, + 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 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, 0x87, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, + 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, + 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x1a, 0x44, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1a, + 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, + 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x19, 0x53, 0x74, + 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, + 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, + 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, + 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, + 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x02, 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, 0x91, 0x02, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, - 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, - 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x1a, 0x44, - 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x18, 0x02, 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, 0x51, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, + 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, + 0x65, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 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, 0x91, 0x02, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, + 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, + 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, + 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, + 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, + 0x1a, 0x44, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1018,7 +1044,7 @@ func file_stonehenge_stonehenge_msg_proto_rawDescGZIP() []byte { return file_stonehenge_stonehenge_msg_proto_rawDescData } -var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{ (*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq (*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp @@ -1037,39 +1063,43 @@ var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{ (*StonehengeBattleOverReq)(nil), // 14: StonehengeBattleOverReq (*StonehengeBattleOverResp)(nil), // 15: StonehengeBattleOverResp nil, // 16: StonehengeEnterLevelResp.HeroEntry - nil, // 17: StonehengeBattleOverResp.HeroEntry - (*DBStonehenge)(nil), // 18: DBStonehenge - (*DBStoneBoss)(nil), // 19: DBStoneBoss - (*RoomData)(nil), // 20: RoomData - (*UserAtno)(nil), // 21: UserAtno - (*BattleFormation)(nil), // 22: BattleFormation - (*BattleInfo)(nil), // 23: BattleInfo - (*BattleReport)(nil), // 24: BattleReport - (*BattleRole)(nil), // 25: BattleRole + nil, // 17: StonehengeEventResp.HeroEntry + nil, // 18: StonehengeBattleOverResp.HeroEntry + (*DBStonehenge)(nil), // 19: DBStonehenge + (*DBStoneBoss)(nil), // 20: DBStoneBoss + (*RoomData)(nil), // 21: RoomData + (*BattleReport)(nil), // 22: BattleReport + (*UserAtno)(nil), // 23: UserAtno + (*BattleFormation)(nil), // 24: BattleFormation + (*BattleInfo)(nil), // 25: BattleInfo + (*BattleRole)(nil), // 26: BattleRole } var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{ - 18, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge - 19, // 1: StonehengeGetListResp.boss:type_name -> DBStoneBoss + 19, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge + 20, // 1: StonehengeGetListResp.boss:type_name -> DBStoneBoss 16, // 2: StonehengeEnterLevelResp.hero:type_name -> StonehengeEnterLevelResp.HeroEntry - 20, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData - 20, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData - 20, // 5: StonehengeEventResp.room:type_name -> RoomData - 21, // 6: StonehengeEventResp.reward:type_name -> UserAtno - 20, // 7: StonehengeGetRoomInfoResp.room:type_name -> RoomData - 18, // 8: StonehengeFinishResp.data:type_name -> DBStonehenge - 22, // 9: StonehengeBattleReq.battle:type_name -> BattleFormation - 23, // 10: StonehengeBattleResp.info:type_name -> BattleInfo - 24, // 11: StonehengeBattleOverReq.report:type_name -> BattleReport - 20, // 12: StonehengeBattleOverResp.room:type_name -> RoomData - 21, // 13: StonehengeBattleOverResp.reward:type_name -> UserAtno - 17, // 14: StonehengeBattleOverResp.hero:type_name -> StonehengeBattleOverResp.HeroEntry - 25, // 15: StonehengeEnterLevelResp.HeroEntry.value:type_name -> BattleRole - 25, // 16: StonehengeBattleOverResp.HeroEntry.value:type_name -> BattleRole - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 21, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData + 21, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData + 22, // 5: StonehengeEventReq.report:type_name -> BattleReport + 21, // 6: StonehengeEventResp.room:type_name -> RoomData + 23, // 7: StonehengeEventResp.reward:type_name -> UserAtno + 17, // 8: StonehengeEventResp.hero:type_name -> StonehengeEventResp.HeroEntry + 21, // 9: StonehengeGetRoomInfoResp.room:type_name -> RoomData + 19, // 10: StonehengeFinishResp.data:type_name -> DBStonehenge + 24, // 11: StonehengeBattleReq.battle:type_name -> BattleFormation + 25, // 12: StonehengeBattleResp.info:type_name -> BattleInfo + 22, // 13: StonehengeBattleOverReq.report:type_name -> BattleReport + 21, // 14: StonehengeBattleOverResp.room:type_name -> RoomData + 23, // 15: StonehengeBattleOverResp.reward:type_name -> UserAtno + 18, // 16: StonehengeBattleOverResp.hero:type_name -> StonehengeBattleOverResp.HeroEntry + 26, // 17: StonehengeEnterLevelResp.HeroEntry.value:type_name -> BattleRole + 26, // 18: StonehengeEventResp.HeroEntry.value:type_name -> BattleRole + 26, // 19: StonehengeBattleOverResp.HeroEntry.value:type_name -> BattleRole + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_stonehenge_stonehenge_msg_proto_init() } @@ -1281,7 +1311,7 @@ func file_stonehenge_stonehenge_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, },