战斗事件合并

This commit is contained in:
meixiongfeng 2023-07-28 10:45:20 +08:00
parent 9d025545f4
commit 5edbb5c709
7 changed files with 243 additions and 141 deletions

View File

@ -319,6 +319,8 @@ type (
ConcedeBattle(req *pb.BattleConcedeReq) (errdata *pb.ErrorData) ConcedeBattle(req *pb.BattleConcedeReq) (errdata *pb.ErrorData)
//校验战报 //校验战报
CheckBattleReport(session IUserSession, report *pb.BattleReport) (errdata *pb.ErrorData, iswin bool) 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 { IGm interface {
CreateCmd(session IUserSession, cmd string) (errdata *pb.ErrorData) CreateCmd(session IUserSession, cmd string) (errdata *pb.ErrorData)

View File

@ -470,3 +470,55 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
return nil, false 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
}

View File

@ -55,9 +55,9 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.StonehengeBattleR
if errdata = this.BattleCheck(session, req); errdata != nil { if errdata = this.BattleCheck(session, req); errdata != nil {
return // 参数校验失败直接返回 return // 参数校验失败直接返回
} }
// // 石阵秘境战斗前准备
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ errdata, record := this.module.battle.CreateStoneBattle(session, &pb.BattlePVEReq{
Ptype: pb.PlayType_mainline, Ptype: pb.PlayType_stone,
Title: "", Title: "",
Format: req.Battle, Format: req.Battle,
Mformat: battleConf.FormatList, Mformat: battleConf.FormatList,

View File

@ -89,24 +89,7 @@ func (this *apiComp) BattleOver(session comm.IUserSession, req *pb.StonehengeBat
break 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["hero"] = stone.Hero
update["rooms"] = stone.Rooms update["rooms"] = stone.Rooms
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update) this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)

View File

@ -86,30 +86,45 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
stone.Rooms.Selectbuff = []int32{} stone.Rooms.Selectbuff = []int32{}
stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1 stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1
update["userbuff"] = stone.Userbuff 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 // stone.Rooms.Eventid[req.Eventid] = true //
// 校验事件有后续事件 // 校验事件有后续事件
if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中 if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中
newEvent = eventConf.PostEvent newEvent = eventConf.PostEvent
stone.Rooms.Eventid[newEvent] = false // stone.Rooms.Eventid[newEvent] = false //
if newEventConf, err = this.module.configure.GetStoneEventDataById(newEvent); err != nil {
// 如果新的事件是3选1
if newEventConf.EventType == EventType25 {
for _, v := range stone.Addweight {
ownerbuff := make(map[int32]struct{}, 0)
for k := range stone.Userbuff {
ownerbuff[k] = struct{}{}
}
stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(eventConf.Value1, v, ownerbuff)
}
}
}
// 校验是否通关
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{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(), Title: pb.ErrorCode_ConfigNoFound.ToString(),
@ -117,12 +132,30 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
} }
return return
} }
// 如果新的事件是3选1
if newEventConf.EventType == EventType25 {
for _, v := range stone.Addweight {
ownerbuff := make(map[int32]struct{}, 0)
for k := range stone.Userbuff {
ownerbuff[k] = struct{}{}
}
stone.Rooms.Selectbuff = this.module.configure.GetBuffGroupDataByLottery(newEventConf.Value1, v, ownerbuff)
}
}
}
stone.Rooms.Complete = true
for _, v := range roomConf.Condition { for _, v := range roomConf.Condition {
if v == newEventConf.EventType { for k, ok := range stone.Rooms.Eventid {
stone.Rooms.Complete = false // 判断新的事件导致传送门关闭 if !ok {
if eventConf, err = this.module.configure.GetStoneEventDataById(k); err == nil {
if eventConf.EventType == v {
stone.Rooms.Complete = false
break break
} }
} }
}
}
if !stone.Rooms.Complete {
break break
} }
} }
@ -135,6 +168,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
NewEvent: newEvent, NewEvent: newEvent,
Room: stone.Rooms, Room: stone.Rooms,
Reward: reward, Reward: reward,
Hero: stone.Hero,
}) })
return return
} }

View File

@ -1,6 +1,7 @@
package stonehenge package stonehenge
const ( const (
EventType14 = 14 // 战斗事件
EventType16 = 16 // 捡垃圾事件 EventType16 = 16 // 捡垃圾事件
EventType25 = 25 // buff三选一 EventType25 = 25 // buff三选一
) )

View File

@ -346,6 +346,7 @@ type StonehengeEventReq struct {
Param1 int32 `protobuf:"varint,2,opt,name=param1,proto3" json:"param1"` Param1 int32 `protobuf:"varint,2,opt,name=param1,proto3" json:"param1"`
Param2 int32 `protobuf:"varint,3,opt,name=param2,proto3" json:"param2"` Param2 int32 `protobuf:"varint,3,opt,name=param2,proto3" json:"param2"`
Param3 int32 `protobuf:"varint,4,opt,name=param3,proto3" json:"param3"` 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() { func (x *StonehengeEventReq) Reset() {
@ -408,6 +409,13 @@ func (x *StonehengeEventReq) GetParam3() int32 {
return 0 return 0
} }
func (x *StonehengeEventReq) GetReport() *BattleReport {
if x != nil {
return x.Report
}
return nil
}
type StonehengeEventResp struct { type StonehengeEventResp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -417,6 +425,7 @@ type StonehengeEventResp struct {
NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id NewEvent int32 `protobuf:"varint,2,opt,name=newEvent,proto3" json:"newEvent"` // 新的事件id
Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"` Room *RoomData `protobuf:"bytes,3,opt,name=room,proto3" json:"room"`
Reward []*UserAtno `protobuf:"bytes,4,rep,name=reward,proto3" json:"reward"` // 完成事件获得的奖励 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() { func (x *StonehengeEventResp) Reset() {
@ -479,6 +488,13 @@ func (x *StonehengeEventResp) GetReward() []*UserAtno {
return nil return nil
} }
func (x *StonehengeEventResp) GetHero() map[string]*BattleRole {
if x != nil {
return x.Hero
}
return nil
}
//获取房间信息 //获取房间信息
type StonehengeGetRoomInfoReq struct { type StonehengeGetRoomInfoReq struct {
state protoimpl.MessageState 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, 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, 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, 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, 0x72, 0x74, 0x61, 0x6c, 0x22, 0x9d, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65,
0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76,
0x6e, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x02, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a,
0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70,
0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x04, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x22, 0x8d, 0x01, 0x0a, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x12, 0x25, 0x0a,
0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x87, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65,
0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07,
0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65,
0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65,
0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65,
0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x6f,
0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28,
0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x19, 0x53, 0x74, 0x6f, 0x6e, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65,
0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x77, 0x61, 0x72, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x03,
0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x45,
0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74,
0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x1a, 0x44, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f,
0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, 0x14, 0x53, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1a,
0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52,
0x65, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x19, 0x53, 0x74,
0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x49,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61,
0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68,
0x65, 0x22, 0x51, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
0x74, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e,
0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x67, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x6e,
0x69, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12,
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, 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, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74,
0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74,
0x22, 0x91, 0x02, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x74, 0x6c, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65,
0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20,
0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x5a, 0x0a, 0x17, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68,
0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x6f, 0x65, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65,
0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72,
0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61,
0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f,
0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x48, 0x72, 0x74, 0x22, 0x91, 0x02, 0x0a, 0x18, 0x53, 0x74, 0x6f, 0x6e, 0x65, 0x68, 0x65, 0x6e, 0x67,
0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x1a, 0x44, 0x65, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x77,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20,
0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -1018,7 +1044,7 @@ func file_stonehenge_stonehenge_msg_proto_rawDescGZIP() []byte {
return file_stonehenge_stonehenge_msg_proto_rawDescData 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{}{ var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
(*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq (*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq
(*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp (*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp
@ -1037,39 +1063,43 @@ var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
(*StonehengeBattleOverReq)(nil), // 14: StonehengeBattleOverReq (*StonehengeBattleOverReq)(nil), // 14: StonehengeBattleOverReq
(*StonehengeBattleOverResp)(nil), // 15: StonehengeBattleOverResp (*StonehengeBattleOverResp)(nil), // 15: StonehengeBattleOverResp
nil, // 16: StonehengeEnterLevelResp.HeroEntry nil, // 16: StonehengeEnterLevelResp.HeroEntry
nil, // 17: StonehengeBattleOverResp.HeroEntry nil, // 17: StonehengeEventResp.HeroEntry
(*DBStonehenge)(nil), // 18: DBStonehenge nil, // 18: StonehengeBattleOverResp.HeroEntry
(*DBStoneBoss)(nil), // 19: DBStoneBoss (*DBStonehenge)(nil), // 19: DBStonehenge
(*RoomData)(nil), // 20: RoomData (*DBStoneBoss)(nil), // 20: DBStoneBoss
(*UserAtno)(nil), // 21: UserAtno (*RoomData)(nil), // 21: RoomData
(*BattleFormation)(nil), // 22: BattleFormation (*BattleReport)(nil), // 22: BattleReport
(*BattleInfo)(nil), // 23: BattleInfo (*UserAtno)(nil), // 23: UserAtno
(*BattleReport)(nil), // 24: BattleReport (*BattleFormation)(nil), // 24: BattleFormation
(*BattleRole)(nil), // 25: BattleRole (*BattleInfo)(nil), // 25: BattleInfo
(*BattleRole)(nil), // 26: BattleRole
} }
var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{ var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{
18, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge 19, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge
19, // 1: StonehengeGetListResp.boss:type_name -> DBStoneBoss 20, // 1: StonehengeGetListResp.boss:type_name -> DBStoneBoss
16, // 2: StonehengeEnterLevelResp.hero:type_name -> StonehengeEnterLevelResp.HeroEntry 16, // 2: StonehengeEnterLevelResp.hero:type_name -> StonehengeEnterLevelResp.HeroEntry
20, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData 21, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData
20, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData 21, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData
20, // 5: StonehengeEventResp.room:type_name -> RoomData 22, // 5: StonehengeEventReq.report:type_name -> BattleReport
21, // 6: StonehengeEventResp.reward:type_name -> UserAtno 21, // 6: StonehengeEventResp.room:type_name -> RoomData
20, // 7: StonehengeGetRoomInfoResp.room:type_name -> RoomData 23, // 7: StonehengeEventResp.reward:type_name -> UserAtno
18, // 8: StonehengeFinishResp.data:type_name -> DBStonehenge 17, // 8: StonehengeEventResp.hero:type_name -> StonehengeEventResp.HeroEntry
22, // 9: StonehengeBattleReq.battle:type_name -> BattleFormation 21, // 9: StonehengeGetRoomInfoResp.room:type_name -> RoomData
23, // 10: StonehengeBattleResp.info:type_name -> BattleInfo 19, // 10: StonehengeFinishResp.data:type_name -> DBStonehenge
24, // 11: StonehengeBattleOverReq.report:type_name -> BattleReport 24, // 11: StonehengeBattleReq.battle:type_name -> BattleFormation
20, // 12: StonehengeBattleOverResp.room:type_name -> RoomData 25, // 12: StonehengeBattleResp.info:type_name -> BattleInfo
21, // 13: StonehengeBattleOverResp.reward:type_name -> UserAtno 22, // 13: StonehengeBattleOverReq.report:type_name -> BattleReport
17, // 14: StonehengeBattleOverResp.hero:type_name -> StonehengeBattleOverResp.HeroEntry 21, // 14: StonehengeBattleOverResp.room:type_name -> RoomData
25, // 15: StonehengeEnterLevelResp.HeroEntry.value:type_name -> BattleRole 23, // 15: StonehengeBattleOverResp.reward:type_name -> UserAtno
25, // 16: StonehengeBattleOverResp.HeroEntry.value:type_name -> BattleRole 18, // 16: StonehengeBattleOverResp.hero:type_name -> StonehengeBattleOverResp.HeroEntry
17, // [17:17] is the sub-list for method output_type 26, // 17: StonehengeEnterLevelResp.HeroEntry.value:type_name -> BattleRole
17, // [17:17] is the sub-list for method input_type 26, // 18: StonehengeEventResp.HeroEntry.value:type_name -> BattleRole
17, // [17:17] is the sub-list for extension type_name 26, // 19: StonehengeBattleOverResp.HeroEntry.value:type_name -> BattleRole
17, // [17:17] is the sub-list for extension extendee 20, // [20:20] is the sub-list for method output_type
0, // [0:17] is the sub-list for field type_name 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() } func init() { file_stonehenge_stonehenge_msg_proto_init() }
@ -1281,7 +1311,7 @@ func file_stonehenge_stonehenge_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc, RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 18, NumMessages: 19,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },