1
This commit is contained in:
parent
e3b737e73a
commit
f268de1f1f
@ -69,6 +69,7 @@ CREATE TABLE `t_user` (
|
||||
`parachute` int(11) NOT NULL DEFAULT '0' COMMENT '降落伞ID',
|
||||
`ring_id` int(11) NOT NULL DEFAULT '0' COMMENT '戒指id',
|
||||
`star_num` int(11) NOT NULL DEFAULT '0' COMMENT '星星数(成长任务)',
|
||||
`already_newbie_battle` int(11) NOT NULL DEFAULT '0' COMMENT '是否完成新手战',
|
||||
PRIMARY KEY (`idx`),
|
||||
UNIQUE KEY `account_id` (`account_id`),
|
||||
UNIQUE KEY `address` (`address`),
|
||||
|
@ -19,6 +19,7 @@ require_once('mt/RankSeason.php');
|
||||
require_once('mt/Robot.php');
|
||||
require_once('mt/Skill.php');
|
||||
require_once('mt/MapMode.php');
|
||||
require_once('mt/Map.php');
|
||||
require_once('mt/Parameter.php');
|
||||
|
||||
use phpcommon\SqlHelper;
|
||||
@ -826,13 +827,30 @@ class BattleController extends BaseAuthedController {
|
||||
myself()->_rspErr(2, 'map mode error');
|
||||
return;
|
||||
}
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
if ($mapModeMeta['mapMode'] == mt\MapMode::PRACTICE_MODE) {
|
||||
if ($mapId == 2008) {
|
||||
$mapMeta = mt\Map::get($mapId);
|
||||
if (empty($mapMeta)) {
|
||||
myself()->_rspErr(2, 'map meta error');
|
||||
return;
|
||||
}
|
||||
$myUserDb = myself()->_getUserInfo(array(
|
||||
'already_newbie_battle'
|
||||
));
|
||||
if ($mapModeMeta['mapMode'] == mt\MapMode::PRACTICE_MODE) {
|
||||
if (!$mapMeta['is_moba']) {
|
||||
if (!$myUserDb['already_newbie_battle']) {
|
||||
$data['is_newbie_battle'] = 1;
|
||||
} else {
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
$data['is_newbie_battle'] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$myUserDb['already_newbie_battle']) {
|
||||
myself()->_updateUserInfo(array(
|
||||
'already_newbie_battle' => 1,
|
||||
));
|
||||
}
|
||||
if (!mt\MapMode::checkLimitTime($mapModeMeta)) {
|
||||
error_log(json_encode(array(
|
||||
'msg' => 'MapMode::CheckLimitTime error',
|
||||
|
Loading…
x
Reference in New Issue
Block a user