53 lines
1.3 KiB
PHP
53 lines
1.3 KiB
PHP
<?php
|
|
|
|
require_once('mt/Shop.php');
|
|
require_once('mt/GunTalentLv.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
|
|
));
|
|
}
|
|
|
|
}
|