1
This commit is contained in:
parent
9c8152c699
commit
456c8fd878
@ -89,6 +89,41 @@ class HeroController extends BaseAuthedController {
|
|||||||
|
|
||||||
public function getUpgradeLevelList()
|
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);
|
$baseAttrs = mt\Hero::getHeroAttr($heroMeta);
|
||||||
mt\AttrHelper::mergeAttr($baseAttrs, Bag::getAttrs());
|
mt\AttrHelper::mergeAttr($baseAttrs, Bag::getAttrs());
|
||||||
$attrs = emptyReplace(json_decode($heroDb['rand_attr'], true), array());
|
$attrs = emptyReplace(json_decode($heroDb['rand_attr'], true), array());
|
||||||
@ -113,14 +148,7 @@ class HeroController extends BaseAuthedController {
|
|||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'property_chg' => $propertyChgService->toDto(),
|
'property_chg' => $propertyChgService->toDto(),
|
||||||
));
|
));
|
||||||
}
|
*/
|
||||||
|
|
||||||
public function getUpgradeQualityList()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function receive()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function upgradeLevel()
|
public function upgradeLevel()
|
||||||
@ -129,6 +157,17 @@ class HeroController extends BaseAuthedController {
|
|||||||
$heroUniId = getReqVal('hero_uniid', 0);
|
$heroUniId = getReqVal('hero_uniid', 0);
|
||||||
$slotId = getReqVal('slot_id', 0);
|
$slotId = getReqVal('slot_id', 0);
|
||||||
$heroDb = Hero::find($heroUniId);
|
$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) {
|
if (!$heroDb) {
|
||||||
$this->_rspErr(1, 'hero does not exist');
|
$this->_rspErr(1, 'hero does not exist');
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user