From 27cdd3ee4b3a4e4e5e28a3a3cf58ba0f7e8a47c6 Mon Sep 17 00:00:00 2001 From: Hide_D Date: Sat, 16 Jul 2022 15:56:39 +0900 Subject: [PATCH] =?UTF-8?q?misc:=20=EA=B5=AC=20=EA=B0=90=EC=B0=B0=EB=B6=80?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .phan/config.php | 1 - hwe/b_battleCenter.php | 208 ----------------------------------------- 2 files changed, 209 deletions(-) delete mode 100644 hwe/b_battleCenter.php diff --git a/.phan/config.php b/.phan/config.php index e14e398c..4624a3b4 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -45,7 +45,6 @@ return [ 'hwe/api.php', 'hwe/a_traffic.php', 'hwe/battle_simulator.php', - 'hwe/b_battleCenter.php', 'hwe/b_betting.php', 'hwe/v_chiefCenter.php', 'hwe/b_currentCity.php', diff --git a/hwe/b_battleCenter.php b/hwe/b_battleCenter.php deleted file mode 100644 index 1f052fde..00000000 --- a/hwe/b_battleCenter.php +++ /dev/null @@ -1,208 +0,0 @@ -rule('required', 'gen') - ->rule('integer', 'gen'); - -$btn = Util::getReq('btn'); -$gen = Util::getReq('gen', 'int', 0); -$reqQueryType = Util::getReq('query_type', 'string', null); - -// $queryTypeText, $reqArgType(0=>None, 1=>AdditionalColumn, 2=>rankVal, 3=>aux), $comp -$queryMap = [ - 'turntime' => ['최근턴', 0, function ($lhs, $rhs) { - return - ($lhs['turntime'] <=> $rhs['turntime']); - }], - 'recent_war' => ['최근전투', 1, function ($lhs, $rhs) { - return - ($lhs['recent_war'] <=> $rhs['recent_war']); - }], - 'name' => ['장수명', 0, function ($lhs, $rhs) { - if ($lhs['npc'] !== $rhs['npc']) { - return $lhs['npc'] <=> $rhs['npc']; - } - return $lhs['name'] <=> $rhs['name']; - }], - 'warnum' => ['전투수', 2, function ($lhs, $rhs) { - return - ($lhs['warnum'] <=> $rhs['warnum']); - }] -]; - -if ($reqQueryType === null || !key_exists($reqQueryType, $queryMap)) { - $reqQueryType = Util::array_first_key($queryMap); -} - - -//로그인 검사 -$session = Session::requireGameLogin()->setReadOnly(); -$userID = Session::getUserID(); - -$db = DB::db(); -$gameStor = KVStorage::getStorage($db, 'game_env'); - -increaseRefresh("감찰부", 2); -//전투 추진을 위해 갱신 -TurnExecutionHelper::executeAllCommand(); -$gameStor->resetCache(); - -$testGeneralNationID = $db->queryFirstField('SELECT nation FROM general WHERE no = %i', $gen); - -$me = $db->queryFirstRow('SELECT no,nation,officer_level,con,turntime,belong,permission,penalty from general where owner=%i', $userID); -$nationID = $me['nation']; - -$con = checkLimit($me['con']); -if ($con >= 2) { - printLimitMsg($me['turntime']); - exit(); -} - -$permission = checkSecretPermission($me); -if ($permission < 0) { - echo '국가에 소속되어있지 않습니다.'; - die(); -} else if ($permission < 1) { - echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; - die(); -} - -//잘못된 접근 -if ($testGeneralNationID != $nationID) { - $gen = 0; -} - -if ($btn == '정렬') { - $gen = 0; -} - - -[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType]; -if ($reqArgType === 0) { - $generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID); -} else if ($reqArgType === 1) { - $generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID); -} else if ($reqArgType === 2) { - $generalBasicList = $db->query( - 'SELECT no, name, npc, turntime, officer_level, value as %b - FROM general LEFT JOIN rank_data - ON general.no = rank_data.general_id - WHERE rank_data.type = %s AND general.nation = %i', - $reqQueryType, - $reqQueryType, - $nationID - ); -} else if ($reqArgType === 3) { - $generalBasicList = array_map(function ($arr) { - $arr['aux'] = Json::decode($arr['aux']); - return $arr; - }, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID)); -} else { - throw new \sammo\MustNotBeReachedException(); -} - - -usort($generalBasicList, $comp); - -if (!$gen) { - $gen = $generalBasicList[0]['no']; -} -$showGeneral = General::createGeneralObjFromDB($gen); -?> - - - - - <?= UniqueConst::$serverName ?>: 감찰부 - - - - - - - - - - -
-
-
감 찰 부
-
-
-
-
- 정렬순서 : - - - 대상장수 : - - -
-
-
-
-
장수 정보
-
-
-
-
-
- -
-
-
장수 열전
-
-
-
-
-
- -
-
-
전투 기록
-
-
-
-
-
- -
-
-
전투 결과
-
-
-
-
-
- - getNPCType() > 1 || $permission >= 2) : ?> -
-
-
개인 기록
-
-
-
-
-
- -
-
-
-
-
-
-
-
- - - \ No newline at end of file