diplomacy코드를 mailbox는 9000번대, diplomacy type만 지정하는 방식으로 변경
This commit is contained in:
@@ -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이 필수
|
||||
|
||||
+1
-8
@@ -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'));
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user