game2005api/webapp/controller/GunController.class.php
aozhiwei 555a63e576 1
2021-11-29 15:48:42 +08:00

59 lines
1.4 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);
}
}