체결 메시지에도 년도 뜨도록 수정

This commit is contained in:
2018-04-18 21:46:26 +09:00
parent 9bcd18c42e
commit 0df1293139
+4 -1
View File
@@ -16,6 +16,7 @@ class DiplomaticMessage extends Message{
protected $diplomaticType = '';
protected $diplomacyName = '';
protected $diplomacyDetail = '';
protected $validDiplomacy = true;
public function __construct(
@@ -77,6 +78,8 @@ class DiplomaticMessage extends Message{
return [self::INVALID, '올바르지 않은 불가침 서신입니다.'];
}
$this->diplomacyDetail = "{$year}";
$helper = new Engine\Diplomacy($this->src->nationID, $this->dest->nationID);
$chk = $helper->noAggression($year, $option);
if($chk[0] !== self::ACCEPTED){
@@ -294,7 +297,7 @@ class DiplomaticMessage extends Message{
self::MSGTYPE_NATIONAL,
$this->dest,
$this->src,
"【외교】{$year}{$month}월: {$this->src->nationName}{$this->dest->nationName}에게 제안한 {$this->diplomacyName} 동의.",
"【외교】{$year}{$month}월: {$this->src->nationName}{$this->dest->nationName}에게 제안한 {$this->diplomacyDetail}{$this->diplomacyName} 동의.",
new \DateTime(),
new \DateTime('9999-12-31'),
[