This commit is contained in:
aozhiwei 2022-06-10 19:24:42 +08:00
parent 9c8152c699
commit 456c8fd878

View File

@ -89,6 +89,41 @@ class HeroController extends BaseAuthedController {
public function getUpgradeLevelList()
{
$infos = array();
for ($i = 0; $i <= 1; ++$i) {
$heroUniId = $this->_setV(TN_HERO_LEVEL_UP, $i);
$info = null;
if ($heroUniId) {
$heroDb = Hero::find($heroUniId);
if ($heroDb) {
$heroDto = Hero::toDto($heroDb);
$info = array(
'info' => $heroDto,
'countdown' => 0
);
}
}
array_push($infos, $info);
}
$this->_rspData(array(
'infos' => $infos
));
}
public function getUpgradeQualityList()
{
$infos = array();
for ($i = 0; $i <= 1; ++$i) {
}
$this->_rspData(array(
'infos' => $infos
));
}
public function receive()
{
/*
$baseAttrs = mt\Hero::getHeroAttr($heroMeta);
mt\AttrHelper::mergeAttr($baseAttrs, Bag::getAttrs());
$attrs = emptyReplace(json_decode($heroDb['rand_attr'], true), array());
@ -113,14 +148,7 @@ class HeroController extends BaseAuthedController {
$this->_rspData(array(
'property_chg' => $propertyChgService->toDto(),
));
}
public function getUpgradeQualityList()
{
}
public function receive()
{
*/
}
public function upgradeLevel()
@ -129,6 +157,17 @@ class HeroController extends BaseAuthedController {
$heroUniId = getReqVal('hero_uniid', 0);
$slotId = getReqVal('slot_id', 0);
$heroDb = Hero::find($heroUniId);
if (!in_array($slotId, array(0, 1))) {
$this->_rspErr(1, 'slot_id parameter error');
return;
}
{
$srcHeroDb = Hero::find($this->_getV(TN_HERO_LEVEL_UP, $slotId));
if ($srcHeroDb) {
$this->_rspErr(1, 'slot_id parameter error');
return;
}
}
if (!$heroDb) {
$this->_rspErr(1, 'hero does not exist');
return;