From 1456fa9f8d66694da5def870862f501fbf3f8af0 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 27 Sep 2023 10:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BC=A0=E5=8A=9F=E5=A1=94?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/model_hero.go | 2 +- modules/passon/api_inroom.go | 2 +- modules/passon/module.go | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 503143a70..d6bdc5b4c 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -597,7 +597,7 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex tasks = append(tasks, comm.GetBuriedParam(comm.Rtype118, hero.Lv, hero.JuexingLv)) go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { - this.module.passon.HeroUpLv(session.Clone(), hero.HeroID, curLv) + this.module.passon.HeroUpLv(session, hero.HeroID, curLv) this.module.ModuleBuried.TriggerBuried(session, tasks...) }) } diff --git a/modules/passon/api_inroom.go b/modules/passon/api_inroom.go index ea9393e6c..cda330cf9 100644 --- a/modules/passon/api_inroom.go +++ b/modules/passon/api_inroom.go @@ -81,7 +81,7 @@ func (this *apiComp) InRoom(session comm.IUserSession, req *pb.PassonInRoomReq) errdata = &pb.ErrorData{ Code: pb.ErrorCode_ReqParameterError, Title: pb.ErrorCode_ReqParameterError.ToString(), - Message: fmt.Sprintf("hero lv greater or equal to Passonlv:%d", passon.Passonlv), + Message: fmt.Sprintf("hero lv greater Passonlv:%d", passon.Passonlv), } return } diff --git a/modules/passon/module.go b/modules/passon/module.go index 88a65384b..bb484b7e9 100644 --- a/modules/passon/module.go +++ b/modules/passon/module.go @@ -125,11 +125,6 @@ func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32) passon.Teacher[i] = heros[i].Id } - defer func() { - session.Push() - this.PutUserSession(session) - }() - if len(change) > 0 { if errdata = this.ModuleHero.PassonHero(session, change); errdata != nil { this.Errorln(errdata)