diff --git a/comm/imodule.go b/comm/imodule.go index 9ba7678c6..87c545cdf 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -117,6 +117,9 @@ type ( QueryCrossMultipleHeroinfo(oid []string) (hero []*pb.DBHero, err error) AddHeroFetterAttribute(session IUserSession, attr map[string][]*cfg.Gameatr) + + // 查询指定共鸣次数的英雄数量 + QueryHeroTelnetByCount(uid string, count int) (hids []string) } //玩家 diff --git a/modules/hero/module.go b/modules/hero/module.go index 745730d16..54b4e21d0 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -997,3 +997,16 @@ func (this *Hero) AddHeroFetterAttribute(session comm.IUserSession, attr map[str } session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: chanegCard}) } + +func (this *Hero) QueryHeroTelnetByCount(uid string, count int) (hids []string) { + list, err := this.modelTalent.GetHerotalent(uid) + if err != nil { + return + } + for _, v := range list { + if len(v.Talent) >= count { + hids = append(hids, v.HeroId) + } + } + return +}