From b81c5a7a747c62127bc30cbe6ec3b951f4934224 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 18 Jul 2023 17:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E4=B8=80=E4=B8=AA=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E7=AD=89=E7=BA=A7=E7=9A=84=E8=8B=B1=E9=9B=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/module.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/hero/module.go b/modules/hero/module.go index 0ac2c5d5a..b4e7c279d 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -1035,6 +1035,12 @@ func (this *Hero) PassonHero(session comm.IUserSession, heroObjID map[string]boo return } +// 构建一个虚拟等级的英雄 func (this *Hero) GetVirtualHero(hero *pb.DBHero, lv int32) (vHero *pb.DBHero) { + if vHero == nil || lv <= 0 { + return nil + } + hero.Lv = lv + this.modelHero.PropertyCompute(hero) return hero }