任务统计

This commit is contained in:
meixiongfeng 2024-01-02 14:09:21 +08:00
parent 51c0c21595
commit fdcd3ab3f9

View File

@ -100,6 +100,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
res = append(res, cfgHunting.Firstprize...) res = append(res, cfgHunting.Firstprize...)
for _, v := range cfgHunting.Firstprize { for _, v := range cfgHunting.Firstprize {
if v.A == "item" {
if _conf, err := this.module.configure.GetItemConfigureData(v.T); err == nil { if _conf, err := this.module.configure.GetItemConfigureData(v.T); err == nil {
if _conf.Usetype == comm.UseType8 { if _conf.Usetype == comm.UseType8 {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype154, v.N)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype154, v.N))
@ -107,6 +108,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
} }
} }
} }
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据 // 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
if hunting.BossTime[key] == 0 || hunting.BossTime[key] > req.Report.Costtime { if hunting.BossTime[key] == 0 || hunting.BossTime[key] > req.Report.Costtime {
hunting.BossTime[key] = req.Report.Costtime hunting.BossTime[key] = req.Report.Costtime
@ -204,19 +206,18 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
}() }()
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype80, 1, req.BossType, req.Difficulty)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype80, 1, req.BossType, req.Difficulty))
// 随机任务统计 // 随机任务统计
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype81, req.Difficulty, req.BossType)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype82, req.BossType)
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype81, req.Difficulty, req.BossType)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype81, req.Difficulty, req.BossType))
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype82, 1, req.BossType)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype82, 1, req.BossType))
// 狩猎副本掉落觉醒材料 // 狩猎副本掉落觉醒材料
for _, v := range reward { for _, v := range reward {
if v.A == "item" {
if _conf, err := this.module.configure.GetItemConfigureData(v.T); err == nil { if _conf, err := this.module.configure.GetItemConfigureData(v.T); err == nil {
if _conf.Usetype == comm.UseType8 { if _conf.Usetype == comm.UseType8 {
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype154, v.N)
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype154, v.N)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype154, v.N))
} }
} }
} }
}
if req.Auto { if req.Auto {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype172, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype172, 1))