Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
8040a59887
@ -320,7 +320,7 @@ type (
|
||||
//校验战报
|
||||
CheckBattleReport(session IUserSession, report *pb.BattleReport) (errdata *pb.ErrorData, iswin bool)
|
||||
///创建石阵秘境战斗
|
||||
CreateStoneBattle(session IUserSession, req *pb.BattlePVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord)
|
||||
CreateStoneBattle(session IUserSession, diBuff []*pb.DySkillData, format []int32, role []*pb.BattleRole, leadpos int32) (errdata *pb.ErrorData, record *pb.DBBattleRecord)
|
||||
}
|
||||
IGm interface {
|
||||
CreateCmd(session IUserSession, cmd string) (errdata *pb.ErrorData)
|
||||
|
@ -936,97 +936,27 @@ func (this *modelBattleComp) getGlobalBuff(uid string) (buff *cfg.GamePandamasBu
|
||||
}
|
||||
|
||||
// 创建石阵秘境战斗
|
||||
func (this *modelBattleComp) creatStoneBattle(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVEReq, role []*pb.BattleRole) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
|
||||
func (this *modelBattleComp) creatStoneBattle(session comm.IUserSession, diBuff []*pb.DySkillData, format []int32, role []*pb.BattleRole, leadpos int32) (record *pb.DBBattleRecord, errdata *pb.ErrorData) {
|
||||
var (
|
||||
heros []*pb.DBHero = make([]*pb.DBHero, 5)
|
||||
// buff *cfg.GamePandamasBuffData
|
||||
)
|
||||
record = &pb.DBBattleRecord{
|
||||
Id: primitive.NewObjectID().Hex(),
|
||||
Title: req.Title,
|
||||
Btype: btype,
|
||||
Ptype: req.Ptype,
|
||||
Title: "",
|
||||
Btype: pb.BattleType_pve,
|
||||
Ptype: pb.PlayType_stone,
|
||||
State: pb.BBattleState_in,
|
||||
RedCompId: session.GetUserId(),
|
||||
Redflist: make([]*pb.DBBattleFormt, 1),
|
||||
BlueCompId: "",
|
||||
Buleflist: make([]*pb.DBBattleFormt, len(req.Mformat)),
|
||||
Buleflist: make([]*pb.DBBattleFormt, len(format)),
|
||||
}
|
||||
record.Redflist[0] = &pb.DBBattleFormt{
|
||||
Leadpos: req.Format.Leadpos,
|
||||
Team: make([]*pb.BattleRole, len(req.Format.Format)),
|
||||
Leadpos: leadpos,
|
||||
Team: role,
|
||||
}
|
||||
model := db.NewDBModel(comm.TableHero, time.Hour, conn)
|
||||
// buff, _ = this.getGlobalBuff(session.GetUserId())
|
||||
//自己的英雄阵营
|
||||
for i, v := range req.Format.Format {
|
||||
if v != "" {
|
||||
heros[i] = &pb.DBHero{}
|
||||
if err := model.GetListObj(session.GetUserId(), v, heros[i]); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_HeroNoExist,
|
||||
Title: pb.ErrorCode_HeroNoExist.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
tid := 100 + i
|
||||
if record.Redflist[0].Team[i], errdata = this.createBattleRole(heros[i], tid, i); errdata != nil {
|
||||
return
|
||||
}
|
||||
// if buff != nil {
|
||||
// if conf, err := this.module.configure.GetHeroConfig(heros[i].HeroID); err == nil {
|
||||
// if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
|
||||
// record.Redflist[0].Team[i].PandaBuff = buff.Buffid
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
} else {
|
||||
record.Redflist[0].Team[i] = nil
|
||||
}
|
||||
}
|
||||
//好友的英雄阵营
|
||||
for i, v := range req.Format.Friendformat {
|
||||
if v != "" {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
// 获取好友英雄信息
|
||||
if this.module.IsCross() {
|
||||
if heros[i], err = this.module.friend.UseAssistHero(session.GetUserId(), v); err != nil {
|
||||
this.module.Errorln(err)
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_HeroNoExist,
|
||||
Title: pb.ErrorCode_HeroNoExist.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
} else { //获取跨服数据
|
||||
heros[i] = &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},
|
||||
heros[i]); err != nil {
|
||||
this.module.Errorln(err)
|
||||
}
|
||||
}
|
||||
tid := 100 + i
|
||||
if record.Redflist[0].Team[i], errdata = this.createBattleRole(heros[i], tid, i); errdata != nil {
|
||||
return
|
||||
}
|
||||
record.Redflist[0].Team[i].Ishelp = true
|
||||
// if buff != nil {
|
||||
// if conf, err := this.module.configure.GetHeroConfig(heros[i].HeroID); err == nil {
|
||||
// if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit {
|
||||
// record.Redflist[0].Team[i].PandaBuff = buff.Buffid
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
if ok := this.checkBattlereadyCapskill(req.Format.Leadpos, heros); !ok {
|
||||
|
||||
if ok := this.checkBattlereadyCapskill(leadpos, heros); !ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_BattleCapskillCheckFailed,
|
||||
Title: pb.ErrorCode_BattleCapskillCheckFailed.ToString(),
|
||||
@ -1037,10 +967,13 @@ func (this *modelBattleComp) creatStoneBattle(session comm.IUserSession, conn *d
|
||||
captain int32
|
||||
masters []*pb.BattleRole
|
||||
)
|
||||
for i, v := range req.Mformat {
|
||||
for i, v := range format {
|
||||
if captain, masters, errdata = this.createMasterRoles(200, i, v); errdata != nil {
|
||||
return
|
||||
}
|
||||
for _, v1 := range masters {
|
||||
v1.BattleBeforeSkill = diBuff
|
||||
}
|
||||
record.Buleflist[i] = &pb.DBBattleFormt{
|
||||
Leadpos: captain,
|
||||
Team: masters,
|
||||
|
@ -526,42 +526,9 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt
|
||||
}
|
||||
|
||||
// 创建石阵秘境战斗
|
||||
func (this *Battle) CreateStoneBattle(session comm.IUserSession, req *pb.BattlePVEReq) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
|
||||
var (
|
||||
conf *cfg.GameBattleReadyData
|
||||
conn *db.DBConn
|
||||
err error
|
||||
)
|
||||
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 conf, err = this.configure.GetBattleReady(req.Rulesid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if record, errdata = this.modelBattle.createpve(session, conn, pb.BattleType_pve, req, conf); errdata != nil {
|
||||
func (this *Battle) CreateStoneBattle(session comm.IUserSession, diBuff []*pb.DySkillData, format []int32, role []*pb.BattleRole, leadpos int32) (errdata *pb.ErrorData, record *pb.DBBattleRecord) {
|
||||
|
||||
if record, errdata = this.modelBattle.creatStoneBattle(session, diBuff, format, role, leadpos); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,9 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.StonehengeBattleR
|
||||
conf *cfg.GameStoneEventData
|
||||
err error
|
||||
battleConf *cfg.GameStoneBattleData
|
||||
szHero []*pb.BattleRole
|
||||
weBuff []*pb.DySkillData // 我方buff
|
||||
diBuff []*pb.DySkillData // 敌方buff
|
||||
)
|
||||
if conf, err = this.module.configure.GetStoneEventDataById(req.Eventid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -55,13 +58,50 @@ func (this *apiComp) Battle(session comm.IUserSession, req *pb.StonehengeBattleR
|
||||
if errdata = this.BattleCheck(session, req); errdata != nil {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
// 优先环境buff
|
||||
weBuff = make([]*pb.DySkillData, 0)
|
||||
diBuff = make([]*pb.DySkillData, 0)
|
||||
if stage := this.module.modelStonehenge.GetStoneBoosData(stone.StageID); stage != nil {
|
||||
for _, v := range stage.Mainebuff { // 我方环境buff
|
||||
if buff, err := this.module.configure.GetStoneBuffDataById(v); err == nil {
|
||||
weBuff = append(weBuff, &pb.DySkillData{
|
||||
SkillID: buff.SkillId,
|
||||
SkillLv: buff.BuffLevel,
|
||||
Param: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range stage.Enemybuff { // 敌方环境buff
|
||||
if buff, err := this.module.configure.GetStoneBuffDataById(v); err == nil {
|
||||
diBuff = append(weBuff, &pb.DySkillData{
|
||||
SkillID: buff.SkillId,
|
||||
SkillLv: buff.BuffLevel,
|
||||
Param: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
for _, v := range req.Battle.Format {
|
||||
if v != "" {
|
||||
if v1, ok := stone.Hero[v]; ok {
|
||||
v1.BattleBeforeSkill = weBuff
|
||||
szHero = append(szHero, v1)
|
||||
} else {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: fmt.Sprintf("can't found hero %s", v),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 石阵秘境战斗前准备
|
||||
errdata, record := this.module.battle.CreateStoneBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_stone,
|
||||
Title: "",
|
||||
Format: req.Battle,
|
||||
Mformat: battleConf.FormatList,
|
||||
})
|
||||
errdata, record := this.module.battle.CreateStoneBattle(session, diBuff, battleConf.FormatList, szHero, req.Battle.Leadpos)
|
||||
if errdata != nil {
|
||||
return
|
||||
}
|
||||
|
@ -1,105 +0,0 @@
|
||||
package stonehenge
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) BattleOverCheck(session comm.IUserSession, req *pb.StonehengeBattleOverReq) (errdata *pb.ErrorData) {
|
||||
if req.Eventid == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// /挑战主线关卡
|
||||
func (this *apiComp) BattleOver(session comm.IUserSession, req *pb.StonehengeBattleOverReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
isWin bool
|
||||
update map[string]interface{}
|
||||
roomConf *cfg.GameStoneRoomData
|
||||
eventConf *cfg.GameStoneEventData
|
||||
stone *pb.DBStonehenge
|
||||
newEvent int32 // 是否有新的事件
|
||||
err error
|
||||
reward []*pb.UserAtno
|
||||
)
|
||||
|
||||
errdata, isWin = this.module.battle.CheckBattleReport(session, req.Report)
|
||||
if errdata != nil {
|
||||
return
|
||||
}
|
||||
if !isWin { // 战斗失败直接返回
|
||||
return
|
||||
}
|
||||
update = make(map[string]interface{})
|
||||
stone = this.module.modelStonehenge.GetStonehengeData(session.GetUserId())
|
||||
if v, ok := stone.Rooms.Eventid[req.Eventid]; !ok || v == true { // 不存在该事件
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: fmt.Sprintf("req.Eventid err :%d", req.Eventid),
|
||||
}
|
||||
return
|
||||
}
|
||||
if stone.Rooms.Eventid[req.Eventid] { // 重复完成
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_StonehengeRepeatedReward,
|
||||
Title: pb.ErrorCode_StonehengeRepeatedReward.ToString(),
|
||||
Message: fmt.Sprintf("req.Eventid err :%d", req.Eventid),
|
||||
}
|
||||
return
|
||||
}
|
||||
if roomConf, err = this.module.configure.GetStoneRoomDataById(stone.Rooms.Roomid); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if eventConf, err = this.module.configure.GetStoneEventDataById(req.Eventid); err != nil {
|
||||
return
|
||||
}
|
||||
stone.Rooms.Eventid[req.Eventid] = true
|
||||
// 校验事件有后续事件
|
||||
if eventConf.Probability >= comm.GetRandNum(0, 1000) { // 命中
|
||||
newEvent = eventConf.PostEvent
|
||||
stone.Rooms.Eventid[newEvent] = false //
|
||||
}
|
||||
// 校验是否通关
|
||||
stone.Rooms.Complete = true
|
||||
for _, v := range roomConf.Condition {
|
||||
for k, ok := range stone.Rooms.Eventid {
|
||||
if !ok {
|
||||
if eventConf, err = this.module.configure.GetStoneEventDataById(k); err != nil {
|
||||
return
|
||||
}
|
||||
if eventConf.EventType == v {
|
||||
stone.Rooms.Complete = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if !stone.Rooms.Complete {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
update["hero"] = stone.Hero
|
||||
update["rooms"] = stone.Rooms
|
||||
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
||||
session.SendMsg(string(this.module.GetType()), "battleover", &pb.StonehengeBattleOverResp{
|
||||
Eventid: req.Eventid,
|
||||
NewEvent: newEvent,
|
||||
Room: stone.Rooms,
|
||||
Reward: reward,
|
||||
Hero: stone.Hero,
|
||||
}) // 数据推送
|
||||
|
||||
return
|
||||
}
|
@ -86,7 +86,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
stone.Userbuff[stone.Rooms.Selectbuff[req.Param1]] = 1
|
||||
stone.Rooms.Selectbuff = []int32{}
|
||||
update["userbuff"] = stone.Userbuff
|
||||
} else if eventConf.EventType == EventType14 { // 战斗事件合并
|
||||
} else if eventConf.EventType == EventType14 || eventConf.EventType == EventType28 { // 战斗事件合并
|
||||
if req.Report == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
|
@ -5,4 +5,5 @@ const (
|
||||
EventType14 = 14 // 战斗事件
|
||||
EventType16 = 16 // 捡垃圾事件
|
||||
EventType25 = 25 // buff三选一
|
||||
EventType28 = 28 // BOSS 战斗
|
||||
)
|
||||
|
@ -786,141 +786,6 @@ func (x *StonehengeBattleResp) GetInfo() *BattleInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 战斗事件结束
|
||||
type StonehengeBattleOverReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Eventid int32 `protobuf:"varint,1,opt,name=eventid,proto3" json:"eventid"` //事件id
|
||||
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverReq) Reset() {
|
||||
*x = StonehengeBattleOverReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StonehengeBattleOverReq) ProtoMessage() {}
|
||||
|
||||
func (x *StonehengeBattleOverReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StonehengeBattleOverReq.ProtoReflect.Descriptor instead.
|
||||
func (*StonehengeBattleOverReq) Descriptor() ([]byte, []int) {
|
||||
return file_stonehenge_stonehenge_msg_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverReq) GetEventid() int32 {
|
||||
if x != nil {
|
||||
return x.Eventid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverReq) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type StonehengeBattleOverResp 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"` // 完成事件获得的奖励
|
||||
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 *StonehengeBattleOverResp) Reset() {
|
||||
*x = StonehengeBattleOverResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StonehengeBattleOverResp) ProtoMessage() {}
|
||||
|
||||
func (x *StonehengeBattleOverResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stonehenge_stonehenge_msg_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StonehengeBattleOverResp.ProtoReflect.Descriptor instead.
|
||||
func (*StonehengeBattleOverResp) Descriptor() ([]byte, []int) {
|
||||
return file_stonehenge_stonehenge_msg_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverResp) GetEventid() int32 {
|
||||
if x != nil {
|
||||
return x.Eventid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverResp) GetNewEvent() int32 {
|
||||
if x != nil {
|
||||
return x.NewEvent
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverResp) GetRoom() *RoomData {
|
||||
if x != nil {
|
||||
return x.Room
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverResp) GetReward() []*UserAtno {
|
||||
if x != nil {
|
||||
return x.Reward
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StonehengeBattleOverResp) GetHero() map[string]*BattleRole {
|
||||
if x != nil {
|
||||
return x.Hero
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_stonehenge_stonehenge_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
|
||||
@ -1021,30 +886,7 @@ var file_stonehenge_stonehenge_msg_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x6e, 0x66, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
@ -1060,7 +902,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, 20)
|
||||
var file_stonehenge_stonehenge_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
|
||||
var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
|
||||
(*StonehengeGetListReq)(nil), // 0: StonehengeGetListReq
|
||||
(*StonehengeGetListResp)(nil), // 1: StonehengeGetListResp
|
||||
@ -1076,48 +918,40 @@ var file_stonehenge_stonehenge_msg_proto_goTypes = []interface{}{
|
||||
(*StonehengeFinishResp)(nil), // 11: StonehengeFinishResp
|
||||
(*StonehengeBattleReq)(nil), // 12: StonehengeBattleReq
|
||||
(*StonehengeBattleResp)(nil), // 13: StonehengeBattleResp
|
||||
(*StonehengeBattleOverReq)(nil), // 14: StonehengeBattleOverReq
|
||||
(*StonehengeBattleOverResp)(nil), // 15: StonehengeBattleOverResp
|
||||
nil, // 16: StonehengeEnterLevelResp.HeroEntry
|
||||
nil, // 17: StonehengeEventResp.HeroEntry
|
||||
nil, // 18: StonehengeEventResp.UserbuffEntry
|
||||
nil, // 19: StonehengeBattleOverResp.HeroEntry
|
||||
(*DBStonehenge)(nil), // 20: DBStonehenge
|
||||
(*DBStoneBoss)(nil), // 21: DBStoneBoss
|
||||
(*RoomData)(nil), // 22: RoomData
|
||||
(*BattleReport)(nil), // 23: BattleReport
|
||||
(*UserAtno)(nil), // 24: UserAtno
|
||||
(*BattleFormation)(nil), // 25: BattleFormation
|
||||
(*BattleInfo)(nil), // 26: BattleInfo
|
||||
(*BattleRole)(nil), // 27: BattleRole
|
||||
nil, // 14: StonehengeEnterLevelResp.HeroEntry
|
||||
nil, // 15: StonehengeEventResp.HeroEntry
|
||||
nil, // 16: StonehengeEventResp.UserbuffEntry
|
||||
(*DBStonehenge)(nil), // 17: DBStonehenge
|
||||
(*DBStoneBoss)(nil), // 18: DBStoneBoss
|
||||
(*RoomData)(nil), // 19: RoomData
|
||||
(*BattleReport)(nil), // 20: BattleReport
|
||||
(*UserAtno)(nil), // 21: UserAtno
|
||||
(*BattleFormation)(nil), // 22: BattleFormation
|
||||
(*BattleInfo)(nil), // 23: BattleInfo
|
||||
(*BattleRole)(nil), // 24: BattleRole
|
||||
}
|
||||
var file_stonehenge_stonehenge_msg_proto_depIdxs = []int32{
|
||||
20, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge
|
||||
21, // 1: StonehengeGetListResp.boss:type_name -> DBStoneBoss
|
||||
16, // 2: StonehengeEnterLevelResp.hero:type_name -> StonehengeEnterLevelResp.HeroEntry
|
||||
22, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData
|
||||
22, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData
|
||||
23, // 5: StonehengeEventReq.report:type_name -> BattleReport
|
||||
22, // 6: StonehengeEventResp.room:type_name -> RoomData
|
||||
24, // 7: StonehengeEventResp.reward:type_name -> UserAtno
|
||||
17, // 8: StonehengeEventResp.hero:type_name -> StonehengeEventResp.HeroEntry
|
||||
18, // 9: StonehengeEventResp.userbuff:type_name -> StonehengeEventResp.UserbuffEntry
|
||||
22, // 10: StonehengeGetRoomInfoResp.room:type_name -> RoomData
|
||||
20, // 11: StonehengeFinishResp.data:type_name -> DBStonehenge
|
||||
25, // 12: StonehengeBattleReq.battle:type_name -> BattleFormation
|
||||
26, // 13: StonehengeBattleResp.info:type_name -> BattleInfo
|
||||
23, // 14: StonehengeBattleOverReq.report:type_name -> BattleReport
|
||||
22, // 15: StonehengeBattleOverResp.room:type_name -> RoomData
|
||||
24, // 16: StonehengeBattleOverResp.reward:type_name -> UserAtno
|
||||
19, // 17: StonehengeBattleOverResp.hero:type_name -> StonehengeBattleOverResp.HeroEntry
|
||||
27, // 18: StonehengeEnterLevelResp.HeroEntry.value:type_name -> BattleRole
|
||||
27, // 19: StonehengeEventResp.HeroEntry.value:type_name -> BattleRole
|
||||
27, // 20: StonehengeBattleOverResp.HeroEntry.value:type_name -> BattleRole
|
||||
21, // [21:21] is the sub-list for method output_type
|
||||
21, // [21:21] is the sub-list for method input_type
|
||||
21, // [21:21] is the sub-list for extension type_name
|
||||
21, // [21:21] is the sub-list for extension extendee
|
||||
0, // [0:21] is the sub-list for field type_name
|
||||
17, // 0: StonehengeGetListResp.data:type_name -> DBStonehenge
|
||||
18, // 1: StonehengeGetListResp.boss:type_name -> DBStoneBoss
|
||||
14, // 2: StonehengeEnterLevelResp.hero:type_name -> StonehengeEnterLevelResp.HeroEntry
|
||||
19, // 3: StonehengeEnterLevelResp.room:type_name -> RoomData
|
||||
19, // 4: StonehengeGotoRoomResp.room:type_name -> RoomData
|
||||
20, // 5: StonehengeEventReq.report:type_name -> BattleReport
|
||||
19, // 6: StonehengeEventResp.room:type_name -> RoomData
|
||||
21, // 7: StonehengeEventResp.reward:type_name -> UserAtno
|
||||
15, // 8: StonehengeEventResp.hero:type_name -> StonehengeEventResp.HeroEntry
|
||||
16, // 9: StonehengeEventResp.userbuff:type_name -> StonehengeEventResp.UserbuffEntry
|
||||
19, // 10: StonehengeGetRoomInfoResp.room:type_name -> RoomData
|
||||
17, // 11: StonehengeFinishResp.data:type_name -> DBStonehenge
|
||||
22, // 12: StonehengeBattleReq.battle:type_name -> BattleFormation
|
||||
23, // 13: StonehengeBattleResp.info:type_name -> BattleInfo
|
||||
24, // 14: StonehengeEnterLevelResp.HeroEntry.value:type_name -> BattleRole
|
||||
24, // 15: StonehengeEventResp.HeroEntry.value:type_name -> BattleRole
|
||||
16, // [16:16] is the sub-list for method output_type
|
||||
16, // [16:16] is the sub-list for method input_type
|
||||
16, // [16:16] is the sub-list for extension type_name
|
||||
16, // [16:16] is the sub-list for extension extendee
|
||||
0, // [0:16] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_stonehenge_stonehenge_msg_proto_init() }
|
||||
@ -1298,30 +1132,6 @@ func file_stonehenge_stonehenge_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_stonehenge_stonehenge_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StonehengeBattleOverReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_stonehenge_stonehenge_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StonehengeBattleOverResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@ -1329,7 +1139,7 @@ func file_stonehenge_stonehenge_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_stonehenge_stonehenge_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 20,
|
||||
NumMessages: 17,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user