diff --git a/modules/battle/configure.go b/modules/battle/configure.go index 3536f9cbc..f7a8c0f06 100644 --- a/modules/battle/configure.go +++ b/modules/battle/configure.go @@ -69,7 +69,7 @@ func (this *configureComp) Getequipsuit(id int32) (result *cfg.GameEquipSuitData v interface{} ok bool ) - if v, err = this.GetConfigure(game_monster); err != nil { + if v, err = this.GetConfigure(game_equipsuit); err != nil { this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameEquipSuit).GetDataMap()[id]; !ok { diff --git a/modules/mainline/api_challenge.go b/modules/mainline/api_challenge.go index fc94ab6e9..31e188dac 100644 --- a/modules/mainline/api_challenge.go +++ b/modules/mainline/api_challenge.go @@ -9,7 +9,7 @@ import ( //参数校验 func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) { - if req.MainlineId == 0 || req.ChapterObj == "" || req.Leadpos >= 5 || len(req.Teamids) == 5 || req.Leadpos < 0 { + if req.MainlineId == 0 || req.ChapterObj == "" || req.Leadpos >= 5 || len(req.Teamids) != 5 || req.Leadpos < 0 { code = pb.ErrorCode_ReqParameterError return } diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 4018e9419..47413ab4a 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -66,7 +66,17 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal mapData["Boss"] = viking.Boss // viking.ChallengeTime[req.BossType<<16+req.Difficulty] = 0 // todo 耗时 // mapData["challengeTime"] = viking.ChallengeTime - this.module.modulerank.updateVikingRankList(session, req.Difficulty, req.BossType, 100) + sz := make([]*pb.LineUp, 5) + for i, v := range req.Report.Info.Redflist[0].Team { + if v != nil { + sz[i] = &pb.LineUp{ + Cid: v.HeroID, + Star: v.Star, + Lv: v.Lv, + } + } + } + this.module.modulerank.updateVikingRankList(session, req.Difficulty, req.BossType, req.Report.Info.Redflist[0].Leadpos, sz) } // 耗时校验 当前战斗胜利时间消耗小于之前刷新数据 diff --git a/modules/viking/model_rank.go b/modules/viking/model_rank.go index 1058f0164..23eb239d1 100644 --- a/modules/viking/model_rank.go +++ b/modules/viking/model_rank.go @@ -70,7 +70,7 @@ func (this *ModelRank) getVikingRankList(uid string) []*pb.DBVikingRank { return ranks } -func (this *ModelRank) updateVikingRankList(session comm.IUserSession, difficulty int32, boosType int32, costTime int32) { +func (this *ModelRank) updateVikingRankList(session comm.IUserSession, difficulty int32, boosType int32, Leadpos int32, line []*pb.LineUp) { // 查询是不是更新数据 ranks := this.getVikingRankList(session.GetUserId()) bfind := false @@ -79,6 +79,9 @@ func (this *ModelRank) updateVikingRankList(session comm.IUserSession, difficult mapRankData := make(map[string]interface{}, 0) mapRankData["difficulty"] = difficulty mapRankData["bosstype"] = boosType + mapRankData["Leadpos"] = Leadpos + mapRankData["line"] = line + mapRankData["costTime"] = 123 this.ChangeUserRank(session.GetUserId(), v.Id, mapRankData) bfind = true break @@ -94,7 +97,9 @@ func (this *ModelRank) updateVikingRankList(session comm.IUserSession, difficult Nickname: userinfo.Name, Icon: "", Lv: userinfo.Lv, - CostTime: costTime, // + Leadpos: Leadpos, + Line: line, + CostTime: 12, } this.AddList(session.GetUserId(), new.Id, new) }