loginGame()->setReadOnly(); $userID = Session::getUserID(); increaseRefresh("메인", 1); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); if (!$userID) { header('Location:..'); die(); } //턴 실행. TurnExecutionHelper::executeAllCommand(); if (!$session->isGameLoggedIn()) { header('Location:..'); die(); } $me = $db->queryFirstRow( 'SELECT no,con,turntime,newmsg,newvote,`officer_level` from general where owner = %i', $userID ); //그새 사망이면 if ($me === null) { $session->logoutGame(); header('Location: ../'); die(); } $gameStor->cacheAll(true); if ($me['newmsg'] == 1 || $me['newvote'] == 1) { $db->update('general', [ 'newmsg' => 0, 'newvote' => 0 ], 'owner=%i', $userID); } $plock = $db->queryFirstField('SELECT plock FROM plock LIMIT 1'); $con = checkLimit($me['con']); if ($con >= 2) { printLimitMsg($me['turntime']); exit(); } $generalObj = General::createGeneralObjFromDB($me['no']); $generalObj->setRawCity($db->queryFirstRow('SELECT * FROM city WHERE city = %i', $generalObj->getCityID())); $scenario = $gameStor->scenario_text; $nationID = $generalObj->getNationID(); if ($nationID) { $nationStor = KVStorage::getStorage($db, $nationID, 'nation_env'); $nationStor->cacheAll(); } if ($gameStor->extended_general == 0) { $extend = "표준"; } else { $extend = "확장"; } if ($gameStor->fiction == 0) { $fiction = "사실"; } else { $fiction = "가상"; } if ($gameStor->npcmode == 0) { $npcmode = "불가능"; } else if ($gameStor->npcmode == 1) { $npcmode = "가능"; } else { $npcmode = "선택 생성"; } $color = "cyan"; $mapTheme = $gameStor->map_theme; $serverName = UniqueConst::$serverName; $serverCnt = $gameStor->server_cnt; $auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction'); $myNationStatic = getNationStaticInfo($generalObj->getNationID()); $nationColorType = substr($myNationStatic['color'] ?? '#000000', 1); $autorunUser = ($gameStor->autorun_user) ?? []; $otherTextInfo = []; if ($gameStor->join_mode == 'onlyRandom') { $otherTextInfo[] = '랜덤 임관 전용'; } if ($autorunUser['limit_minutes'] ?? false) { $otherTextInfo[] = getAutorunInfo($autorunUser); } if (!$otherTextInfo) { $otherTextInfo = '표준'; } else { $otherTextInfo = join(', ', $otherTextInfo); } ?>