From 5703db8c2bcb43bb9418df99882a8eddb6fe70ff Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 5 May 2020 03:57:00 +0900 Subject: [PATCH] =?UTF-8?q?neutralize=20=EC=9D=BC=EB=B6=80=20=EB=A1=A4?= =?UTF-8?q?=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 과거의 나는 다 계획이 있었구나. --- hwe/j_board_article_add.php | 4 ++-- hwe/j_board_comment_add.php | 2 +- hwe/j_diplomacy_respond_letter.php | 2 +- hwe/j_diplomacy_send_letter.php | 4 ++-- hwe/j_msg_submit.php | 2 +- hwe/sammo/Command/General/che_거병.php | 3 +++ hwe/sammo/GeneralAI.php | 3 +++ 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/hwe/j_board_article_add.php b/hwe/j_board_article_add.php index 6e0c0c7e..4b4b3a89 100644 --- a/hwe/j_board_article_add.php +++ b/hwe/j_board_article_add.php @@ -34,8 +34,8 @@ if($title === null || $text === null){ ]); } -$title = StringUtil::neutralize($title); -$text = StringUtil::neutralize($text); +$title = trim($title); +$text = trim($text); if(!$title && !$text){ Json::die([ diff --git a/hwe/j_board_comment_add.php b/hwe/j_board_comment_add.php index 45820e66..12ada898 100644 --- a/hwe/j_board_comment_add.php +++ b/hwe/j_board_comment_add.php @@ -33,7 +33,7 @@ if($articleNo === null || $text === null){ ]); } -$text = StringUtil::neutralize($text); +$text = trim($text); if(!$text){ Json::die([ diff --git a/hwe/j_diplomacy_respond_letter.php b/hwe/j_diplomacy_respond_letter.php index 2784b543..27a11fc4 100644 --- a/hwe/j_diplomacy_respond_letter.php +++ b/hwe/j_diplomacy_respond_letter.php @@ -45,7 +45,7 @@ if ($permission < 4) { ]); } -$reason = StringUtil::neutralize($reason); +$reason = trim($reason); $letter = $db->queryFirstRow('SELECT * FROM ng_diplomacy WHERE no=%i AND dest_nation_id = %i AND state = \'proposed\'', $letterNo, $me['nation']); if(!$letter){ diff --git a/hwe/j_diplomacy_send_letter.php b/hwe/j_diplomacy_send_letter.php index 51ab2af8..ad987993 100644 --- a/hwe/j_diplomacy_send_letter.php +++ b/hwe/j_diplomacy_send_letter.php @@ -46,8 +46,8 @@ if($textBrief === null || $textDetail === null){ ]); } -$textBrief = StringUtil::neutralize($textBrief); -$textDetail = StringUtil::neutralize($textDetail); +$textBrief = trim($textBrief); +$textDetail = trim($textDetail); if(!$textBrief){ Json::die([ diff --git a/hwe/j_msg_submit.php b/hwe/j_msg_submit.php index d180b917..89e1d162 100644 --- a/hwe/j_msg_submit.php +++ b/hwe/j_msg_submit.php @@ -23,7 +23,7 @@ if(!$v->validate()){ } $mailbox = (int)$post['mailbox']; -$text = StringUtil::neutralize(StringUtil::cutStringForWidth($post['text'], 199, '')); +$text = trim(StringUtil::cutStringForWidth($post['text'], 199, '')); $session = Session::requireGameLogin([ 'msgID'=>null diff --git a/hwe/sammo/Command/General/che_거병.php b/hwe/sammo/Command/General/che_거병.php index 463a4d60..6fbe970a 100644 --- a/hwe/sammo/Command/General/che_거병.php +++ b/hwe/sammo/Command/General/che_거병.php @@ -89,6 +89,9 @@ class che_거병 extends Command\GeneralCommand{ } $secretlimit = 3; + if($env['scenario']>=1000){ + $secretlimit = 1; + } DB::db()->insert('nation', [ 'name'=>$nationName, diff --git a/hwe/sammo/GeneralAI.php b/hwe/sammo/GeneralAI.php index 3f0ca841..ec922c91 100644 --- a/hwe/sammo/GeneralAI.php +++ b/hwe/sammo/GeneralAI.php @@ -3424,6 +3424,7 @@ class GeneralAI $chief = $this->chiefGenerals[$chiefLevel]; if($chief->getVar('npc') < 2 && $chief->getVar('killturn') >= $minUserKillturn){ $userChiefCnt+=1; + $chief->setVar('permission', 'ambassador'); } } @@ -3453,6 +3454,7 @@ class GeneralAI $nextChiefs[11] = $general; $general->setVar('officer_level', 11); $general->setVar('officer_city', 0); + $general->setVar('permission', 'ambassador'); $nation['l11set'] = true; $updatedNationVar['l11set'] = 1; $userChiefCnt += 1; @@ -3536,6 +3538,7 @@ class GeneralAI if($newChief->getVar('npc') < 2){ $userChiefCnt += 1; + $newChief->setVar('permission', 'ambassador'); } $nextChiefs[$chiefLevel] = $newChief;