From 78ade32f67946f1a615ded1c476062a5760a33a1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 12 Jan 2024 18:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=89=AB=E8=8D=A1=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_shop.json | 3 - bin/json/game_skillafteratk.json | 10 +- bin/json/game_skillatk.json | 5 +- bin/json/game_sweep.json | 866 ++++++++++++++++++ comm/const.go | 2 +- modules/battle/battleclientmgr.go | 12 + modules/battle/module.go | 39 +- modules/viking/api_challengeover.go | 9 +- modules/viking/api_sweep.go | 231 +++++ modules/viking/comp_configure.go | 25 +- pb/viking_msg.pb.go | 463 ++++++++-- .../structs/Game.BuzkashiMountData.go | 4 +- sys/configure/structs/Game.Sweep.go | 42 + sys/configure/structs/Game.SweepData.go | 73 ++ sys/configure/structs/Tables.go | 7 + 15 files changed, 1690 insertions(+), 101 deletions(-) create mode 100644 bin/json/game_sweep.json create mode 100644 modules/viking/api_sweep.go create mode 100644 sys/configure/structs/Game.Sweep.go create mode 100644 sys/configure/structs/Game.SweepData.go diff --git a/bin/json/game_shop.json b/bin/json/game_shop.json index 71a712937..9d56ae926 100644 --- a/bin/json/game_shop.json +++ b/bin/json/game_shop.json @@ -428,8 +428,6 @@ ], "shopitem": [ 30001, - 30002, - 30003, 30004, 30005, 30006, @@ -440,7 +438,6 @@ 30011, 30012, 30013, - 30014, 30015, 30016, 30017 diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index 8820dca92..50398b6f5 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -40509,7 +40509,9 @@ 1200 ], "FollowSK": [], - "SucFollowSK": [], + "SucFollowSK": [ + 225002319 + ], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -40638,9 +40640,7 @@ 2 ], "FollowSK": [], - "SucFollowSK": [ - 225002319 - ], + "SucFollowSK": [], "FailFollowSK": [], "MustHit": false, "DpsRevisiType": 0, @@ -72688,7 +72688,7 @@ "TriggerAnim": "", "Type": 12, "Argu": [ - 100 + 300 ], "FollowSK": [], "SucFollowSK": [], diff --git a/bin/json/game_skillatk.json b/bin/json/game_skillatk.json index 078033f43..c44589dbd 100644 --- a/bin/json/game_skillatk.json +++ b/bin/json/game_skillatk.json @@ -32415,12 +32415,13 @@ "ChildSkill": { "Id": [ 225002211, - 225002213, 225002215 ] }, "passSkill": [ - 225002212 + 225002211, + 225002212, + 225002215 ], "Desc": { "key": "skill_skill_atk_Desc_125002211_1", diff --git a/bin/json/game_sweep.json b/bin/json/game_sweep.json new file mode 100644 index 000000000..532e9567b --- /dev/null +++ b/bin/json/game_sweep.json @@ -0,0 +1,866 @@ +[ + { + "Id": 1, + "Group": 1, + "Low": 0, + "Up": 15, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 4 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_1", + "text": "战斗胜利且回合数0-15" + } + }, + { + "Id": 2, + "Group": 1, + "Low": 16, + "Up": 30, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 6 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_2", + "text": "战斗胜利且回合数16-30" + } + }, + { + "Id": 3, + "Group": 1, + "Low": 31, + "Up": 40, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_3", + "text": "战斗胜利且回合数31-40" + } + }, + { + "Id": 4, + "Group": 1, + "Low": 41, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_4", + "text": "41回合及以上或战斗失败" + } + }, + { + "Id": 5, + "Group": 2, + "Low": 0, + "Up": 20, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 6 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_5", + "text": "战斗胜利且回合数0-20" + } + }, + { + "Id": 6, + "Group": 2, + "Low": 21, + "Up": 50, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_6", + "text": "战斗胜利且回合数21-50" + } + }, + { + "Id": 7, + "Group": 2, + "Low": 51, + "Up": 60, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_7", + "text": "战斗胜利且回合数51-60" + } + }, + { + "Id": 8, + "Group": 2, + "Low": 61, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_8", + "text": "61回合及以上或战斗失败" + } + }, + { + "Id": 9, + "Group": 3, + "Low": 0, + "Up": 30, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 25 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_9", + "text": "战斗胜利且回合数0-30" + } + }, + { + "Id": 10, + "Group": 3, + "Low": 31, + "Up": 50, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 15 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 25 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_10", + "text": "战斗胜利且回合数31-50" + } + }, + { + "Id": 11, + "Group": 3, + "Low": 51, + "Up": 80, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 20 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 25 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_11", + "text": "战斗胜利且回合数51-80" + } + }, + { + "Id": 12, + "Group": 3, + "Low": 81, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 25 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 25 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_12", + "text": "81回合及以上或战斗失败" + } + }, + { + "Id": 13, + "Group": 4, + "Low": 0, + "Up": 15, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 3 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_13", + "text": "战斗胜利且回合数0-15" + } + }, + { + "Id": 14, + "Group": 4, + "Low": 16, + "Up": 30, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 6 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_14", + "text": "战斗胜利且回合数16-30" + } + }, + { + "Id": 15, + "Group": 4, + "Low": 31, + "Up": 40, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_15", + "text": "战斗胜利且回合数31-40" + } + }, + { + "Id": 16, + "Group": 4, + "Low": 41, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_16", + "text": "41回合及以上或战斗失败" + } + }, + { + "Id": 17, + "Group": 5, + "Low": 0, + "Up": 40, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 5 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_17", + "text": "战斗胜利且回合数0-40" + } + }, + { + "Id": 18, + "Group": 5, + "Low": 41, + "Up": 80, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_18", + "text": "战斗胜利且回合数41-80" + } + }, + { + "Id": 19, + "Group": 5, + "Low": 81, + "Up": 120, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_19", + "text": "战斗胜利且回合数81-120" + } + }, + { + "Id": 20, + "Group": 5, + "Low": 121, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_20", + "text": "121回合及以上或战斗失败" + } + }, + { + "Id": 21, + "Group": 6, + "Low": 0, + "Up": 50, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 6 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_21", + "text": "战斗胜利且回合数0-50" + } + }, + { + "Id": 22, + "Group": 6, + "Low": 51, + "Up": 80, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 12 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_22", + "text": "战斗胜利且回合数51-80" + } + }, + { + "Id": 23, + "Group": 6, + "Low": 101, + "Up": 160, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_23", + "text": "战斗胜利且回合数101-160" + } + }, + { + "Id": 24, + "Group": 6, + "Low": 161, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 18 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_24", + "text": "161回合及以上或战斗失败" + } + }, + { + "Id": 25, + "Group": 7, + "Low": 0, + "Up": 20, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 3 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_25", + "text": "战斗胜利且回合数0-20" + } + }, + { + "Id": 26, + "Group": 7, + "Low": 21, + "Up": 40, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 6 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_26", + "text": "战斗胜利且回合数21-40" + } + }, + { + "Id": 27, + "Group": 7, + "Low": 41, + "Up": 60, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_27", + "text": "战斗胜利且回合数41-60" + } + }, + { + "Id": 28, + "Group": 7, + "Low": 61, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 9 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_28", + "text": "61回合及以上或战斗失败" + } + }, + { + "Id": 29, + "Group": 8, + "Low": 0, + "Up": 20, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 4 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_29", + "text": "战斗胜利且回合数0-20" + } + }, + { + "Id": 30, + "Group": 8, + "Low": 21, + "Up": 50, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 8 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_30", + "text": "战斗胜利且回合数21-50" + } + }, + { + "Id": 31, + "Group": 8, + "Low": 51, + "Up": 80, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_31", + "text": "战斗胜利且回合数51-80" + } + }, + { + "Id": 32, + "Group": 8, + "Low": 81, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_32", + "text": "81回合及以上或战斗失败" + } + }, + { + "Id": 33, + "Group": 9, + "Low": 0, + "Up": 30, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 5 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_33", + "text": "战斗胜利且回合数0-30" + } + }, + { + "Id": 34, + "Group": 9, + "Low": 31, + "Up": 70, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 10 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_34", + "text": "战斗胜利且回合数31-70" + } + }, + { + "Id": 35, + "Group": 9, + "Low": 71, + "Up": 110, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_35", + "text": "战斗胜利且回合数71-110" + } + }, + { + "Id": 36, + "Group": 9, + "Low": 111, + "Up": 999, + "WinCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "LoseCost": [ + { + "a": "item", + "t": "10000041", + "n": 16 + } + ], + "Desc": { + "key": "sweep_sweep_Desc_36", + "text": "111回合及以上或战斗失败" + } + } +] \ No newline at end of file diff --git a/comm/const.go b/comm/const.go index 829b64819..86127891f 100644 --- a/comm/const.go +++ b/comm/const.go @@ -986,7 +986,7 @@ const ( Rtype234 TaskType = 234 // 完成多次捕羊大赛 Rtype235 TaskType = 235 // 指定X龙的等级达到Y级 Rtype236 TaskType = 236 // 购买X章的商店物品数量达到Y件 - Rtype237 TaskType = 237 // 在梦境回廊内消耗X点体力 + // Rtype237 TaskType = 237 // 在梦境回廊内消耗X点体力 Rtype240 TaskType = 240 //累计完成x次日常任务 Rtype241 TaskType = 241 //在任意商店累计购买x次商品 diff --git a/modules/battle/battleclientmgr.go b/modules/battle/battleclientmgr.go index f88869135..d897641d9 100644 --- a/modules/battle/battleclientmgr.go +++ b/modules/battle/battleclientmgr.go @@ -84,6 +84,18 @@ func (this *battleClientMgrComp) CheckBattle(ctx context.Context, req *pb.Battle return } +//校验战斗结果 +func (this *battleClientMgrComp) RunBattle(ctx context.Context, req *pb.BattleRunReq) (reply *pb.BattleRunResp, err error) { + reply = &pb.BattleRunResp{} + if err = this.reconnect(); err != nil { + return + } + if err = this.clinet.callBattle(ctx, "Run", req, reply); err != nil { + this.module.Errorln(err) + } + return +} + //实时pvp战斗创建 func (this *battleClientMgrComp) GetInfo(ctx context.Context, req *pb.BattleGetInfoReq) (reply *pb.BattleGetInfoResp, err error) { this.module.Debug("GetInfo", log.Field{Key: "req", Value: req}) diff --git a/modules/battle/module.go b/modules/battle/module.go index 767189ff5..467c12bd7 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -692,7 +692,42 @@ func (this *Battle) CreateDebuffBattle(session comm.IUserSession, req *pb.Battle } // 炮服务端战斗 -func (this *Battle) RunServerBattle(session comm.IUserSession, req *pb.BattleRunReq) (errdata *pb.ErrorData, record *pb.BattleRunResp) { - +func (this *Battle) RunServerBattle(session comm.IUserSession, req *pb.BattleRunReq) (errdata *pb.ErrorData, reply *pb.BattleRunResp) { + var ( + ctx context.Context + err error + ) + if this.options.OpenCheck { + stime := time.Now() + ctx, _ = context.WithTimeout(context.Background(), time.Second*5) + if reply, err = this.clientmgr.RunBattle(ctx, req); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_BattleValidationFailed, + Title: pb.ErrorCode_BattleValidationFailed.ToString(), + } + this.Error("[Battle Run]", + log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, + log.Field{Key: "reply", Value: reply.String()}, + log.Field{Key: "err", Value: err.Error()}, + ) + return + } + this.Debug("[Battle Check]", + log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, + log.Field{Key: "reply", Value: reply.String()}, + ) + } else { + reply = &pb.BattleRunResp{ + Reports: make([]*pb.BattleReport, 0), + } + for _, v := range req.Info { + reply.Reports = append(reply.Reports, &pb.BattleReport{ + Info: v, + Costtime: 10, + WinSide: 1, + Round: 10, + }) + } + } return } diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index b49812a03..25012045b 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -35,7 +35,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal oldDifficulty int32 // 记录通关之前的难度 consumPs int32 err error - taskPs int32 ) changExp = make(map[string]int32, 0) mapData = make(map[string]interface{}, 0) @@ -92,9 +91,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal pskey := req.BossId<<8 + req.Difficulty errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report) consumPs = viking.Ps[pskey] - if vikingCfg.Copytype == 1 { // 买点任务体力统计 - taskPs = viking.Ps[pskey] - } + viking.Ps[pskey] = 0 // 清空预扣体力值 mapData["ps"] = viking.Ps if !bWin { // 战斗失败了 直接返回 @@ -248,8 +245,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal tasks = append(tasks, comm.GetBuriedParam(comm.Rtype172, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype181, 1, req.BossId, req.Difficulty)) } - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype248, taskPs)) - tasks = append(tasks, comm.GetBuriedParam(comm.Rtype237, consumPs)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype248, consumPs, vikingCfg.Copytype)) + // tasks = append(tasks, comm.GetBuriedParam(comm.Rtype237, consumPs)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype201, consumPs)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype76, 1, req.BossId)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype77, 1, req.BossId, req.Difficulty)) diff --git a/modules/viking/api_sweep.go b/modules/viking/api_sweep.go new file mode 100644 index 000000000..c5ed1d50a --- /dev/null +++ b/modules/viking/api_sweep.go @@ -0,0 +1,231 @@ +package viking + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + + "go.mongodb.org/mongo-driver/bson/primitive" +) + +// 参数校验 +func (this *apiComp) SweepCheck(session comm.IUserSession, req *pb.VikingSweepReq) (errdata *pb.ErrorData) { + if req.BossId <= 0 && req.Difficulty > 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + return + } + return +} + +// /挑战完成 +func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (errdata *pb.ErrorData) { + var ( + viking *pb.DBViking + record *pb.DBBattleRecord + infos []*pb.BattleInfo + runresp *pb.BattleRunResp + conf *cfg.GameSweepData + user *pb.DBUser + bWin bool // 战斗是否胜利 + atno []*pb.UserAtno // atno 类型 + atns []*pb.UserAssets //消耗 + changExp map[string]int32 + heroupaward []*cfg.Gameatn + reward []*cfg.Gameatn + consume []*cfg.Gameatn + + err error + result []*pb.VikingSweepResult + ps int32 + totalps int32 + // 随机任务统计 + tasks []*pb.BuriedParam + ) + changExp = make(map[string]int32, 0) + + if errdata = this.SweepCheck(session, req); errdata != nil { + return // 参数校验失败直接返回 + } + + if viking, err = this.module.modelViking.getVikingList(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_VikingBoosType, + Message: err.Error(), + } + return + } + + vikingCfg, err := this.module.configure.GetVikingBossConfigData(req.BossId, req.Difficulty) + if err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + + if req.Difficulty <= viking.Boss[req.BossId] { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_VikingLvErr, + Title: pb.ErrorCode_VikingLvErr.ToString(), + } + return + } + + if user, err = this.module.GetUserForSession(session); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ + Rulesid: vikingCfg.BattleReadyID, + Ptype: pb.PlayType_viking, + Title: "", + Format: req.Battle, + Mformat: vikingCfg.Boss, + }); errdata != nil { + return + } + for i := 0; i < int(req.Sweepnum); i++ { + infos = append(infos, &pb.BattleInfo{ + Id: primitive.NewObjectID().Hex(), + Title: record.Title, + Rulesid: vikingCfg.BattleReadyID, + Btype: record.Btype, + Ptype: record.Ptype, + RedCompId: record.RedCompId, + Redflist: record.Redflist, + BlueCompId: record.BlueCompId, + Buleflist: record.Buleflist, + Tasks: record.Tasks, + }) + } + if errdata, runresp = this.module.battle.RunServerBattle(session, &pb.BattleRunReq{Info: infos}); errdata != nil { + return + } + + for _, v := range runresp.Reports { + bWin = false + ps = 0 + reward = make([]*cfg.Gameatn, 0) + consume = make([]*cfg.Gameatn, 0) + if v.WinSide == 1 { + bWin = true + } + + for _, v := range vikingCfg.PsMg { + if v.A == "attr" && v.T == "ps" { + ps += v.N + } + } + consume = append(consume, vikingCfg.PsMg...) + if conf, err = this.module.configure.GetGameSweepData(req.Sweepgroup, v.Round); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Message: err.Error(), + } + return + } + if !bWin { // 战斗失败了 直接返回 + consume = append(consume, conf.LoseCost...) + consume = append(consume, this.module.ModuleUser.PsConvertExp(ps)) + for _, v := range consume { + atns = append(atns, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + result = append(result, &pb.VikingSweepResult{ + Battleid: v.Info.Id, + Iswin: false, + Consume: atns, + Rounds: v.Round, + }) + totalps += ps + break + } + for _, v := range vikingCfg.PsConsume { + if v.A == "attr" && v.T == "ps" { + ps += v.N + } + } + totalps += ps + consume = append(consume, conf.WinCost...) + consume = append(consume, vikingCfg.PsConsume...) + reward = append(reward, this.module.ModuleUser.PsConvertExp(ps)) + reward = this.module.ModuleTools.GetGroupDataByLottery(vikingCfg.Drop, user.Vip, user.Lv) + b := this.module.ModuleActivity.HDCelebration(session, 2, req.BossId) + for _, v := range reward { + reward = append(reward, v) + if b { // 活动双倍 + reward = append(reward, v) + } + } + + // 加经验 + if vikingCfg.Heroexp > 0 { + var heroObjs []string + if v != nil && v.Info != nil && len(v.Info.Redflist) > 0 { + for _, v := range v.Info.Redflist[0].Team { + if v.HeroID != "" { + if !v.Ishelp { // 助战英雄不加经验 + heroObjs = append(heroObjs, v.Oid) + } + } + } + } + if changExp, heroupaward, errdata = this.module.ModuleHero.AddHerosExp(session, heroObjs, vikingCfg.Heroexp); errdata != nil { + return + } + reward = append(reward, heroupaward...) + } + if errdata, atno = this.module.DispenseAtno(session, reward, true); errdata != nil { + return + } + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype73, 1, req.BossId, req.Difficulty)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype78, req.BossId, v.Costtime, req.Difficulty)) + + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype76, 1, req.BossId)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype77, 1, req.BossId, req.Difficulty)) + + for _, v := range consume { + atns = append(atns, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + + result = append(result, &pb.VikingSweepResult{ + Battleid: v.Info.Id, + Iswin: true, + Rounds: v.Round, + Consume: atns, + Award: atno, + Heroexp: changExp, + }) + } + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype248, totalps, vikingCfg.Copytype)) + // tasks = append(tasks, comm.GetBuriedParam(comm.Rtype237, totalps)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype201, totalps)) + session.SendMsg(string(this.module.GetType()), VikingChallengeOverResp, &pb.VikingSweepResp{ + Result: result, + }) + if len(tasks) > 0 { + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + this.chat.SendSysChatToWorld(session, comm.ChatSystem14, nil, req.BossId, req.Difficulty, user.Name) + this.module.ModuleBuried.TriggerBuried(session, tasks...) + this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "VikingChallengeOverReq", atno) + }) + } + return +} diff --git a/modules/viking/comp_configure.go b/modules/viking/comp_configure.go index 58972c12c..4843a33af 100644 --- a/modules/viking/comp_configure.go +++ b/modules/viking/comp_configure.go @@ -17,19 +17,23 @@ const ( game_vikingboss = "game_vikingboss.json" // game_challenge = "game_vikingchallenge.json" viking_reward = "game_vikingreward.json" //全局配置表 + game_sweep = "game_sweep.json" ) ///配置管理基础组件 type configureComp struct { - hlock sync.RWMutex modules.MCompConfigure + module core.IModule + hlock sync.RWMutex _vikingMap map[int64]*cfg.GameVikingBossData } //组件初始化接口 func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompConfigure.Init(service, module, comp, options) + this.module = module err = this.LoadConfigure(viking_reward, cfg.NewGameVikingReward) + err = this.LoadConfigure(game_sweep, cfg.NewGameSweep) this._vikingMap = make(map[int64]*cfg.GameVikingBossData, 0) configure.RegisterConfigure(game_vikingboss, cfg.NewGameVikingBoss, func() { @@ -127,3 +131,22 @@ func (this *configureComp) GetVikingRewardConf() (conf []*cfg.GameVikingRewardDa } return } + +func (this *configureComp) GetGameSweepData(id int32, round int32) (conf *cfg.GameSweepData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_sweep); err != nil { + return + } else { + for _, v := range v.(*cfg.GameSweep).GetDataList() { + if v.Group == id && round >= v.Low && round <= v.Up { + conf = v + return + } + } + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_sweep, id) + return + } + return +} diff --git a/pb/viking_msg.pb.go b/pb/viking_msg.pb.go index b6c147d43..84e657c09 100644 --- a/pb/viking_msg.pb.go +++ b/pb/viking_msg.pb.go @@ -391,6 +391,230 @@ func (x *VikingChallengeOverResp) GetHeroexp() map[string]int32 { return nil } +// 扫荡 +type VikingSweepReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BossId int32 `protobuf:"varint,1,opt,name=bossId,proto3" json:"bossId"` // boos 类型 + Difficulty int32 `protobuf:"varint,2,opt,name=difficulty,proto3" json:"difficulty"` // 难度 + Battle *BattleFormation `protobuf:"bytes,3,opt,name=battle,proto3" json:"battle"` + Sweepnum int32 `protobuf:"varint,4,opt,name=sweepnum,proto3" json:"sweepnum"` //扫荡结束 + Isfailend bool `protobuf:"varint,5,opt,name=isfailend,proto3" json:"isfailend"` //失败是否结束 + Sweepgroup int32 `protobuf:"varint,6,opt,name=sweepgroup,proto3" json:"sweepgroup"` //扫荡组 +} + +func (x *VikingSweepReq) Reset() { + *x = VikingSweepReq{} + if protoimpl.UnsafeEnabled { + mi := &file_viking_viking_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VikingSweepReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VikingSweepReq) ProtoMessage() {} + +func (x *VikingSweepReq) ProtoReflect() protoreflect.Message { + mi := &file_viking_viking_msg_proto_msgTypes[6] + 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 VikingSweepReq.ProtoReflect.Descriptor instead. +func (*VikingSweepReq) Descriptor() ([]byte, []int) { + return file_viking_viking_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *VikingSweepReq) GetBossId() int32 { + if x != nil { + return x.BossId + } + return 0 +} + +func (x *VikingSweepReq) GetDifficulty() int32 { + if x != nil { + return x.Difficulty + } + return 0 +} + +func (x *VikingSweepReq) GetBattle() *BattleFormation { + if x != nil { + return x.Battle + } + return nil +} + +func (x *VikingSweepReq) GetSweepnum() int32 { + if x != nil { + return x.Sweepnum + } + return 0 +} + +func (x *VikingSweepReq) GetIsfailend() bool { + if x != nil { + return x.Isfailend + } + return false +} + +func (x *VikingSweepReq) GetSweepgroup() int32 { + if x != nil { + return x.Sweepgroup + } + return 0 +} + +//扫荡结果 +type VikingSweepResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"` //战斗id + Iswin bool `protobuf:"varint,2,opt,name=iswin,proto3" json:"iswin"` //是否胜利 + Rounds int32 `protobuf:"varint,4,opt,name=rounds,proto3" json:"rounds"` //回合数 + Consume []*UserAssets `protobuf:"bytes,5,rep,name=consume,proto3" json:"consume"` //消耗材料 + Award []*UserAtno `protobuf:"bytes,6,rep,name=award,proto3" json:"award"` //奖励字段 + Heroexp map[string]int32 `protobuf:"bytes,7,rep,name=heroexp,proto3" json:"heroexp" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 英雄获得经验 +} + +func (x *VikingSweepResult) Reset() { + *x = VikingSweepResult{} + if protoimpl.UnsafeEnabled { + mi := &file_viking_viking_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VikingSweepResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VikingSweepResult) ProtoMessage() {} + +func (x *VikingSweepResult) ProtoReflect() protoreflect.Message { + mi := &file_viking_viking_msg_proto_msgTypes[7] + 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 VikingSweepResult.ProtoReflect.Descriptor instead. +func (*VikingSweepResult) Descriptor() ([]byte, []int) { + return file_viking_viking_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *VikingSweepResult) GetBattleid() string { + if x != nil { + return x.Battleid + } + return "" +} + +func (x *VikingSweepResult) GetIswin() bool { + if x != nil { + return x.Iswin + } + return false +} + +func (x *VikingSweepResult) GetRounds() int32 { + if x != nil { + return x.Rounds + } + return 0 +} + +func (x *VikingSweepResult) GetConsume() []*UserAssets { + if x != nil { + return x.Consume + } + return nil +} + +func (x *VikingSweepResult) GetAward() []*UserAtno { + if x != nil { + return x.Award + } + return nil +} + +func (x *VikingSweepResult) GetHeroexp() map[string]int32 { + if x != nil { + return x.Heroexp + } + return nil +} + +// 扫荡 回应 +type VikingSweepResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result []*VikingSweepResult `protobuf:"bytes,1,rep,name=result,proto3" json:"result"` +} + +func (x *VikingSweepResp) Reset() { + *x = VikingSweepResp{} + if protoimpl.UnsafeEnabled { + mi := &file_viking_viking_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VikingSweepResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VikingSweepResp) ProtoMessage() {} + +func (x *VikingSweepResp) ProtoReflect() protoreflect.Message { + mi := &file_viking_viking_msg_proto_msgTypes[8] + 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 VikingSweepResp.ProtoReflect.Descriptor instead. +func (*VikingSweepResp) Descriptor() ([]byte, []int) { + return file_viking_viking_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *VikingSweepResp) GetResult() []*VikingSweepResult { + if x != nil { + return x.Result + } + return nil +} + // 购买 type VikingBuyReq struct { state protoimpl.MessageState @@ -403,7 +627,7 @@ type VikingBuyReq struct { func (x *VikingBuyReq) Reset() { *x = VikingBuyReq{} if protoimpl.UnsafeEnabled { - mi := &file_viking_viking_msg_proto_msgTypes[6] + mi := &file_viking_viking_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -416,7 +640,7 @@ func (x *VikingBuyReq) String() string { func (*VikingBuyReq) ProtoMessage() {} func (x *VikingBuyReq) ProtoReflect() protoreflect.Message { - mi := &file_viking_viking_msg_proto_msgTypes[6] + mi := &file_viking_viking_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -429,7 +653,7 @@ func (x *VikingBuyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use VikingBuyReq.ProtoReflect.Descriptor instead. func (*VikingBuyReq) Descriptor() ([]byte, []int) { - return file_viking_viking_msg_proto_rawDescGZIP(), []int{6} + return file_viking_viking_msg_proto_rawDescGZIP(), []int{9} } func (x *VikingBuyReq) GetCount() int32 { @@ -450,7 +674,7 @@ type VikingBuyResp struct { func (x *VikingBuyResp) Reset() { *x = VikingBuyResp{} if protoimpl.UnsafeEnabled { - mi := &file_viking_viking_msg_proto_msgTypes[7] + mi := &file_viking_viking_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -463,7 +687,7 @@ func (x *VikingBuyResp) String() string { func (*VikingBuyResp) ProtoMessage() {} func (x *VikingBuyResp) ProtoReflect() protoreflect.Message { - mi := &file_viking_viking_msg_proto_msgTypes[7] + mi := &file_viking_viking_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -476,7 +700,7 @@ func (x *VikingBuyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use VikingBuyResp.ProtoReflect.Descriptor instead. func (*VikingBuyResp) Descriptor() ([]byte, []int) { - return file_viking_viking_msg_proto_rawDescGZIP(), []int{7} + return file_viking_viking_msg_proto_rawDescGZIP(), []int{10} } func (x *VikingBuyResp) GetData() *DBViking { @@ -498,7 +722,7 @@ type VikingRankListReq struct { func (x *VikingRankListReq) Reset() { *x = VikingRankListReq{} if protoimpl.UnsafeEnabled { - mi := &file_viking_viking_msg_proto_msgTypes[8] + mi := &file_viking_viking_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -511,7 +735,7 @@ func (x *VikingRankListReq) String() string { func (*VikingRankListReq) ProtoMessage() {} func (x *VikingRankListReq) ProtoReflect() protoreflect.Message { - mi := &file_viking_viking_msg_proto_msgTypes[8] + mi := &file_viking_viking_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -524,7 +748,7 @@ func (x *VikingRankListReq) ProtoReflect() protoreflect.Message { // Deprecated: Use VikingRankListReq.ProtoReflect.Descriptor instead. func (*VikingRankListReq) Descriptor() ([]byte, []int) { - return file_viking_viking_msg_proto_rawDescGZIP(), []int{8} + return file_viking_viking_msg_proto_rawDescGZIP(), []int{11} } func (x *VikingRankListReq) GetBoosType() int32 { @@ -546,7 +770,7 @@ type VikingRankListResp struct { func (x *VikingRankListResp) Reset() { *x = VikingRankListResp{} if protoimpl.UnsafeEnabled { - mi := &file_viking_viking_msg_proto_msgTypes[9] + mi := &file_viking_viking_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -559,7 +783,7 @@ func (x *VikingRankListResp) String() string { func (*VikingRankListResp) ProtoMessage() {} func (x *VikingRankListResp) ProtoReflect() protoreflect.Message { - mi := &file_viking_viking_msg_proto_msgTypes[9] + mi := &file_viking_viking_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -572,7 +796,7 @@ func (x *VikingRankListResp) ProtoReflect() protoreflect.Message { // Deprecated: Use VikingRankListResp.ProtoReflect.Descriptor instead. func (*VikingRankListResp) Descriptor() ([]byte, []int) { - return file_viking_viking_msg_proto_rawDescGZIP(), []int{9} + return file_viking_viking_msg_proto_rawDescGZIP(), []int{12} } func (x *VikingRankListResp) GetRanks() []*DBVikingRank { @@ -601,7 +825,7 @@ type VikingSeasonRankReq struct { func (x *VikingSeasonRankReq) Reset() { *x = VikingSeasonRankReq{} if protoimpl.UnsafeEnabled { - mi := &file_viking_viking_msg_proto_msgTypes[10] + mi := &file_viking_viking_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -614,7 +838,7 @@ func (x *VikingSeasonRankReq) String() string { func (*VikingSeasonRankReq) ProtoMessage() {} func (x *VikingSeasonRankReq) ProtoReflect() protoreflect.Message { - mi := &file_viking_viking_msg_proto_msgTypes[10] + mi := &file_viking_viking_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -627,7 +851,7 @@ func (x *VikingSeasonRankReq) ProtoReflect() protoreflect.Message { // Deprecated: Use VikingSeasonRankReq.ProtoReflect.Descriptor instead. func (*VikingSeasonRankReq) Descriptor() ([]byte, []int) { - return file_viking_viking_msg_proto_rawDescGZIP(), []int{10} + return file_viking_viking_msg_proto_rawDescGZIP(), []int{13} } func (x *VikingSeasonRankReq) GetBoosType() int32 { @@ -649,7 +873,7 @@ type VikingSeasonRankResp struct { func (x *VikingSeasonRankResp) Reset() { *x = VikingSeasonRankResp{} if protoimpl.UnsafeEnabled { - mi := &file_viking_viking_msg_proto_msgTypes[11] + mi := &file_viking_viking_msg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -662,7 +886,7 @@ func (x *VikingSeasonRankResp) String() string { func (*VikingSeasonRankResp) ProtoMessage() {} func (x *VikingSeasonRankResp) ProtoReflect() protoreflect.Message { - mi := &file_viking_viking_msg_proto_msgTypes[11] + mi := &file_viking_viking_msg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -675,7 +899,7 @@ func (x *VikingSeasonRankResp) ProtoReflect() protoreflect.Message { // Deprecated: Use VikingSeasonRankResp.ProtoReflect.Descriptor instead. func (*VikingSeasonRankResp) Descriptor() ([]byte, []int) { - return file_viking_viking_msg_proto_rawDescGZIP(), []int{11} + return file_viking_viking_msg_proto_rawDescGZIP(), []int{14} } func (x *VikingSeasonRankResp) GetRanks() []*DBVikingSRank { @@ -746,30 +970,65 @@ var file_viking_viking_msg_proto_rawDesc = []byte{ 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, - 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, - 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, - 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, - 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, - 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, - 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, - 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, - 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, - 0x6b, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, - 0x6b, 0x52, 0x06, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x31, 0x0a, 0x13, 0x56, 0x69, 0x6b, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0a, 0x14, - 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x52, - 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xcc, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, + 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x28, 0x0a, 0x06, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x03, 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, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x77, 0x65, 0x65, 0x70, 0x6e, 0x75, + 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x77, 0x65, 0x65, 0x70, 0x6e, 0x75, + 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x6e, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x6e, 0x64, 0x12, + 0x1e, 0x0a, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, + 0x9c, 0x02, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, + 0x25, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, + 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, + 0x78, 0x70, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x56, 0x69, 0x6b, 0x69, 0x6e, + 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x48, 0x65, 0x72, + 0x6f, 0x65, 0x78, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x65, + 0x78, 0x70, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x65, 0x78, 0x70, 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, 0x22, 0x3d, + 0x0a, 0x0f, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x2a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x24, 0x0a, + 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, + 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x60, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, + 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x61, + 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, + 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, + 0x25, 0x0a, 0x06, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x06, + 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x31, 0x0a, 0x13, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, + 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, + 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0a, 0x14, 0x56, 0x69, 0x6b, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x52, 0x61, 0x6e, 0x6b, + 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -784,7 +1043,7 @@ func file_viking_viking_msg_proto_rawDescGZIP() []byte { return file_viking_viking_msg_proto_rawDescData } -var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_viking_viking_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_viking_viking_msg_proto_goTypes = []interface{}{ (*VikingGetListReq)(nil), // 0: VikingGetListReq (*VikingGetListResp)(nil), // 1: VikingGetListResp @@ -792,38 +1051,48 @@ var file_viking_viking_msg_proto_goTypes = []interface{}{ (*VikingChallengeResp)(nil), // 3: VikingChallengeResp (*VikingChallengeOverReq)(nil), // 4: VikingChallengeOverReq (*VikingChallengeOverResp)(nil), // 5: VikingChallengeOverResp - (*VikingBuyReq)(nil), // 6: VikingBuyReq - (*VikingBuyResp)(nil), // 7: VikingBuyResp - (*VikingRankListReq)(nil), // 8: VikingRankListReq - (*VikingRankListResp)(nil), // 9: VikingRankListResp - (*VikingSeasonRankReq)(nil), // 10: VikingSeasonRankReq - (*VikingSeasonRankResp)(nil), // 11: VikingSeasonRankResp - nil, // 12: VikingChallengeOverResp.HeroexpEntry - (*DBViking)(nil), // 13: DBViking - (*BattleFormation)(nil), // 14: BattleFormation - (*BattleInfo)(nil), // 15: BattleInfo - (*BattleReport)(nil), // 16: BattleReport - (*UserAtno)(nil), // 17: UserAtno - (*DBVikingRank)(nil), // 18: DBVikingRank - (*DBVikingSRank)(nil), // 19: DBVikingSRank + (*VikingSweepReq)(nil), // 6: VikingSweepReq + (*VikingSweepResult)(nil), // 7: VikingSweepResult + (*VikingSweepResp)(nil), // 8: VikingSweepResp + (*VikingBuyReq)(nil), // 9: VikingBuyReq + (*VikingBuyResp)(nil), // 10: VikingBuyResp + (*VikingRankListReq)(nil), // 11: VikingRankListReq + (*VikingRankListResp)(nil), // 12: VikingRankListResp + (*VikingSeasonRankReq)(nil), // 13: VikingSeasonRankReq + (*VikingSeasonRankResp)(nil), // 14: VikingSeasonRankResp + nil, // 15: VikingChallengeOverResp.HeroexpEntry + nil, // 16: VikingSweepResult.HeroexpEntry + (*DBViking)(nil), // 17: DBViking + (*BattleFormation)(nil), // 18: BattleFormation + (*BattleInfo)(nil), // 19: BattleInfo + (*BattleReport)(nil), // 20: BattleReport + (*UserAtno)(nil), // 21: UserAtno + (*UserAssets)(nil), // 22: UserAssets + (*DBVikingRank)(nil), // 23: DBVikingRank + (*DBVikingSRank)(nil), // 24: DBVikingSRank } var file_viking_viking_msg_proto_depIdxs = []int32{ - 13, // 0: VikingGetListResp.data:type_name -> DBViking - 14, // 1: VikingChallengeReq.battle:type_name -> BattleFormation - 15, // 2: VikingChallengeResp.info:type_name -> BattleInfo - 16, // 3: VikingChallengeOverReq.report:type_name -> BattleReport - 13, // 4: VikingChallengeOverResp.data:type_name -> DBViking - 17, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno - 12, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry - 13, // 7: VikingBuyResp.data:type_name -> DBViking - 18, // 8: VikingRankListResp.ranks:type_name -> DBVikingRank - 18, // 9: VikingRankListResp.franks:type_name -> DBVikingRank - 19, // 10: VikingSeasonRankResp.ranks:type_name -> DBVikingSRank - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 17, // 0: VikingGetListResp.data:type_name -> DBViking + 18, // 1: VikingChallengeReq.battle:type_name -> BattleFormation + 19, // 2: VikingChallengeResp.info:type_name -> BattleInfo + 20, // 3: VikingChallengeOverReq.report:type_name -> BattleReport + 17, // 4: VikingChallengeOverResp.data:type_name -> DBViking + 21, // 5: VikingChallengeOverResp.asset:type_name -> UserAtno + 15, // 6: VikingChallengeOverResp.heroexp:type_name -> VikingChallengeOverResp.HeroexpEntry + 18, // 7: VikingSweepReq.battle:type_name -> BattleFormation + 22, // 8: VikingSweepResult.consume:type_name -> UserAssets + 21, // 9: VikingSweepResult.award:type_name -> UserAtno + 16, // 10: VikingSweepResult.heroexp:type_name -> VikingSweepResult.HeroexpEntry + 7, // 11: VikingSweepResp.result:type_name -> VikingSweepResult + 17, // 12: VikingBuyResp.data:type_name -> DBViking + 23, // 13: VikingRankListResp.ranks:type_name -> DBVikingRank + 23, // 14: VikingRankListResp.franks:type_name -> DBVikingRank + 24, // 15: VikingSeasonRankResp.ranks:type_name -> DBVikingSRank + 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_viking_viking_msg_proto_init() } @@ -908,7 +1177,7 @@ func file_viking_viking_msg_proto_init() { } } file_viking_viking_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VikingBuyReq); i { + switch v := v.(*VikingSweepReq); i { case 0: return &v.state case 1: @@ -920,7 +1189,7 @@ func file_viking_viking_msg_proto_init() { } } file_viking_viking_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VikingBuyResp); i { + switch v := v.(*VikingSweepResult); i { case 0: return &v.state case 1: @@ -932,7 +1201,7 @@ func file_viking_viking_msg_proto_init() { } } file_viking_viking_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VikingRankListReq); i { + switch v := v.(*VikingSweepResp); i { case 0: return &v.state case 1: @@ -944,7 +1213,7 @@ func file_viking_viking_msg_proto_init() { } } file_viking_viking_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VikingRankListResp); i { + switch v := v.(*VikingBuyReq); i { case 0: return &v.state case 1: @@ -956,7 +1225,7 @@ func file_viking_viking_msg_proto_init() { } } file_viking_viking_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VikingSeasonRankReq); i { + switch v := v.(*VikingBuyResp); i { case 0: return &v.state case 1: @@ -968,6 +1237,42 @@ func file_viking_viking_msg_proto_init() { } } file_viking_viking_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VikingRankListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_viking_viking_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VikingRankListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_viking_viking_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VikingSeasonRankReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_viking_viking_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VikingSeasonRankResp); i { case 0: return &v.state @@ -986,7 +1291,7 @@ func file_viking_viking_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_viking_viking_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.BuzkashiMountData.go b/sys/configure/structs/Game.BuzkashiMountData.go index dab94cdce..0c43ed7d8 100644 --- a/sys/configure/structs/Game.BuzkashiMountData.go +++ b/sys/configure/structs/Game.BuzkashiMountData.go @@ -33,7 +33,7 @@ type GameBuzkashiMountData struct { Csubtime int32 Energyrecover int32 Maxenergy int32 - Offsetspeed float32 + Offsetspeed int32 } const TypeId_GameBuzkashiMountData = 1598069936 @@ -78,7 +78,7 @@ func (_v *GameBuzkashiMountData)Deserialize(_buf map[string]interface{}) (err er { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["csubtime"].(float64); !_ok_ { err = errors.New("csubtime error"); return }; _v.Csubtime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["energyrecover"].(float64); !_ok_ { err = errors.New("energyrecover error"); return }; _v.Energyrecover = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["maxenergy"].(float64); !_ok_ { err = errors.New("maxenergy error"); return }; _v.Maxenergy = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["offsetspeed"].(float64); !_ok_ { err = errors.New("offsetspeed error"); return }; _v.Offsetspeed = float32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["offsetspeed"].(float64); !_ok_ { err = errors.New("offsetspeed error"); return }; _v.Offsetspeed = int32(_tempNum_) } return } diff --git a/sys/configure/structs/Game.Sweep.go b/sys/configure/structs/Game.Sweep.go new file mode 100644 index 000000000..8a0404519 --- /dev/null +++ b/sys/configure/structs/Game.Sweep.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameSweep struct { + _dataMap map[int32]*GameSweepData + _dataList []*GameSweepData +} + +func NewGameSweep(_buf []map[string]interface{}) (*GameSweep, error) { + _dataList := make([]*GameSweepData, 0, len(_buf)) + dataMap := make(map[int32]*GameSweepData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameSweepData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameSweep{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameSweep) GetDataMap() map[int32]*GameSweepData { + return table._dataMap +} + +func (table *GameSweep) GetDataList() []*GameSweepData { + return table._dataList +} + +func (table *GameSweep) Get(key int32) *GameSweepData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.SweepData.go b/sys/configure/structs/Game.SweepData.go new file mode 100644 index 000000000..ff831c352 --- /dev/null +++ b/sys/configure/structs/Game.SweepData.go @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameSweepData struct { + Id int32 + Group int32 + Low int32 + Up int32 + WinCost []*Gameatn + LoseCost []*Gameatn + Desc string +} + +const TypeId_GameSweepData = -611450438 + +func (*GameSweepData) GetTypeId() int32 { + return -611450438 +} + +func (_v *GameSweepData)Deserialize(_buf map[string]interface{}) (err error) { + { 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["Group"].(float64); !_ok_ { err = errors.New("Group error"); return }; _v.Group = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Low"].(float64); !_ok_ { err = errors.New("Low error"); return }; _v.Low = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Up"].(float64); !_ok_ { err = errors.New("Up error"); return }; _v.Up = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["WinCost"].([]interface{}); !_ok_ { err = errors.New("WinCost error"); return } + + _v.WinCost = 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.WinCost = append(_v.WinCost, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["LoseCost"].([]interface{}); !_ok_ { err = errors.New("LoseCost error"); return } + + _v.LoseCost = 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.LoseCost = append(_v.LoseCost, _list_v_) + } + } + + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Desc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + return +} + +func DeserializeGameSweepData(_buf map[string]interface{}) (*GameSweepData, error) { + v := &GameSweepData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index aca39037a..e8627ca25 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -333,6 +333,7 @@ type Tables struct { Restore *GameRestore CatchbugSetstage *GameCatchbugSetstage BuzkashiCombo *GameBuzkashiCombo + Sweep *GameSweep } func NewTables(loader JsonLoader) (*Tables, error) { @@ -2272,5 +2273,11 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.BuzkashiCombo, err = NewGameBuzkashiCombo(buf) ; err != nil { return nil, err } + if buf, err = loader("game_sweep") ; err != nil { + return nil, err + } + if tables.Sweep, err = NewGameSweep(buf) ; err != nil { + return nil, err + } return tables, nil }