This commit is contained in:
aozhiwei 2024-08-30 14:28:52 +08:00
parent e3b737e73a
commit f268de1f1f
2 changed files with 22 additions and 3 deletions

View File

@ -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`),

View File

@ -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',