Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
7b671c59b2
@ -69,7 +69,7 @@ func (this *configureComp) Getequipsuit(id int32) (result *cfg.GameEquipSuitData
|
|||||||
v interface{}
|
v interface{}
|
||||||
ok bool
|
ok bool
|
||||||
)
|
)
|
||||||
if v, err = this.GetConfigure(game_monster); err != nil {
|
if v, err = this.GetConfigure(game_equipsuit); err != nil {
|
||||||
this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
} else {
|
} else {
|
||||||
if result, ok = v.(*cfg.GameEquipSuit).GetDataMap()[id]; !ok {
|
if result, ok = v.(*cfg.GameEquipSuit).GetDataMap()[id]; !ok {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
|
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
|
code = pb.ErrorCode_ReqParameterError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,17 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
mapData["Boss"] = viking.Boss
|
mapData["Boss"] = viking.Boss
|
||||||
// viking.ChallengeTime[req.BossType<<16+req.Difficulty] = 0 // todo 耗时
|
// viking.ChallengeTime[req.BossType<<16+req.Difficulty] = 0 // todo 耗时
|
||||||
// mapData["challengeTime"] = viking.ChallengeTime
|
// 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)
|
||||||
}
|
}
|
||||||
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
|
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ func (this *ModelRank) getVikingRankList(uid string) []*pb.DBVikingRank {
|
|||||||
return ranks
|
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())
|
ranks := this.getVikingRankList(session.GetUserId())
|
||||||
bfind := false
|
bfind := false
|
||||||
@ -79,6 +79,9 @@ func (this *ModelRank) updateVikingRankList(session comm.IUserSession, difficult
|
|||||||
mapRankData := make(map[string]interface{}, 0)
|
mapRankData := make(map[string]interface{}, 0)
|
||||||
mapRankData["difficulty"] = difficulty
|
mapRankData["difficulty"] = difficulty
|
||||||
mapRankData["bosstype"] = boosType
|
mapRankData["bosstype"] = boosType
|
||||||
|
mapRankData["Leadpos"] = Leadpos
|
||||||
|
mapRankData["line"] = line
|
||||||
|
mapRankData["costTime"] = 123
|
||||||
this.ChangeUserRank(session.GetUserId(), v.Id, mapRankData)
|
this.ChangeUserRank(session.GetUserId(), v.Id, mapRankData)
|
||||||
bfind = true
|
bfind = true
|
||||||
break
|
break
|
||||||
@ -94,7 +97,9 @@ func (this *ModelRank) updateVikingRankList(session comm.IUserSession, difficult
|
|||||||
Nickname: userinfo.Name,
|
Nickname: userinfo.Name,
|
||||||
Icon: "",
|
Icon: "",
|
||||||
Lv: userinfo.Lv,
|
Lv: userinfo.Lv,
|
||||||
CostTime: costTime, //
|
Leadpos: Leadpos,
|
||||||
|
Line: line,
|
||||||
|
CostTime: 12,
|
||||||
}
|
}
|
||||||
this.AddList(session.GetUserId(), new.Id, new)
|
this.AddList(session.GetUserId(), new.Id, new)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user