This commit is contained in:
meixiongfeng 2022-11-24 09:36:04 +08:00
parent 8f9f187086
commit 09d3d116af

View File

@ -65,7 +65,8 @@ func (this *Hero) Start() (err error) {
//创建单个叠加英雄 //创建单个叠加英雄
func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string, num int32, bPush bool) (hero *pb.DBHero, code pb.ErrorCode) { func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string, num int32, bPush bool) (hero *pb.DBHero, code pb.ErrorCode) {
_hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num) var err error
hero, err = this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
if err == nil { if err == nil {
go func(uid string, heroCfgId string) { // 携程处理 图鉴数据 go func(uid string, heroCfgId string) { // 携程处理 图鉴数据
if db.IsCross() { if db.IsCross() {
@ -109,7 +110,7 @@ func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string,
} }
if bPush { //推送 if bPush { //推送
session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}}) session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{hero}})
} }
return return
} }