完善首战逻辑
This commit is contained in:
parent
1682efaaf4
commit
b9d8b539e0
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ config
|
||||
__pycache__/
|
||||
res
|
||||
out/
|
||||
public/
|
@ -79,6 +79,29 @@ class BaseAuthedController extends BaseController {
|
||||
return $r;
|
||||
}
|
||||
|
||||
protected function rspErr($errno, $errmsg)
|
||||
{
|
||||
echo json_encode(array(
|
||||
'errno' => $errno,
|
||||
'errmsg' => $errmsg
|
||||
));
|
||||
}
|
||||
|
||||
protected function rspOk()
|
||||
{
|
||||
echo json_encode(array(
|
||||
'errno' => 0,
|
||||
'errmsg' => ''
|
||||
));
|
||||
}
|
||||
|
||||
protected function rspData($data)
|
||||
{
|
||||
$data['errno'] = 0;
|
||||
$data['errmsg'] = '';
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
protected function isValidSex($sex)
|
||||
{
|
||||
return in_array($sex, array(0, 1, 2));
|
||||
|
@ -640,6 +640,20 @@ class RoleController extends BaseAuthedController {
|
||||
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||
return;
|
||||
}
|
||||
phpcommon\SqlHelerp::update
|
||||
($conn,
|
||||
'user',
|
||||
array(
|
||||
'accountid' => $account_id,
|
||||
),
|
||||
array(
|
||||
'first_fight' => function () {
|
||||
return '1';
|
||||
}
|
||||
)
|
||||
);
|
||||
$this->rspOk();
|
||||
/*
|
||||
$rank = $_REQUEST['rank']; //排名
|
||||
$kills = $_REQUEST['kills']; //击杀数
|
||||
$harm = $_REQUEST['harm']; //伤害
|
||||
@ -809,7 +823,7 @@ class RoleController extends BaseAuthedController {
|
||||
'errcode' => 0,
|
||||
'errmsg' => '',
|
||||
));
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
public function battleReport()
|
||||
|
Loading…
x
Reference in New Issue
Block a user