diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index a669024f..e94a2e65 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -4,6 +4,7 @@ require_once('models/Hero.php'); require_once('models/Gun.php'); require_once('models/Chip.php'); require_once('models/Bag.php'); +require_once('models/DynData.php'); require_once('models/BattleSettlement.php'); require_once('models/BattleHistory.php'); require_once('services/BattleDataService.php'); @@ -14,6 +15,7 @@ use phpcommon\SqlHelper; use models\Hero; use models\Gun; use models\Bag; +use models\DynData; use models\BattleHistory; use models\BattleSettlement; @@ -232,7 +234,7 @@ class BattleController extends BaseAuthedController { } { $info['match_mode'] = 0; - if ($currSeason && myself()->_getV(TN_RANK_STATUS, 0) == 0){ + if ($currSeason && DynData::getVEx($member['account_id'], TN_RANK_STATUS, 0) == 0){ $info['match_mode'] = 1; } } diff --git a/webapp/models/DynData.php b/webapp/models/DynData.php index 82e1e9d2..bb449d82 100644 --- a/webapp/models/DynData.php +++ b/webapp/models/DynData.php @@ -28,6 +28,20 @@ class DynData extends BaseModel { } } + public static function getVEx($accountId, $x, $y, $defVal = 0) + { + $row = SqlHelper::ormSelectOne( + myself()->_getMysql($accountId), + 't_dyndata', + array( + 'account_id' => $accountId, + 'x' => $x, + 'y' => $y, + ) + ); + return $row ? $row['val'] : $defVal; + } + public static function getV($x, $y, $defVal = 0) { $valData = self::internalGetV($x, $y, $defVal);