재야에서는 국메가 안보내지던 버그 수정

일반장이 국메를 보낼 수 없던 버그 수정
외교 서신 클래스 에러 수정
This commit is contained in:
2018-04-16 23:29:17 +09:00
parent 4b33461c70
commit 9b79d12521
8 changed files with 54 additions and 414 deletions
+6 -6
View File
@@ -67,7 +67,7 @@ class Message
$this->isInboxMail = true;
break;
}
if($mailbox > Message::MAILBOX_NATIONAL){
if($mailbox >= Message::MAILBOX_NATIONAL){
if($this->msgType === Message::MSGTYPE_DIPLOMACY){
$this->isInboxMail = true;
break;
@@ -150,7 +150,7 @@ class Message
$action = Util::array_get($option['action'], null);
if ($msgType === self::MSGTYPE_DIPLOMACY) {
$objMessage = new DiplomacticMessage(...$args);
$objMessage = new DiplomaticMessage(...$args);
} elseif ($action === 'scout') {
$objMessage = new ScoutMessage(...$args);
} else {
@@ -167,9 +167,6 @@ class Message
if ($mailbox > self::MAILBOX_PUBLIC) {
return false;
}
if ($mailbox == self::MAILBOX_NATIONAL) {
return false;
}
if ($mailbox <= 0) {
return false;
}
@@ -213,9 +210,12 @@ class Message
throw new \InvalidArgumentException('올바르지 않은 $msgType');
}
$date = (new \DateTime())->format('Y-m-d H:i:s');
$where = new \WhereClause('and');
$where->add('mailbox = %i', $mailbox);
$where->add('type = %s', $msgType);
$where->add('valid_until > %s', $date);
if ($fromSeq > 0) {
$where->add('id > %i', $fromSeq);
}
@@ -239,7 +239,7 @@ class Message
$src_id = $this->src->generalID;
$dest_id = self::MAILBOX_PUBLIC;
}
else if($mailbox > self::MAILBOX_NATIONAL){
else if($mailbox >= self::MAILBOX_NATIONAL){
$src_id = $this->src->nationID + self::MAILBOX_NATIONAL;
$dest_id = $this->dest->nationID + self::MAILBOX_NATIONAL;
}