diff --git a/comm/imodule.go b/comm/imodule.go index 5556c1668..bd2c30167 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -175,7 +175,7 @@ type ( ModifyHeroFetterData(uid string, obj string, data map[string]interface{}) (code pb.ErrorCode) // 修改羁绊信息 QueryHeroFetter(uid string) (data []*pb.DBHeroFetter) // 查询所有的羁绊信息 //QueryOneHeroFetter(uid string, cid string) *pb.DBHeroFetter // 通过英雄配置id 查询羁绊信息 - AddHeroFetterData(session IUserSession, heroConfId ...string) (code pb.ErrorCode) // 创建一条羁绊信息 + AddHeroFetterData(uid string, heroConfId ...string) (code pb.ErrorCode) // 创建一条羁绊信息 } //月子秘境 IMoonFantasy interface { diff --git a/modules/hero/module.go b/modules/hero/module.go index 61124c448..ddd54c9bb 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -67,9 +67,9 @@ func (this *Hero) CreateHeroes(uid string, heroCfgId ...string) error { func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string, num int32, bPush bool) (code pb.ErrorCode) { _hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num) if err == nil { - this.moduleFetter.AddHeroFetterData(session, heroCfgId) - go func(uid string, heroCfgId string) { // 携程处理 图鉴数据 + go func(uid string, heroCfgId string) { // 携程处理 图鉴数据 + this.moduleFetter.AddHeroFetterData(uid, heroCfgId) if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil { initUpdate := map[string]interface{}{} sz := result.GetTujian() diff --git a/modules/library/module.go b/modules/library/module.go index 45688acce..4df7c9207 100644 --- a/modules/library/module.go +++ b/modules/library/module.go @@ -135,8 +135,7 @@ func (this *Library) QueryOneHeroFetter(uid string, cid string) *pb.DBHeroFetter } // 创建一条羁绊信息 -func (this *Library) AddHeroFetterData(session comm.IUserSession, heroConfId string) (code pb.ErrorCode) { - uid := session.GetUserId() +func (this *Library) AddHeroFetterData(uid string, heroConfId string) (code pb.ErrorCode) { // 推送 rsp := &pb.LibraryChangePush{} _data := this.QueryOneHeroFetter(uid, heroConfId) @@ -176,7 +175,6 @@ func (this *Library) AddHeroFetterData(session comm.IUserSession, heroConfId str rsp.Data = append(rsp.Data, obj) } this.SendMsgToUser(string(this.GetType()), LibraryChangePush, rsp, uid) - //session.SendMsg(string(this.GetType()), LibraryChangePush, rsp) } }