setReadOnly(); $db = DB::db(); if (!$isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$availableGeneralCommand))) { die_redirect(); } if ($isChiefTurn && !in_array($commandType, Util::array_flatten(GameConst::$availableChiefCommand))) { die_redirect(); } $gameStor = KVStorage::getStorage($db, 'game_env')->turnOnCache(); $env = $gameStor->getAll(); $general = General::createGeneralObjFromDB($session->generalID); if (!$isChiefTurn) { $commandObj = buildGeneralCommandClass($commandType, $general, $env); } else { if ($general->getVar('officer_level') < 5) { die_redirect(); } $commandObj = buildNationCommandClass($commandType, $general, $env, new LastTurn()); } if ($commandObj->isArgValid()) { //인자가 필요없는 타입의 경우 processing에서 '전혀' 처리하지 않음! die_redirect(); } if (!$commandObj->hasPermissionToReserve()) { die_redirect(); } ?>