Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-09-09 11:36:19 +08:00
commit 7b671c59b2
4 changed files with 20 additions and 5 deletions

View File

@ -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 {

View File

@ -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
}

View File

@ -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)
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据

View File

@ -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)
}