불가침, 종전 메시지

This commit is contained in:
2020-05-03 00:31:04 +09:00
parent 83e8cfc2cc
commit ce5ad89d5e
16 changed files with 477 additions and 98 deletions
-21
View File
@@ -294,27 +294,6 @@ class Diplomacy{
return $chk;
}
public function stopWar(){
$chk = $this->checkValidNation();
$chk = $this->checkInWar($chk);
[$result, $reason] = $chk;
if($result !== DiplomaticMessage::ACCEPTED){
return $chk;
}
$db = DB::db();
$db->update('diplomacy',[
'state'=>2,
'term'=>0
],
'(me=%i AND you=%i) OR (you=%i AND me=%i)',
$this->srcNation['nation'], $this->destNation['nation'],
$this->srcNation['nation'], $this->destNation['nation']);
return $chk;
}
public function acceptMerge(int $srcGeneral, int $destGeneral){
$chk = $this->checkValidNation();
$chk = $this->checkDiplomacyLimit($chk);