From 1d8f973d4826523fa699101050b8de9e01fb863e Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 9 Feb 2018 03:05:00 +0900 Subject: [PATCH] =?UTF-8?q?diplomacy=EC=BD=94=EB=93=9C=EB=A5=BC=20mailbox?= =?UTF-8?q?=EB=8A=94=209000=EB=B2=88=EB=8C=80,=20diplomacy=20type=EB=A7=8C?= =?UTF-8?q?=20=EC=A7=80=EC=A0=95=ED=95=98=EB=8A=94=20=EB=B0=A9=EC=8B=9D?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_message.php | 4 +++- twe/j_msgsubmit.php | 9 +-------- twe/schema.php | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/twe/func_message.php b/twe/func_message.php index 11c58d44..e8cbc588 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -138,7 +138,9 @@ function sendMessage($msgType, $src, $dest, $msg, $date = null, $msgOption = nul } else if($msgType === 'diplomacy'){ //NOTE:외교 서신의 경우 '동일한 내용'이 두번 가지 않으므로, 별도 처리가 필요함 - $dest['id'] = $dest['nation_id'] + 8000; + $src['id'] = $dest['nation_id'] + 9000; + $dest['id'] = $dest['nation_id'] + 9000; + $destMailbox = $dest['id']; } else{ //dest는 id, name이 필수 diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 3545e2e2..b28ac316 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -131,14 +131,7 @@ if($destMailbox == 9999) { } sendMessage('national', $src, $dest, $msg, $date); - -} elseif($destMailbox >= 8000){ - //외교 서신은 j_msgsubmit으로 보낼 수 없음. - returnJson([ - 'result' => false, - 'reason' => '존재하지 않는 유저입니다.', - 'redirect' => NULL - ]); + // 개인 메세지 } elseif($destMailbox > 0) { $last_msg = new DateTime(util::array_get($_SESSION['last_msg'], '0000-00-00')); diff --git a/twe/schema.php b/twe/schema.php index 7a764e65..ca2ebe36 100644 --- a/twe/schema.php +++ b/twe/schema.php @@ -534,7 +534,7 @@ $game_schema = " $message_schema = " CREATE TABLE `message` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `mailbox` INT(11) NOT NULL COMMENT '9999 == public, >= 9000 national, >= 8000 diplomacy', + `mailbox` INT(11) NOT NULL COMMENT '9999 == public, >= 9000 national', `type` ENUM('private','national','public','diplomacy') NOT NULL, `is_sender` BIT(1) NOT NULL, `src` INT(11) NOT NULL,