触发任务

This commit is contained in:
meixiongfeng 2023-03-15 17:06:30 +08:00
parent ea02710279
commit deb6355d36
2 changed files with 6 additions and 7 deletions

View File

@ -75,7 +75,6 @@ func (this *ModelHero) initHeroSkill(hero *pb.DBHero) []*pb.SkillData {
}
skills := []*pb.SkillData{}
if heroCfg.Skill1 != 0 {
skills = append(skills, &pb.SkillData{SkillID: heroCfg.Skill1, SkillLv: 1})
}
@ -86,7 +85,6 @@ func (this *ModelHero) initHeroSkill(hero *pb.DBHero) []*pb.SkillData {
skills = append(skills, &pb.SkillData{SkillID: heroCfg.Skill3, SkillLv: 1})
}
hero.NormalSkill = skills
}
return nil

View File

@ -166,12 +166,14 @@ func (this *Hero) SendRdTask(session comm.IUserSession) {
equipmap[v.SuiteExtId][v.Suite2Star]++
}
}
var szTask []*comm.TaskParam
for k, v := range equipmap {
for k1, v1 := range v {
this.ModuleRtask.SendToRtask(session, comm.Rtype46, v1, k1, k)
szTask = append(szTask, comm.GettaskParam(comm.Rtype46, v1, k1, k))
//this.ModuleRtask.SendToRtask(session, comm.Rtype46, v1, k1, k)
}
}
go this.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
}
//英雄列表
@ -421,11 +423,10 @@ func (this *Hero) QueryCrossHeroinfo(oid string) (hero *pb.DBHero, err error) {
"_id": oid,
})
hero = &pb.DBHero{}
if err = sr.Decode(hero); err == nil {
return
} else {
if err = sr.Decode(hero); err != nil {
this.modelHero.moduleHero.Errorf("find hero error: %v", err)
}
return
}
} else { // 不是跨服就查本服 注意 这个接口是给跨服玩法调用 理论上这个分支是不会执行的
if res := this.modelHero.DB.FindOne(comm.TableHero, bson.M{