60 lines
1.5 KiB
PHP
60 lines
1.5 KiB
PHP
<?php
|
|
|
|
require_once('mt/GunTalentGrow.php');
|
|
require_once('mt/GunTalent.php');
|
|
|
|
require_once('models/GunSkin.php');
|
|
require_once('models/GunTalent.php');
|
|
|
|
use phpcommon\SqlHelper;
|
|
use models\GunSkin;
|
|
use models\GunTalent;
|
|
|
|
class GunController extends BaseAuthedController {
|
|
|
|
public function skinList()
|
|
{
|
|
$skinList = array();
|
|
SqlHelper::ormSelect(
|
|
$this->_getSelfMysql(),
|
|
't_gun_skin',
|
|
array(
|
|
'account_id' => $this->_getAccountId()
|
|
),
|
|
function ($row) use(&$skinList) {
|
|
array_push($skinList, GunSkin::toDto($row));
|
|
}
|
|
);
|
|
$this->_rspData(array(
|
|
'skin_list' => $skinList
|
|
));
|
|
}
|
|
|
|
public function talentList()
|
|
{
|
|
$talentList = array();
|
|
SqlHelper::ormSelect(
|
|
$this->_getSelfMysql(),
|
|
't_gun_talent',
|
|
array(
|
|
'account_id' => $this->_getAccountId()
|
|
),
|
|
function ($row) use(&$talentList) {
|
|
array_push($talentList, GunTalent::toDto($row));
|
|
}
|
|
);
|
|
$this->_rspData(array(
|
|
'talent_list' => $talentList
|
|
));
|
|
}
|
|
|
|
public function upgradeTalentLv()
|
|
{
|
|
$typeId = getReqVal('type_id', 0);
|
|
$talentId = getReqVal('talent_id', 0);
|
|
$talentDb = GunTalent::find($typeId, $talentId);
|
|
$currLv = isset($talentDb) ? $talentDb['talent_lv'] : 0;
|
|
}
|
|
|
|
}
|