|
@@ -218,7 +218,7 @@ class HeroProc {
|
|
|
$totalEXP += $costItemConst->extraExp;
|
|
|
}
|
|
|
$totalEXP *= $costNumber; # 消耗N个道具
|
|
|
- self:: HeroAddEXP($huid, $totalEXP); # 获得经验
|
|
|
+ $targetHero = self:: HeroAddEXP($huid, $totalEXP); # 获得经验
|
|
|
$myPacketItems->$costItemId -= $costNumber; # 消耗道具
|
|
|
if ($myPacketItems->$costItemId < 0) {
|
|
|
$myPacketItems->$costItemId = 0;
|
|
@@ -1188,7 +1188,8 @@ class HeroProc {
|
|
|
break;
|
|
|
}
|
|
|
} // end while
|
|
|
- $collectHeros->$heroUID = $targetHero;
|
|
|
+ $collectHeros->$heroUID = $targetHero; # 更新英雄的数据
|
|
|
+ return $targetHero; # 将英雄对象返回
|
|
|
}
|
|
|
|
|
|
// </editor-fold>
|