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,