From 06cf76081d54f07ea6ac3c1faa6799652c6f0874 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 26 May 2023 16:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B1=E9=B8=A3=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 3 +++ modules/hero/module.go | 13 +++++++++++++ 2 files changed, 16 insertions(+) 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 +}