불가침 외교 커맨드 부활. 버그 수정

This commit is contained in:
2020-03-12 15:58:14 +09:00
parent 0fe8b3f671
commit 23089d2288
13 changed files with 440 additions and 88 deletions
+13 -3
View File
@@ -366,8 +366,18 @@ class Message
if($this->msgType === self::MSGTYPE_NATIONAL && $this->src->nationID !== $this->dest->nationID){
return $this->sendRaw($this->src->nationID + self::MAILBOX_NATIONAL);
}
if($this->msgType === self::MSGTYPE_DIPLOMACY && !key_exists('action', $this->msgOption)){
return $this->sendRaw($this->src->nationID + self::MAILBOX_NATIONAL);
if($this->msgType === self::MSGTYPE_DIPLOMACY){
if(key_exists('action', $this->msgOption)){
$tmp = $this->msgOption;
$this->msgOption = null;
$retVal = $this->sendRaw($this->src->nationID + self::MAILBOX_NATIONAL);
$this->msgOption = $tmp;
return $retVal;
}
else{
return $this->sendRaw($this->src->nationID + self::MAILBOX_NATIONAL);
}
}
return [0, 0];
}
@@ -411,7 +421,7 @@ class Message
public function send(bool $sendDestOnly=false):int{
[$receiverMailbox, $receiveID] = $this->sendToReceiver();
if(!$receiveID && !$sendDestOnly){
return $sendID;
throw new \RuntimeException('메시지 전송 불가');
}
$this->mailbox = $receiverMailbox;
$this->isInboxMail = true;