共鸣查询接口补充

This commit is contained in:
meixiongfeng 2023-05-26 16:10:25 +08:00
parent f80668f79b
commit 06cf76081d
2 changed files with 16 additions and 0 deletions

View File

@ -117,6 +117,9 @@ type (
QueryCrossMultipleHeroinfo(oid []string) (hero []*pb.DBHero, err error) QueryCrossMultipleHeroinfo(oid []string) (hero []*pb.DBHero, err error)
AddHeroFetterAttribute(session IUserSession, attr map[string][]*cfg.Gameatr) AddHeroFetterAttribute(session IUserSession, attr map[string][]*cfg.Gameatr)
// 查询指定共鸣次数的英雄数量
QueryHeroTelnetByCount(uid string, count int) (hids []string)
} }
//玩家 //玩家

View File

@ -997,3 +997,16 @@ func (this *Hero) AddHeroFetterAttribute(session comm.IUserSession, attr map[str
} }
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: chanegCard}) 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
}