From 3b382199fc90cc4fee28507bca3994df22556867 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 21 May 2018 22:51:03 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EC=85=8B=20=EC=8B=9C=20=EC=B5=9C?= =?UTF-8?q?=EB=8C=80=20=EC=8A=A4=ED=83=AF=20=EB=B3=B4=EC=97=AC=EC=A3=BC?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/j_install.php | 3 ++- hwe/j_server_basic_info.php | 3 ++- hwe/sammo/Scenario.php | 8 +++++++- js/entrance.js | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hwe/j_install.php b/hwe/j_install.php index 67a860a0..ea68f125 100644 --- a/hwe/j_install.php +++ b/hwe/j_install.php @@ -78,7 +78,8 @@ if($reserve_open){ 'extend'=>$extend, 'npcmode'=>$npcmode, 'show_img_level'=>$show_img_level, - 'tournament_trig'=>$tournament_trig + 'tournament_trig'=>$tournament_trig, + 'gameConf'=>$scenarioObj->getGameConf() ]), 'date'=>$reserve_open->format('Y-m-d H:i:s') ]); diff --git a/hwe/j_server_basic_info.php b/hwe/j_server_basic_info.php index 68ac79f2..b65928ce 100644 --- a/hwe/j_server_basic_info.php +++ b/hwe/j_server_basic_info.php @@ -38,7 +38,8 @@ if(file_exists(__dir__.'/.htaccess')){ 'turnterm'=>$options['turnterm'], 'fictionMode'=>($options['fiction']?'가상':'사실'), 'npcMode'=>($options['npcmode']?'가능':'불가'), - 'openDatetime'=>$reserved['date'] + 'openDatetime'=>$reserved['date'], + 'gameConf'=>$options['gameConf'] ], 'game'=>null, 'me'=>null diff --git a/hwe/sammo/Scenario.php b/hwe/sammo/Scenario.php index d79bec44..021989e1 100644 --- a/hwe/sammo/Scenario.php +++ b/hwe/sammo/Scenario.php @@ -27,6 +27,8 @@ class Scenario{ private $initOK = false; + private $gameConf = null; + private function initFull(){ if($this->initOK){ return; @@ -148,7 +150,10 @@ class Scenario{ }, Util::array_get($data['events'], [])); } - private function getGameConf(){ + public function getGameConf(){ + if($this->gameConf){ + return $this->gameConf; + } $defaultPath = self::SCENARIO_PATH."/default.json"; if(!file_exists($defaultPath)){ throw new \RuntimeException('기본 시나리오 설정 파일 없음!'); @@ -164,6 +169,7 @@ class Scenario{ ]; $this->gameConf = array_merge($stat); + return $this->gameConf; } public function __construct(int $scenarioIdx, bool $lazyInit = true){ diff --git a/js/entrance.js b/js/entrance.js index 6b1c734e..df6a6391 100644 --- a/js/entrance.js +++ b/js/entrance.js @@ -47,7 +47,7 @@ var serverReservedTemplate = "\ \ - 오픈 일시 : <%openDatetime%> -
\ <%scenarioName%> <%turnterm%>분 턴 서버
\ -(상성 설정:<%fictionMode%>), (빙의 여부:<%npcMode%>)\ +(상성 설정:<%fictionMode%>), (빙의 여부:<%npcMode%>), (최대 스탯:<%gameConf.statTotal%>)\ "; $(function(){