1
This commit is contained in:
parent
c63bacb4c9
commit
d84d06da81
@ -140,7 +140,7 @@ class HeroController extends BaseAuthedController {
|
||||
$heroUniId = getReqVal('hero_uniid', 0);
|
||||
$heroDb = Hero::find($heroUniId);
|
||||
if (!$heroDb) {
|
||||
$this->_rspErr(1, 'hero does not exist');
|
||||
$this->_rspErr(1, 'hero does not exist1');
|
||||
return;
|
||||
}
|
||||
$heroDto = Hero::toDto($heroDb);
|
||||
@ -164,7 +164,7 @@ class HeroController extends BaseAuthedController {
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$this->_rspErr(1, 'hero does not exist');
|
||||
$this->_rspErr(1, 'hero does not exist2');
|
||||
return;
|
||||
}
|
||||
$this->_setV(TN_HERO_LEVEL_UP, $idx, 0);
|
||||
|
@ -28,7 +28,9 @@ class HeroLevelAttr {
|
||||
)) {
|
||||
$val = self::getAttrValue($meta);
|
||||
if ($val > 0) {
|
||||
array_push(array(
|
||||
array_push(
|
||||
$newAttrs,
|
||||
array(
|
||||
'attr_id' => $meta['attr_id'],
|
||||
'type' => $meta['type'],
|
||||
'val' => $val,
|
||||
@ -37,7 +39,7 @@ class HeroLevelAttr {
|
||||
}
|
||||
}
|
||||
}
|
||||
AttrHelper::addRandAttrs($dbAttrs, $newAttrs);
|
||||
AttrHelper::mergeAttr($dbAttrs, $newAttrs);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -48,8 +50,8 @@ class HeroLevelAttr {
|
||||
$totalSpace = 0;
|
||||
foreach ($strs as $tmpStr) {
|
||||
$strs2 = explode(':', $tmpStr);
|
||||
if (count($str2) == 2) {
|
||||
$totalSpace += $str2[1];
|
||||
if (count($strs2) == 2) {
|
||||
$totalSpace += $strs2[1];
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,11 +60,11 @@ class HeroLevelAttr {
|
||||
$currSpace = 0;
|
||||
foreach ($strs as $tmpStr) {
|
||||
$strs2 = explode(':', $tmpStr);
|
||||
if (count($str2) == 2) {
|
||||
$currSpace += $str2[1];
|
||||
if (count($strs2) == 2) {
|
||||
$currSpace += $strs2[1];
|
||||
}
|
||||
if ($randSpace <= $currSpace) {
|
||||
return $str2[0];
|
||||
return $strs2[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user