构建一个虚拟等级的英雄

This commit is contained in:
meixiongfeng 2023-07-18 17:28:33 +08:00
parent 23b0a66fd5
commit b81c5a7a74

View File

@ -1035,6 +1035,12 @@ func (this *Hero) PassonHero(session comm.IUserSession, heroObjID map[string]boo
return return
} }
// 构建一个虚拟等级的英雄
func (this *Hero) GetVirtualHero(hero *pb.DBHero, lv int32) (vHero *pb.DBHero) { 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 return hero
} }