From 27af2b87bd4aca5764386c04d42f5309e5e45378 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 28 Oct 2022 11:08:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=BF=9B=E6=9C=BA=E5=9C=BApv?= =?UTF-8?q?e=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_arenachallengenpc.json | 193 ++++++-- modules/arena/api_challenge.go | 1 + modules/arena/api_challengereward.go | 1 + modules/arena/api_info.go | 2 + modules/arena/api_plot.go | 73 +++ modules/arena/api_plotreward.go | 68 +++ modules/arena/configure.go | 17 + pb/arena_db.pb.go | 186 ++++++-- pb/arena_msg.pb.go | 291 +++++++++++- pb/battle_db.pb.go | 18 +- pb/errorcode.pb.go | 442 ++++++++++-------- pb/userexpand.pb.go | 46 +- .../structs/Game.ArenaChallengeNpcData.go | 34 +- sys/db/init_test.go | 2 +- 14 files changed, 1061 insertions(+), 313 deletions(-) create mode 100644 modules/arena/api_plot.go create mode 100644 modules/arena/api_plotreward.go diff --git a/bin/json/game_arenachallengenpc.json b/bin/json/game_arenachallengenpc.json index c5ef81037..33e69cb0e 100644 --- a/bin/json/game_arenachallengenpc.json +++ b/bin/json/game_arenachallengenpc.json @@ -3,7 +3,10 @@ "id": 1, "open_cond": 1, "open_value": 10, - "monsterformat_id": 301011, + "monsterformat_id": [ + 301011, + 301027 + ], "stroy_id_front": 1001, "stroy_id_after": 1001, "name": { @@ -11,20 +14,28 @@ "text": "npc1" }, "revive_cd": 24, - "revive_monsterformat_id": 301011, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 2, "open_cond": 1, "open_value": 11, - "monsterformat_id": 301012, + "monsterformat_id": [ + 301012 + ], "stroy_id_front": 1002, "stroy_id_after": 1002, "name": { @@ -32,20 +43,28 @@ "text": "npc2" }, "revive_cd": 24, - "revive_monsterformat_id": 301012, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 3, "open_cond": 1, "open_value": 12, - "monsterformat_id": 301013, + "monsterformat_id": [ + 301013 + ], "stroy_id_front": 1003, "stroy_id_after": 1003, "name": { @@ -53,20 +72,28 @@ "text": "npc3" }, "revive_cd": 24, - "revive_monsterformat_id": 301013, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 4, "open_cond": 1, "open_value": 13, - "monsterformat_id": 301014, + "monsterformat_id": [ + 301014 + ], "stroy_id_front": 1004, "stroy_id_after": 1004, "name": { @@ -74,20 +101,28 @@ "text": "npc4" }, "revive_cd": 24, - "revive_monsterformat_id": 301014, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 5, "open_cond": 1, "open_value": 14, - "monsterformat_id": 301015, + "monsterformat_id": [ + 301015 + ], "stroy_id_front": 1005, "stroy_id_after": 1005, "name": { @@ -95,20 +130,28 @@ "text": "npc5" }, "revive_cd": 24, - "revive_monsterformat_id": 301015, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 6, "open_cond": 1, "open_value": 15, - "monsterformat_id": 301016, + "monsterformat_id": [ + 301016 + ], "stroy_id_front": 1006, "stroy_id_after": 1006, "name": { @@ -116,20 +159,28 @@ "text": "npc6" }, "revive_cd": 24, - "revive_monsterformat_id": 301016, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 7, "open_cond": 1, "open_value": 16, - "monsterformat_id": 301017, + "monsterformat_id": [ + 301017 + ], "stroy_id_front": 1007, "stroy_id_after": 1007, "name": { @@ -137,20 +188,28 @@ "text": "npc7" }, "revive_cd": 24, - "revive_monsterformat_id": 301017, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 8, "open_cond": 1, "open_value": 17, - "monsterformat_id": 301018, + "monsterformat_id": [ + 301018 + ], "stroy_id_front": 1008, "stroy_id_after": 1008, "name": { @@ -158,20 +217,28 @@ "text": "npc8" }, "revive_cd": 24, - "revive_monsterformat_id": 301018, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 9, "open_cond": 1, "open_value": 18, - "monsterformat_id": 301019, + "monsterformat_id": [ + 301019 + ], "stroy_id_front": 1009, "stroy_id_after": 1009, "name": { @@ -179,20 +246,28 @@ "text": "npc9" }, "revive_cd": 24, - "revive_monsterformat_id": 301019, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 10, "open_cond": 1, "open_value": 19, - "monsterformat_id": 301020, + "monsterformat_id": [ + 301020 + ], "stroy_id_front": 1010, "stroy_id_after": 1010, "name": { @@ -200,20 +275,28 @@ "text": "npc10" }, "revive_cd": 24, - "revive_monsterformat_id": 301020, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 11, "open_cond": 1, "open_value": 20, - "monsterformat_id": 301021, + "monsterformat_id": [ + 301021 + ], "stroy_id_front": 1011, "stroy_id_after": 1011, "name": { @@ -221,20 +304,28 @@ "text": "npc11" }, "revive_cd": 24, - "revive_monsterformat_id": 301021, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 12, "open_cond": 1, "open_value": 21, - "monsterformat_id": 301022, + "monsterformat_id": [ + 301022 + ], "stroy_id_front": 1012, "stroy_id_after": 1012, "name": { @@ -242,20 +333,28 @@ "text": "npc12" }, "revive_cd": 24, - "revive_monsterformat_id": 301022, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 13, "open_cond": 1, "open_value": 22, - "monsterformat_id": 301023, + "monsterformat_id": [ + 301023 + ], "stroy_id_front": 1013, "stroy_id_after": 1013, "name": { @@ -263,20 +362,28 @@ "text": "npc13" }, "revive_cd": 24, - "revive_monsterformat_id": 301023, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 14, "open_cond": 1, "open_value": 23, - "monsterformat_id": 301024, + "monsterformat_id": [ + 301024 + ], "stroy_id_front": 1014, "stroy_id_after": 1014, "name": { @@ -284,20 +391,28 @@ "text": "npc14" }, "revive_cd": 24, - "revive_monsterformat_id": 301024, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 15, "open_cond": 1, "open_value": 24, - "monsterformat_id": 301025, + "monsterformat_id": [ + 301025 + ], "stroy_id_front": 1015, "stroy_id_after": 1015, "name": { @@ -305,20 +420,28 @@ "text": "npc15" }, "revive_cd": 24, - "revive_monsterformat_id": 301025, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] }, { "id": 16, "open_cond": 1, "open_value": 25, - "monsterformat_id": 301026, + "monsterformat_id": [ + 301026 + ], "stroy_id_front": 1016, "stroy_id_after": 1016, "name": { @@ -326,13 +449,19 @@ "text": "npc16" }, "revive_cd": 24, - "revive_monsterformat_id": 301026, "npc_reward": [ { "a": "attr", "t": "gold", "n": 10000 } + ], + "new_npc_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } ] } ] \ No newline at end of file diff --git a/modules/arena/api_challenge.go b/modules/arena/api_challenge.go index 3ea71e096..98b3edb99 100644 --- a/modules/arena/api_challenge.go +++ b/modules/arena/api_challenge.go @@ -112,6 +112,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge } cd, record = this.module.battle.CreatePvpBattle(session, &pb.BattlePVPReq{ + Ptype: pb.PlayType_arena, Redformat: &pb.PVPFormation{Uid: red.Uid, Leadpos: red.Attack.Leadpos, Format: red.Attack.Formt}, Buleformat: &pb.PVPFormation{Uid: bule.Uid, Leadpos: bule.Defend.Leadpos, Format: bule.Defend.Formt}, }) diff --git a/modules/arena/api_challengereward.go b/modules/arena/api_challengereward.go index cd60f2076..53f68deb3 100644 --- a/modules/arena/api_challengereward.go +++ b/modules/arena/api_challengereward.go @@ -43,6 +43,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha code = pb.ErrorCode_BattleValidationFailed return } + info.Streak++ if reward, err = this.module.configure.getActiveRewardById(info.Dan); err != nil { this.module.Errorln(err) return diff --git a/modules/arena/api_info.go b/modules/arena/api_info.go index 7d2f736cd..f0fccaf62 100644 --- a/modules/arena/api_info.go +++ b/modules/arena/api_info.go @@ -51,9 +51,11 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (code Name: user.Name, Integral: global.ArenaInitiaIntegral, Ticket: 10, + Streak: 0, Record: make([]*pb.DBArenaBattleRecord, 0), Lastrtickettime: 0, Isdef: false, + Npc: make(map[int32]*pb.DBNpc), } if info.Dan, err = this.module.modelArena.computedan(info.Integral); err != nil { code = pb.ErrorCode_ConfigNoFound diff --git a/modules/arena/api_plot.go b/modules/arena/api_plot.go new file mode 100644 index 000000000..191240431 --- /dev/null +++ b/modules/arena/api_plot.go @@ -0,0 +1,73 @@ +package arena + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "time" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) PlotCheck(session comm.IUserSession, req *pb.ArenaPlotReq) (code pb.ErrorCode) { + + return +} + +///获取自己的排行榜信息 +func (this *apiComp) Plot(session comm.IUserSession, req *pb.ArenaPlotReq) (code pb.ErrorCode, data proto.Message) { + var ( + npc *cfg.GameArenaChallengeNpcData + info *pb.DBArenaUser + record *pb.DBBattleRecord + index int32 + cd pb.ErrorCode + err error + ) + defer func() { + if cd == pb.ErrorCode_Success { + session.SendMsg(string(this.module.GetType()), "plot", &pb.ArenaPlotResp{ + Code: cd, + Pid: req.Pid, + Info: &pb.BattleInfo{ + Id: record.Id, + Title: record.Title, + Btype: record.Btype, + Ptype: record.Ptype, + RedCompId: record.RedCompId, + Redflist: record.Redflist, + BlueCompId: record.BlueCompId, + Buleflist: record.Buleflist, + }, + }) + } else { + session.SendMsg(string(this.module.GetType()), "plot", &pb.ArenaPlotResp{Code: cd}) + } + }() + if cd = this.PlotCheck(session, req); cd != pb.ErrorCode_Success { + return + } + if npc, err = this.module.configure.getChallengenpc(req.Pid); err != nil { + cd = pb.ErrorCode_ConfigNoFound + return + } + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { + cd = pb.ErrorCode_DBError + return + } + if info.Npc[req.Pid] != nil { + ndata := info.Npc[req.Pid] + if !time.Now().After(time.Unix(ndata.Cd, 0)) { //已经过了cd时间 + code = pb.ErrorCode_ArenaTicketNpcInCd + return + } + index = ndata.Index + } + cd, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ + Ptype: pb.PlayType_arena, + Format: req.Battle, + Mformat: []int32{npc.MonsterformatId[index]}, + }) + return +} diff --git a/modules/arena/api_plotreward.go b/modules/arena/api_plotreward.go new file mode 100644 index 000000000..5e98f2a65 --- /dev/null +++ b/modules/arena/api_plotreward.go @@ -0,0 +1,68 @@ +package arena + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "time" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) PlotRewardCheck(session comm.IUserSession, req *pb.ArenaPlotRewardReq) (code pb.ErrorCode) { + if req.Pid == 0 || req.Report == nil { + code = pb.ErrorCode_ReqParameterError + } + return +} + +///领取战斗奖励 +func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewardReq) (code pb.ErrorCode, data proto.Message) { + var ( + npc *cfg.GameArenaChallengeNpcData + info *pb.DBArenaUser + iswin bool + err error + ) + + if code = this.PlotRewardCheck(session, req); code != pb.ErrorCode_Success { + return + } + if npc, err = this.module.configure.getChallengenpc(req.Pid); err != nil { + code = pb.ErrorCode_ConfigNoFound + return + } + if code, iswin = this.module.battle.CheckBattleReport(session, req.Report); code != pb.ErrorCode_Success { + return + } + if !iswin { + code = pb.ErrorCode_MoonfantasyBattleNoWin + return + } + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { + code = pb.ErrorCode_DBError + return + } + if info.Npc[req.Pid] == nil { + info.Npc[req.Pid] = &pb.DBNpc{ + Id: req.Pid, + Index: 0, + } + } + if len(npc.MonsterformatId) > int(info.Npc[req.Pid].Index+1) { + info.Npc[req.Pid].Index++ + } + info.Npc[req.Pid].Cd = time.Now().Add(time.Minute * time.Duration(npc.ReviveCd)).Unix() + if err = this.module.modelArena.Change(info.Uid, map[string]interface{}{ + "npc": info.Npc, + }); err != nil { + this.module.Errorln(err) + code = pb.ErrorCode_DBError + return + } + + this.module.DispenseRes(session, npc.NpcReward, true) + session.SendMsg(string(this.module.GetType()), "plotreward", &pb.ArenaPlotRewardResp{Issucc: true}) + return +} diff --git a/modules/arena/configure.go b/modules/arena/configure.go index 67e91d495..7f71292de 100644 --- a/modules/arena/configure.go +++ b/modules/arena/configure.go @@ -169,3 +169,20 @@ func (this *configureComp) getRankReward() (result *cfg.GameArenaRankReward, err } return } + +//查询剧情npc系统 +func (this *configureComp) getChallengenpc(id int32) (result *cfg.GameArenaChallengeNpcData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_arenachallengenpc); err != nil { + this.module.Errorln(err) + } else { + if result, ok = v.(*cfg.GameArenaChallengeNpc).GetDataMap()[id]; !ok { + err = fmt.Errorf("on found getChallengenpc:%d", id) + this.module.Errorln(err) + } + } + return +} diff --git a/pb/arena_db.pb.go b/pb/arena_db.pb.go index f5cc46365..d9db3e2c8 100644 --- a/pb/arena_db.pb.go +++ b/pb/arena_db.pb.go @@ -465,28 +465,29 @@ type DBArenaUser struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称 - Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像 - Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 - Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` //积分 - Ticket int32 `protobuf:"varint,6,opt,name=ticket,proto3" json:"ticket"` //挑战券 - Dan int32 `protobuf:"varint,7,opt,name=dan,proto3" json:"dan"` //段位 - Attack *DBPlayerBattleFormt `protobuf:"bytes,8,opt,name=attack,proto3" json:"attack"` //进攻阵型 - Defend *DBPlayerBattleFormt `protobuf:"bytes,9,opt,name=defend,proto3" json:"defend"` //防守阵型 - Streak int32 `protobuf:"varint,10,opt,name=streak,proto3" json:"streak"` //连胜 - Attackrate int32 `protobuf:"varint,11,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率 - Defendrate int32 `protobuf:"varint,12,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率 - Rank int32 `protobuf:"varint,13,opt,name=rank,proto3" json:"rank"` //排名 - Buynum int32 `protobuf:"varint,14,opt,name=buynum,proto3" json:"buynum"` //购买次数 - Record []*DBArenaBattleRecord `protobuf:"bytes,15,rep,name=record,proto3" json:"record"` //战斗记录 - Lastrtickettime int64 `protobuf:"varint,16,opt,name=lastrtickettime,proto3" json:"lastrtickettime"` //最后领劵时间 - Attackwinuum int32 `protobuf:"varint,17,opt,name=attackwinuum,proto3" json:"attackwinuum"` //进攻胜利次数 - Attacktotaluum int32 `protobuf:"varint,18,opt,name=attacktotaluum,proto3" json:"attacktotaluum"` //进攻总次数 - Defendwinuum int32 `protobuf:"varint,19,opt,name=defendwinuum,proto3" json:"defendwinuum"` //防守胜利 - Defendtotaluum int32 `protobuf:"varint,20,opt,name=defendtotaluum,proto3" json:"defendtotaluum"` //防守总 - Loc []float64 `protobuf:"fixed64,21,rep,packed,name=loc,proto3" json:"loc"` //地图索引 匹配系统使用 - Isdef bool `protobuf:"varint,22,opt,name=isdef,proto3" json:"isdef"` //是否设置防守 + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称 + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像 + Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级 + Integral int32 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral"` //积分 + Ticket int32 `protobuf:"varint,6,opt,name=ticket,proto3" json:"ticket"` //挑战券 + Dan int32 `protobuf:"varint,7,opt,name=dan,proto3" json:"dan"` //段位 + Attack *DBPlayerBattleFormt `protobuf:"bytes,8,opt,name=attack,proto3" json:"attack"` //进攻阵型 + Defend *DBPlayerBattleFormt `protobuf:"bytes,9,opt,name=defend,proto3" json:"defend"` //防守阵型 + Streak int32 `protobuf:"varint,10,opt,name=streak,proto3" json:"streak"` //连胜 + Attackrate int32 `protobuf:"varint,11,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率 + Defendrate int32 `protobuf:"varint,12,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率 + Rank int32 `protobuf:"varint,13,opt,name=rank,proto3" json:"rank"` //排名 + Buynum int32 `protobuf:"varint,14,opt,name=buynum,proto3" json:"buynum"` //购买次数 + Record []*DBArenaBattleRecord `protobuf:"bytes,15,rep,name=record,proto3" json:"record"` //战斗记录 + Lastrtickettime int64 `protobuf:"varint,16,opt,name=lastrtickettime,proto3" json:"lastrtickettime"` //最后领劵时间 + Attackwinuum int32 `protobuf:"varint,17,opt,name=attackwinuum,proto3" json:"attackwinuum"` //进攻胜利次数 + Attacktotaluum int32 `protobuf:"varint,18,opt,name=attacktotaluum,proto3" json:"attacktotaluum"` //进攻总次数 + Defendwinuum int32 `protobuf:"varint,19,opt,name=defendwinuum,proto3" json:"defendwinuum"` //防守胜利 + Defendtotaluum int32 `protobuf:"varint,20,opt,name=defendtotaluum,proto3" json:"defendtotaluum"` //防守总 + Loc []float64 `protobuf:"fixed64,21,rep,packed,name=loc,proto3" json:"loc"` //地图索引 匹配系统使用 + Isdef bool `protobuf:"varint,22,opt,name=isdef,proto3" json:"isdef"` //是否设置防守 + Npc map[int32]*DBNpc `protobuf:"bytes,23,rep,name=npc,proto3" json:"npc" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // npc Cd } func (x *DBArenaUser) Reset() { @@ -675,6 +676,77 @@ func (x *DBArenaUser) GetIsdef() bool { return false } +func (x *DBArenaUser) GetNpc() map[int32]*DBNpc { + if x != nil { + return x.Npc + } + return nil +} + +// npc数据 +type DBNpc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + Cd int64 `protobuf:"varint,2,opt,name=cd,proto3" json:"cd"` + Index int32 `protobuf:"varint,3,opt,name=index,proto3" json:"index"` +} + +func (x *DBNpc) Reset() { + *x = DBNpc{} + if protoimpl.UnsafeEnabled { + mi := &file_arena_arena_db_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBNpc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBNpc) ProtoMessage() {} + +func (x *DBNpc) ProtoReflect() protoreflect.Message { + mi := &file_arena_arena_db_proto_msgTypes[5] + 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 DBNpc.ProtoReflect.Descriptor instead. +func (*DBNpc) Descriptor() ([]byte, []int) { + return file_arena_arena_db_proto_rawDescGZIP(), []int{5} +} + +func (x *DBNpc) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *DBNpc) GetCd() int64 { + if x != nil { + return x.Cd + } + return 0 +} + +func (x *DBNpc) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + var File_arena_arena_db_proto protoreflect.FileDescriptor var file_arena_arena_db_proto_rawDesc = []byte{ @@ -728,7 +800,7 @@ var file_arena_arena_db_proto_rawDesc = []byte{ 0x28, 0x05, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x99, 0x05, 0x0a, 0x0b, 0x44, 0x42, + 0x74, 0x65, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x82, 0x06, 0x0a, 0x0b, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, @@ -770,18 +842,28 @@ var file_arena_arena_db_proto_rawDesc = []byte{ 0x65, 0x66, 0x65, 0x6e, 0x64, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x75, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x63, 0x18, 0x15, 0x20, 0x03, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x6f, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x64, 0x65, 0x66, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x69, 0x73, 0x64, 0x65, 0x66, 0x2a, 0x9f, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, - 0x74, 0x74, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x74, - 0x74, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, - 0x66, 0x65, 0x6e, 0x64, 0x6b, 0x57, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, - 0x66, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x57, 0x61, - 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x10, 0x04, 0x12, 0x11, - 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, - 0x05, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x65, 0x6e, - 0x67, 0x65, 0x45, 0x6e, 0x64, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x64, 0x65, 0x66, 0x12, 0x27, 0x0a, 0x03, 0x6e, 0x70, 0x63, 0x18, 0x17, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72, + 0x2e, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6e, 0x70, 0x63, 0x1a, 0x3e, + 0x0a, 0x08, 0x4e, 0x70, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x44, 0x42, + 0x4e, 0x70, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3d, + 0x0a, 0x05, 0x44, 0x42, 0x4e, 0x70, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x63, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x63, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0x9f, 0x01, + 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e, + 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x4c, 0x6f, 0x73, 0x74, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x6b, 0x57, 0x69, 0x6e, + 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x73, 0x74, + 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x76, + 0x65, 0x6e, 0x67, 0x65, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, + 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x65, 0x76, + 0x65, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x06, 0x12, + 0x0e, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x65, 0x6e, 0x67, 0x65, 0x45, 0x6e, 0x64, 0x10, 0x07, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -797,7 +879,7 @@ func file_arena_arena_db_proto_rawDescGZIP() []byte { } var file_arena_arena_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_arena_arena_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_arena_arena_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_arena_arena_db_proto_goTypes = []interface{}{ (BattleRecordState)(0), // 0: BattleRecordState (*DBPlayerBattleFormt)(nil), // 1: DBPlayerBattleFormt @@ -805,21 +887,25 @@ var file_arena_arena_db_proto_goTypes = []interface{}{ (*DBHeroBase)(nil), // 3: DBHeroBase (*DBArenaBattleRecord)(nil), // 4: DBArenaBattleRecord (*DBArenaUser)(nil), // 5: DBArenaUser - (*DBHero)(nil), // 6: DBHero + (*DBNpc)(nil), // 6: DBNpc + nil, // 7: DBArenaUser.NpcEntry + (*DBHero)(nil), // 8: DBHero } var file_arena_arena_db_proto_depIdxs = []int32{ - 6, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero + 8, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero 1, // 1: ArenaPlayer.defend:type_name -> DBPlayerBattleFormt 3, // 2: DBArenaBattleRecord.formt:type_name -> DBHeroBase 0, // 3: DBArenaBattleRecord.State:type_name -> BattleRecordState 1, // 4: DBArenaUser.attack:type_name -> DBPlayerBattleFormt 1, // 5: DBArenaUser.defend:type_name -> DBPlayerBattleFormt 4, // 6: DBArenaUser.record:type_name -> DBArenaBattleRecord - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 7, // 7: DBArenaUser.npc:type_name -> DBArenaUser.NpcEntry + 6, // 8: DBArenaUser.NpcEntry.value:type_name -> DBNpc + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_arena_arena_db_proto_init() } @@ -889,6 +975,18 @@ func file_arena_arena_db_proto_init() { return nil } } + file_arena_arena_db_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBNpc); 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{ @@ -896,7 +994,7 @@ func file_arena_arena_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_arena_arena_db_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/arena_msg.pb.go b/pb/arena_msg.pb.go index aa432f95f..fba52df55 100644 --- a/pb/arena_msg.pb.go +++ b/pb/arena_msg.pb.go @@ -1054,10 +1054,14 @@ func (x *ArenaDelRewardResp) GetBid() string { return "" } +//剧情战斗 请求 type ArenaPlotReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid"` //剧情id + Battle *BattleFormation `protobuf:"bytes,2,opt,name=battle,proto3" json:"battle"` //战斗类型 } func (x *ArenaPlotReq) Reset() { @@ -1092,6 +1096,186 @@ func (*ArenaPlotReq) Descriptor() ([]byte, []int) { return file_arena_arena_msg_proto_rawDescGZIP(), []int{20} } +func (x *ArenaPlotReq) GetPid() int32 { + if x != nil { + return x.Pid + } + return 0 +} + +func (x *ArenaPlotReq) GetBattle() *BattleFormation { + if x != nil { + return x.Battle + } + return nil +} + +type ArenaPlotResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrorCode" json:"code"` //是否成功 + Pid int32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid"` //剧情id + Info *BattleInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info"` +} + +func (x *ArenaPlotResp) Reset() { + *x = ArenaPlotResp{} + if protoimpl.UnsafeEnabled { + mi := &file_arena_arena_msg_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArenaPlotResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArenaPlotResp) ProtoMessage() {} + +func (x *ArenaPlotResp) ProtoReflect() protoreflect.Message { + mi := &file_arena_arena_msg_proto_msgTypes[21] + 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 ArenaPlotResp.ProtoReflect.Descriptor instead. +func (*ArenaPlotResp) Descriptor() ([]byte, []int) { + return file_arena_arena_msg_proto_rawDescGZIP(), []int{21} +} + +func (x *ArenaPlotResp) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_Success +} + +func (x *ArenaPlotResp) GetPid() int32 { + if x != nil { + return x.Pid + } + return 0 +} + +func (x *ArenaPlotResp) GetInfo() *BattleInfo { + if x != nil { + return x.Info + } + return nil +} + +//剧情战斗奖励领取 请求 +type ArenaPlotRewardReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid"` //剧情id + Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报 +} + +func (x *ArenaPlotRewardReq) Reset() { + *x = ArenaPlotRewardReq{} + if protoimpl.UnsafeEnabled { + mi := &file_arena_arena_msg_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArenaPlotRewardReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArenaPlotRewardReq) ProtoMessage() {} + +func (x *ArenaPlotRewardReq) ProtoReflect() protoreflect.Message { + mi := &file_arena_arena_msg_proto_msgTypes[22] + 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 ArenaPlotRewardReq.ProtoReflect.Descriptor instead. +func (*ArenaPlotRewardReq) Descriptor() ([]byte, []int) { + return file_arena_arena_msg_proto_rawDescGZIP(), []int{22} +} + +func (x *ArenaPlotRewardReq) GetPid() int32 { + if x != nil { + return x.Pid + } + return 0 +} + +func (x *ArenaPlotRewardReq) GetReport() *BattleReport { + if x != nil { + return x.Report + } + return nil +} + +type ArenaPlotRewardResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` +} + +func (x *ArenaPlotRewardResp) Reset() { + *x = ArenaPlotRewardResp{} + if protoimpl.UnsafeEnabled { + mi := &file_arena_arena_msg_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArenaPlotRewardResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArenaPlotRewardResp) ProtoMessage() {} + +func (x *ArenaPlotRewardResp) ProtoReflect() protoreflect.Message { + mi := &file_arena_arena_msg_proto_msgTypes[23] + 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 ArenaPlotRewardResp.ProtoReflect.Descriptor instead. +func (*ArenaPlotRewardResp) Descriptor() ([]byte, []int) { + return file_arena_arena_msg_proto_rawDescGZIP(), []int{23} +} + +func (x *ArenaPlotRewardResp) GetIssucc() bool { + if x != nil { + return x.Issucc + } + return false +} + var File_arena_arena_msg_proto protoreflect.FileDescriptor var file_arena_arena_msg_proto_rawDesc = []byte{ @@ -1178,8 +1362,26 @@ var file_arena_arena_msg_proto_rawDesc = []byte{ 0x64, 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, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x69, 0x64, 0x22, - 0x0e, 0x0a, 0x0c, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4a, 0x0a, 0x0c, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 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, 0x62, 0x0a, 0x0d, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x1f, + 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, + 0x4d, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x70, 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, 0x2d, + 0x0a, 0x13, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 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, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1194,7 +1396,7 @@ func file_arena_arena_msg_proto_rawDescGZIP() []byte { return file_arena_arena_msg_proto_rawDescData } -var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_arena_arena_msg_proto_goTypes = []interface{}{ (*ArenaInfoReq)(nil), // 0: ArenaInfoReq (*ArenaInfoResp)(nil), // 1: ArenaInfoResp @@ -1217,27 +1419,34 @@ var file_arena_arena_msg_proto_goTypes = []interface{}{ (*ArenaDelRewardReq)(nil), // 18: ArenaDelRewardReq (*ArenaDelRewardResp)(nil), // 19: ArenaDelRewardResp (*ArenaPlotReq)(nil), // 20: ArenaPlotReq - (*DBArenaUser)(nil), // 21: DBArenaUser - (*ArenaPlayer)(nil), // 22: ArenaPlayer - (*BattleFormation)(nil), // 23: BattleFormation - (ErrorCode)(0), // 24: ErrorCode - (*BattleInfo)(nil), // 25: BattleInfo - (*BattleReport)(nil), // 26: BattleReport + (*ArenaPlotResp)(nil), // 21: ArenaPlotResp + (*ArenaPlotRewardReq)(nil), // 22: ArenaPlotRewardReq + (*ArenaPlotRewardResp)(nil), // 23: ArenaPlotRewardResp + (*DBArenaUser)(nil), // 24: DBArenaUser + (*ArenaPlayer)(nil), // 25: ArenaPlayer + (*BattleFormation)(nil), // 26: BattleFormation + (ErrorCode)(0), // 27: ErrorCode + (*BattleInfo)(nil), // 28: BattleInfo + (*BattleReport)(nil), // 29: BattleReport } var file_arena_arena_msg_proto_depIdxs = []int32{ - 21, // 0: ArenaInfoResp.info:type_name -> DBArenaUser - 21, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser - 22, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer - 23, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation - 24, // 4: ArenaChallengeResp.code:type_name -> ErrorCode - 25, // 5: ArenaChallengeResp.info:type_name -> BattleInfo - 26, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport - 22, // 7: ArenaRankResp.players:type_name -> ArenaPlayer - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 24, // 0: ArenaInfoResp.info:type_name -> DBArenaUser + 24, // 1: ArenaOtherInfoResp.info:type_name -> DBArenaUser + 25, // 2: ArenaMatcheResp.players:type_name -> ArenaPlayer + 26, // 3: ArenaChallengeReq.battle:type_name -> BattleFormation + 27, // 4: ArenaChallengeResp.code:type_name -> ErrorCode + 28, // 5: ArenaChallengeResp.info:type_name -> BattleInfo + 29, // 6: ArenaChallengeRewardReq.report:type_name -> BattleReport + 25, // 7: ArenaRankResp.players:type_name -> ArenaPlayer + 26, // 8: ArenaPlotReq.battle:type_name -> BattleFormation + 27, // 9: ArenaPlotResp.code:type_name -> ErrorCode + 28, // 10: ArenaPlotResp.info:type_name -> BattleInfo + 29, // 11: ArenaPlotRewardReq.report:type_name -> BattleReport + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_arena_arena_msg_proto_init() } @@ -1501,6 +1710,42 @@ func file_arena_arena_msg_proto_init() { return nil } } + file_arena_arena_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArenaPlotResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arena_arena_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArenaPlotRewardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arena_arena_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArenaPlotRewardResp); 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{ @@ -1508,7 +1753,7 @@ func file_arena_arena_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_arena_arena_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 21, + NumMessages: 24, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go index f9db83f44..604d55590 100644 --- a/pb/battle_db.pb.go +++ b/pb/battle_db.pb.go @@ -83,6 +83,7 @@ const ( PlayType_hunting PlayType = 4 //狩猎 PlayType_viking PlayType = 5 //维京远征 PlayType_moonfantasy PlayType = 6 //月之秘境 + PlayType_arena PlayType = 7 //竞技场 ) // Enum value maps for PlayType. @@ -95,6 +96,7 @@ var ( 4: "hunting", 5: "viking", 6: "moonfantasy", + 7: "arena", } PlayType_value = map[string]int32{ "null": 0, @@ -104,6 +106,7 @@ var ( "hunting": 4, "viking": 5, "moonfantasy": 6, + "arena": 7, } ) @@ -624,19 +627,20 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2a, 0x30, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, - 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x2a, 0x63, 0x0a, + 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x2a, 0x6e, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, - 0x10, 0x06, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, - 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x2a, 0x1f, 0x0a, + 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, + 0x02, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, + 0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, + 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index b0788bab8..759222811 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -198,19 +198,31 @@ const ( // Battle ErrorCode_BattleValidationFailed ErrorCode = 2901 //战斗校验失败 // sociaty - ErrorCode_SociatyNoFound ErrorCode = 3000 //公会不存在 - ErrorCode_SociatyAdded ErrorCode = 3001 //已在公会里 - ErrorCode_SociatyDiamondNoEnough ErrorCode = 3002 //钻石不足 - ErrorCode_SociatyApply ErrorCode = 3003 //申请失败 - ErrorCode_SociatyNoRight ErrorCode = 3004 //无权限 - ErrorCode_SociatyNoAdded ErrorCode = 3005 //未加入公会 - ErrorCode_SociatyDismiss ErrorCode = 3006 //解散失败 - ErrorCode_SociatyQuit ErrorCode = 3007 //退会失败 - ErrorCode_SociatyAgree ErrorCode = 3008 //申请-同意失败 - ErrorCode_SociatyRefuse ErrorCode = 3009 //申请-拒绝失败 + ErrorCode_SociatyNoFound ErrorCode = 3000 //公会不存在 + ErrorCode_SociatyAdded ErrorCode = 3001 //已在公会里 + ErrorCode_SociatyDiamondNoEnough ErrorCode = 3002 //钻石不足 + ErrorCode_SociatyApply ErrorCode = 3003 //申请失败 + ErrorCode_SociatyNoRight ErrorCode = 3004 //无权限 + ErrorCode_SociatyNoAdded ErrorCode = 3005 //未加入公会 + ErrorCode_SociatyDismiss ErrorCode = 3006 //解散失败 + ErrorCode_SociatyQuit ErrorCode = 3007 //退会失败 + ErrorCode_SociatyAgree ErrorCode = 3008 //申请-同意失败 + ErrorCode_SociatyRefuse ErrorCode = 3009 //申请-拒绝失败 + ErrorCode_SociatyAssign ErrorCode = 30010 //公会转让失败 + ErrorCode_SociatyDischarge ErrorCode = 30011 //踢出失败 + ErrorCode_SociatySettingJob ErrorCode = 30012 //设置职位失败 + ErrorCode_SociatySetting ErrorCode = 30013 //公会修改失败 + ErrorCode_SociatyAccuse ErrorCode = 30014 //弹劾失败 + ErrorCode_SociatySign ErrorCode = 30015 //签到失败 + ErrorCode_SociatySigned ErrorCode = 30016 //已签到 + ErrorCode_SociatyCDLimit ErrorCode = 30017 // CD时间限制 + ErrorCode_SociatyApplyMax ErrorCode = 30018 //最大申请该公会人数 + ErrorCode_SociatySelfSetting ErrorCode = 30019 // 不能设置自己 + ErrorCode_SociatyMemberCountLimit ErrorCode = 30020 //超出人数限制 // arena ErrorCode_ArenaTicketBuyUp ErrorCode = 3101 //票据上限 ErrorCode_ArenaTicketNotEnough ErrorCode = 3102 //票据不足 + ErrorCode_ArenaTicketNpcInCd ErrorCode = 3103 // cd中 // talent ErrorCode_TalentRepeatLearn ErrorCode = 3201 // 天赋已学习 ErrorCode_TalentErrData ErrorCode = 3202 /// 天赋不存在 @@ -221,178 +233,190 @@ const ( // Enum value maps for ErrorCode. var ( ErrorCode_name = map[int32]string{ - 0: "Success", - 10: "NoFindService", - 11: "NoFindServiceHandleFunc", - 12: "RpcFuncExecutionError", - 13: "CacheReadError", - 14: "SqlExecutionError", - 15: "ReqParameterError", - 16: "SignError", - 17: "InsufficientPermissions", - 18: "NoLogin", - 19: "UserSessionNobeing", - 20: "StateInvalid", - 21: "DBError", - 22: "SystemError", - 23: "DecodeError", - 24: "TimestampTimeout", - 25: "PbError", - 26: "AgentUidEmpty", - 100: "Exception", - 101: "Unknown", - 102: "ResNoEnough", - 103: "ConfigurationException", - 104: "ConfigNoFound", - 105: "UserLogined", - 1000: "SecKeyInvalid", - 1001: "SecKey", - 1002: "BindUser", - 1003: "GoldNoEnough", - 1004: "DiamondNoEnough", - 1005: "RoleCreated", - 1006: "UserNickNameExist", - 1007: "VeriCodeNoValid", - 1008: "VeriCodeExpired", - 1009: "UserResetData", - 1010: "UserModiNameCount", - 1011: "UserNickNameEmpty", - 1012: "UserExpandNull", - 1013: "UserExpNoEnough", - 1014: "UserFriendNoEnough", - 1100: "FriendNotSelf", - 1101: "FriendSelfMax", - 1102: "FriendTargetMax", - 1103: "FriendSelfNoData", - 1104: "FriendTargetNoData", - 1105: "FriendYet", - 1106: "FriendApplyYet", - 1107: "FriendSelfBlackYet", - 1108: "FriendTargetBlackYet", - 1109: "FriendApplyError", - 1110: "FriendBlackMax", - 1111: "FriendSearchNameEmpty", - 1112: "FriendZaned", - 1113: "FriendZanreceived", - 1114: "FriendZanSelf", - 1115: "FriendPointLimit", - 1116: "FriendNoreceived", - 1200: "ItemsNoEnough", - 1201: "ItemsNoFoundGird", - 1202: "ItemsGridNumUpper", - 1203: "ItemsGirdAmountUpper", - 1204: "ItemsUseNotSupported", - 1205: "ItemsUseNoCanSell", - 1300: "HeroNoExist", - 1301: "HeroNoEnough", - 1302: "HeroMaxLv", - 1303: "HeroInitCreat", - 1304: "HeroColorErr", - 1305: "HeroSkillUpErr", - 1306: "HeroMaxResonate", - 1307: "HeroNoResonate", - 1308: "HeroNotNeedResonate", - 1309: "HeroNoEnergy", - 1310: "HeroCreate", - 1311: "HeroEquipUpdate", - 1312: "HeroMaxAwaken", - 1313: "HeroIsLock", - 1314: "HeroMaxCount", - 1315: "HeroCostTypeErr", - 1316: "HeroStarErr", - 1317: "HeroTypeErr", - 1318: "HeroExpTypeErr", - 1319: "HeroAddMaxExp", - 1320: "HeroStarLvErr", - 1321: "HeroMaxStarLv", - 1322: "DrawCardTypeNotFound", - 1323: "HeroMaxSkillLv", - 1324: "HeroAlreadyKongFuStatus", - 1400: "EquipmentOnFoundEquipment", - 1401: "EquipmentLvlimitReached", - 1402: "EquipmentIsWorn", - 1403: "EquipmentNoCanSell", - 1500: "MainlineNotFindChapter", - 1501: "MainlineIDFailed", - 1502: "MainlineNotFound", - 1503: "MainlinePreNotFound", - 1504: "MainlineRepeatReward", - 1505: "MainlineCompleteReward", - 1600: "TaskInit", - 1601: "TaskReset", - 1602: "TaskHandle", - 1603: "TaskReceived", - 1604: "TaskActiveInit", - 1605: "TaskActiveNofound", - 1606: "TaskActiveNoenough", - 1607: "TaskNoFinished", - 1608: "TaskFinished", - 1609: "TaskTagEmpty", - 1610: "TaskIdEmpty", - 1611: "TaskNotFound", - 1700: "ShopGoodsIsSoldOut", - 1701: "ShopNoSurplusRefreshNum", - 1800: "MailErr", - 1900: "PagodaNotFound", - 1901: "PagodaLevlErr", - 1902: "PagodaGetRewardErr", - 1903: "PagodaConditionErr", - 2000: "MartialhallNotUnlocked", - 2001: "MartialhallInUse", - 2002: "MartialhallUnlocked", - 2003: "MartialhallNoUnlocked", - 2101: "GourmetMoreOrderTime", - 2102: "GourmetSkillMaxLv", - 2201: "RtaskFinished", - 2202: "RtaskUnFinished", - 2203: "RtaskNoRtask", - 2204: "RtaskRewarded", - 2205: "RtaskPreNoFinish", - 2206: "RtaskCondiNoReach", - 2207: "RtaskNoLastOne", - 2208: "RtaskCondiNoFound", - 2301: "VikingLvErr", - 2302: "VikingBoosType", - 2303: "VikingBuyMaxCount", - 2304: "VikingMaxChallengeCount", - 2401: "MoonfantasyHasExpired", - 2402: "MoonfantasyJoinUp", - 2403: "MoonfantasyDareUp", - 2404: "MoonfantasyBattleNoEnd", - 2405: "MoonfantasyBattleNoWin", - 2406: "MoonfantasyNoJoin", - 2407: "MoonfantasyNotEnoughbattles", - 2501: "BattleNoFoundRecord", - 2601: "LinestoryTaskFinished", - 2602: "LinestorySubTaskFinished", - 2603: "LinestoryTaskDisabledEnter", - 2604: "LinestoryPreTaskNoFinished", - 2701: "HuntingLvErr", - 2702: "HuntingBoosType", - 2703: "HuntingBuyMaxCount", - 2704: "HuntingMaxChallengeCount", - 2801: "LibraryMaxLv", - 2802: "LibraryNoData", - 2803: "LibraryActivation", - 2804: "LibraryReward", - 2805: "LibraryLvReward", - 2901: "BattleValidationFailed", - 3000: "SociatyNoFound", - 3001: "SociatyAdded", - 3002: "SociatyDiamondNoEnough", - 3003: "SociatyApply", - 3004: "SociatyNoRight", - 3005: "SociatyNoAdded", - 3006: "SociatyDismiss", - 3007: "SociatyQuit", - 3008: "SociatyAgree", - 3009: "SociatyRefuse", - 3101: "ArenaTicketBuyUp", - 3102: "ArenaTicketNotEnough", - 3201: "TalentRepeatLearn", - 3202: "TalentErrData", - 3203: "TalentUnLockerBefore", - 3204: "TalentResetState", + 0: "Success", + 10: "NoFindService", + 11: "NoFindServiceHandleFunc", + 12: "RpcFuncExecutionError", + 13: "CacheReadError", + 14: "SqlExecutionError", + 15: "ReqParameterError", + 16: "SignError", + 17: "InsufficientPermissions", + 18: "NoLogin", + 19: "UserSessionNobeing", + 20: "StateInvalid", + 21: "DBError", + 22: "SystemError", + 23: "DecodeError", + 24: "TimestampTimeout", + 25: "PbError", + 26: "AgentUidEmpty", + 100: "Exception", + 101: "Unknown", + 102: "ResNoEnough", + 103: "ConfigurationException", + 104: "ConfigNoFound", + 105: "UserLogined", + 1000: "SecKeyInvalid", + 1001: "SecKey", + 1002: "BindUser", + 1003: "GoldNoEnough", + 1004: "DiamondNoEnough", + 1005: "RoleCreated", + 1006: "UserNickNameExist", + 1007: "VeriCodeNoValid", + 1008: "VeriCodeExpired", + 1009: "UserResetData", + 1010: "UserModiNameCount", + 1011: "UserNickNameEmpty", + 1012: "UserExpandNull", + 1013: "UserExpNoEnough", + 1014: "UserFriendNoEnough", + 1100: "FriendNotSelf", + 1101: "FriendSelfMax", + 1102: "FriendTargetMax", + 1103: "FriendSelfNoData", + 1104: "FriendTargetNoData", + 1105: "FriendYet", + 1106: "FriendApplyYet", + 1107: "FriendSelfBlackYet", + 1108: "FriendTargetBlackYet", + 1109: "FriendApplyError", + 1110: "FriendBlackMax", + 1111: "FriendSearchNameEmpty", + 1112: "FriendZaned", + 1113: "FriendZanreceived", + 1114: "FriendZanSelf", + 1115: "FriendPointLimit", + 1116: "FriendNoreceived", + 1200: "ItemsNoEnough", + 1201: "ItemsNoFoundGird", + 1202: "ItemsGridNumUpper", + 1203: "ItemsGirdAmountUpper", + 1204: "ItemsUseNotSupported", + 1205: "ItemsUseNoCanSell", + 1300: "HeroNoExist", + 1301: "HeroNoEnough", + 1302: "HeroMaxLv", + 1303: "HeroInitCreat", + 1304: "HeroColorErr", + 1305: "HeroSkillUpErr", + 1306: "HeroMaxResonate", + 1307: "HeroNoResonate", + 1308: "HeroNotNeedResonate", + 1309: "HeroNoEnergy", + 1310: "HeroCreate", + 1311: "HeroEquipUpdate", + 1312: "HeroMaxAwaken", + 1313: "HeroIsLock", + 1314: "HeroMaxCount", + 1315: "HeroCostTypeErr", + 1316: "HeroStarErr", + 1317: "HeroTypeErr", + 1318: "HeroExpTypeErr", + 1319: "HeroAddMaxExp", + 1320: "HeroStarLvErr", + 1321: "HeroMaxStarLv", + 1322: "DrawCardTypeNotFound", + 1323: "HeroMaxSkillLv", + 1324: "HeroAlreadyKongFuStatus", + 1400: "EquipmentOnFoundEquipment", + 1401: "EquipmentLvlimitReached", + 1402: "EquipmentIsWorn", + 1403: "EquipmentNoCanSell", + 1500: "MainlineNotFindChapter", + 1501: "MainlineIDFailed", + 1502: "MainlineNotFound", + 1503: "MainlinePreNotFound", + 1504: "MainlineRepeatReward", + 1505: "MainlineCompleteReward", + 1600: "TaskInit", + 1601: "TaskReset", + 1602: "TaskHandle", + 1603: "TaskReceived", + 1604: "TaskActiveInit", + 1605: "TaskActiveNofound", + 1606: "TaskActiveNoenough", + 1607: "TaskNoFinished", + 1608: "TaskFinished", + 1609: "TaskTagEmpty", + 1610: "TaskIdEmpty", + 1611: "TaskNotFound", + 1700: "ShopGoodsIsSoldOut", + 1701: "ShopNoSurplusRefreshNum", + 1800: "MailErr", + 1900: "PagodaNotFound", + 1901: "PagodaLevlErr", + 1902: "PagodaGetRewardErr", + 1903: "PagodaConditionErr", + 2000: "MartialhallNotUnlocked", + 2001: "MartialhallInUse", + 2002: "MartialhallUnlocked", + 2003: "MartialhallNoUnlocked", + 2101: "GourmetMoreOrderTime", + 2102: "GourmetSkillMaxLv", + 2201: "RtaskFinished", + 2202: "RtaskUnFinished", + 2203: "RtaskNoRtask", + 2204: "RtaskRewarded", + 2205: "RtaskPreNoFinish", + 2206: "RtaskCondiNoReach", + 2207: "RtaskNoLastOne", + 2208: "RtaskCondiNoFound", + 2301: "VikingLvErr", + 2302: "VikingBoosType", + 2303: "VikingBuyMaxCount", + 2304: "VikingMaxChallengeCount", + 2401: "MoonfantasyHasExpired", + 2402: "MoonfantasyJoinUp", + 2403: "MoonfantasyDareUp", + 2404: "MoonfantasyBattleNoEnd", + 2405: "MoonfantasyBattleNoWin", + 2406: "MoonfantasyNoJoin", + 2407: "MoonfantasyNotEnoughbattles", + 2501: "BattleNoFoundRecord", + 2601: "LinestoryTaskFinished", + 2602: "LinestorySubTaskFinished", + 2603: "LinestoryTaskDisabledEnter", + 2604: "LinestoryPreTaskNoFinished", + 2701: "HuntingLvErr", + 2702: "HuntingBoosType", + 2703: "HuntingBuyMaxCount", + 2704: "HuntingMaxChallengeCount", + 2801: "LibraryMaxLv", + 2802: "LibraryNoData", + 2803: "LibraryActivation", + 2804: "LibraryReward", + 2805: "LibraryLvReward", + 2901: "BattleValidationFailed", + 3000: "SociatyNoFound", + 3001: "SociatyAdded", + 3002: "SociatyDiamondNoEnough", + 3003: "SociatyApply", + 3004: "SociatyNoRight", + 3005: "SociatyNoAdded", + 3006: "SociatyDismiss", + 3007: "SociatyQuit", + 3008: "SociatyAgree", + 3009: "SociatyRefuse", + 30010: "SociatyAssign", + 30011: "SociatyDischarge", + 30012: "SociatySettingJob", + 30013: "SociatySetting", + 30014: "SociatyAccuse", + 30015: "SociatySign", + 30016: "SociatySigned", + 30017: "SociatyCDLimit", + 30018: "SociatyApplyMax", + 30019: "SociatySelfSetting", + 30020: "SociatyMemberCountLimit", + 3101: "ArenaTicketBuyUp", + 3102: "ArenaTicketNotEnough", + 3103: "ArenaTicketNpcInCd", + 3201: "TalentRepeatLearn", + 3202: "TalentErrData", + 3203: "TalentUnLockerBefore", + 3204: "TalentResetState", } ErrorCode_value = map[string]int32{ "Success": 0, @@ -561,8 +585,20 @@ var ( "SociatyQuit": 3007, "SociatyAgree": 3008, "SociatyRefuse": 3009, + "SociatyAssign": 30010, + "SociatyDischarge": 30011, + "SociatySettingJob": 30012, + "SociatySetting": 30013, + "SociatyAccuse": 30014, + "SociatySign": 30015, + "SociatySigned": 30016, + "SociatyCDLimit": 30017, + "SociatyApplyMax": 30018, + "SociatySelfSetting": 30019, + "SociatyMemberCountLimit": 30020, "ArenaTicketBuyUp": 3101, "ArenaTicketNotEnough": 3102, + "ArenaTicketNpcInCd": 3103, "TalentRepeatLearn": 3201, "TalentErrData": 3202, "TalentUnLockerBefore": 3203, @@ -601,7 +637,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0xf6, 0x1d, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0x8e, 0x20, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, @@ -831,17 +867,35 @@ var file_errorcode_proto_rawDesc = []byte{ 0x17, 0x12, 0x10, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x10, 0xbf, 0x17, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x67, 0x72, 0x65, 0x65, 0x10, 0xc0, 0x17, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x10, 0xc1, 0x17, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, - 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, - 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x16, 0x0a, 0x11, - 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, - 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, - 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x10, 0xc1, 0x17, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x10, 0xba, 0xea, 0x01, 0x12, + 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, + 0x72, 0x67, 0x65, 0x10, 0xbb, 0xea, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x10, 0xbc, 0xea, 0x01, + 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x10, 0xbd, 0xea, 0x01, 0x12, 0x13, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x10, 0xbe, 0xea, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x53, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x10, 0xbf, 0xea, 0x01, 0x12, 0x13, + 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x10, + 0xc0, 0xea, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x44, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc1, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x0f, 0x53, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xc2, 0xea, 0x01, + 0x12, 0x18, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x6c, 0x66, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0xc3, 0xea, 0x01, 0x12, 0x1d, 0x0a, 0x17, 0x53, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xc4, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, + 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, + 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, + 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, + 0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, + 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, + 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, + 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, + 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, + 0x84, 0x19, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/userexpand.pb.go b/pb/userexpand.pb.go index 1453cfa92..ee03c7c7b 100644 --- a/pb/userexpand.pb.go +++ b/pb/userexpand.pb.go @@ -45,7 +45,10 @@ type DBUserExpand struct { CompletePagoda bool `protobuf:"varint,21,opt,name=completePagoda,proto3" json:"completePagoda" bson:"completePagoda"` //通关普通塔 RtaskId int32 `protobuf:"varint,22,opt,name=rtaskId,proto3" json:"rtaskId" bson:"rtaskId"` // 当前完成的随机任务ID TeamHeroIds []string `protobuf:"bytes,23,rep,name=teamHeroIds,proto3" json:"teamHeroIds" bson:"teamHeroIds"` //阵容英雄IDs - SociatyId string `protobuf:"bytes,24,opt,name=sociatyId,proto3" json:"sociatyId"` //@go_tags(`bson:"sociatyId") 公会ID + SociatyId string `protobuf:"bytes,24,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID + SociatyContri int32 `protobuf:"varint,25,opt,name=sociatyContri,proto3" json:"sociatyContri" bson:"sociatyContri"` //个人贡献 + SociatyCd int64 `protobuf:"varint,26,opt,name=sociatyCd,proto3" json:"sociatyCd" bson:"sociatyCd"` //主动退出CD + SociatyCoin int32 `protobuf:"varint,27,opt,name=sociatyCoin,proto3" json:"sociatyCoin" bson:"sociatyCoin"` //公会币 } func (x *DBUserExpand) Reset() { @@ -220,11 +223,32 @@ func (x *DBUserExpand) GetSociatyId() string { return "" } +func (x *DBUserExpand) GetSociatyContri() int32 { + if x != nil { + return x.SociatyContri + } + return 0 +} + +func (x *DBUserExpand) GetSociatyCd() int64 { + if x != nil { + return x.SociatyCd + } + return 0 +} + +func (x *DBUserExpand) GetSociatyCoin() int32 { + if x != nil { + return x.SociatyCoin + } + return 0 +} + var File_userexpand_proto protoreflect.FileDescriptor var file_userexpand_proto_rawDesc = []byte{ 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x82, 0x06, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, + 0x74, 0x6f, 0x22, 0xe8, 0x06, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, @@ -268,12 +292,18 @@ var file_userexpand_proto_rawDesc = []byte{ 0x74, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x1a, 0x39, 0x0a, 0x0b, - 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x18, 0x19, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x64, 0x18, + 0x1a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x6f, + 0x69, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sys/configure/structs/Game.ArenaChallengeNpcData.go b/sys/configure/structs/Game.ArenaChallengeNpcData.go index d0d45dbce..1fcdd3cf5 100644 --- a/sys/configure/structs/Game.ArenaChallengeNpcData.go +++ b/sys/configure/structs/Game.ArenaChallengeNpcData.go @@ -14,13 +14,13 @@ type GameArenaChallengeNpcData struct { Id int32 OpenCond int32 OpenValue int32 - MonsterformatId int32 + MonsterformatId []int32 StroyIdFront int32 StroyIdAfter int32 Name string ReviveCd int32 - ReviveMonsterformatId int32 NpcReward []*Gameatn + NewNpcReward []*Gameatn } const TypeId_GameArenaChallengeNpcData = 362128499 @@ -33,12 +33,24 @@ func (_v *GameArenaChallengeNpcData)Deserialize(_buf map[string]interface{}) (er { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["open_cond"].(float64); !_ok_ { err = errors.New("open_cond error"); return }; _v.OpenCond = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["open_value"].(float64); !_ok_ { err = errors.New("open_value error"); return }; _v.OpenValue = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["monsterformat_id"].(float64); !_ok_ { err = errors.New("monsterformat_id error"); return }; _v.MonsterformatId = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["monsterformat_id"].([]interface{}); !_ok_ { err = errors.New("monsterformat_id error"); return } + + _v.MonsterformatId = make([]int32, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ int32 + { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } + _v.MonsterformatId = append(_v.MonsterformatId, _list_v_) + } + } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["stroy_id_front"].(float64); !_ok_ { err = errors.New("stroy_id_front error"); return }; _v.StroyIdFront = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["stroy_id_after"].(float64); !_ok_ { err = errors.New("stroy_id_after error"); return }; _v.StroyIdAfter = int32(_tempNum_) } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["revive_cd"].(float64); !_ok_ { err = errors.New("revive_cd error"); return }; _v.ReviveCd = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["revive_monsterformat_id"].(float64); !_ok_ { err = errors.New("revive_monsterformat_id error"); return }; _v.ReviveMonsterformatId = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool @@ -53,6 +65,20 @@ func (_v *GameArenaChallengeNpcData)Deserialize(_buf map[string]interface{}) (er } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["new_npc_reward"].([]interface{}); !_ok_ { err = errors.New("new_npc_reward error"); return } + + _v.NewNpcReward = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.NewNpcReward = append(_v.NewNpcReward, _list_v_) + } + } + return } diff --git a/sys/db/init_test.go b/sys/db/init_test.go index e17c8349a..e23c7907e 100644 --- a/sys/db/init_test.go +++ b/sys/db/init_test.go @@ -35,7 +35,7 @@ func Test_Id(t *testing.T) { func Test_2D(t *testing.T) { if sys, err := mgo.NewSys( mgo.SetMongodbUrl("mongodb://10.0.0.9:10013"), - mgo.SetMongodbDatabase("dreamfactory4"), + mgo.SetMongodbDatabase("dreamfactory2"), ); err != nil { fmt.Printf("err:%v", err) return