From ea02710279db3c8a0e39d7c00d1aca89d35ca083 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 15 Mar 2023 15:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=B3=A8=E5=86=8C=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/module.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/hero/module.go b/modules/hero/module.go index 5f16f59f8..0efb2818b 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -842,10 +842,11 @@ func (this *Hero) InRange(heroRecord *pb.DBHeroRecord, strPool []string, update func (this *Hero) RegisterInstructor(session comm.IUserSession, heroOid string, fulllvenr int32) (code pb.ErrorCode) { var ( - _hero *pb.DBHero - model *db.DBModel - err error - _heroMap map[string]interface{} + _hero *pb.DBHero + model *db.DBModel + err error + _heroMap map[string]interface{} + _changeHero []*pb.DBHero // 变化的英雄 ) if this.IsCross() { _hero = &pb.DBHero{} @@ -892,6 +893,8 @@ func (this *Hero) RegisterInstructor(session comm.IUserSession, heroOid string, return } } + _changeHero = append(_changeHero, _hero) + session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: _changeHero}) return }