합병 항복 안되는 버그 수정

This commit is contained in:
2018-04-17 03:10:38 +09:00
parent af0c470923
commit ec1be2c887
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -139,7 +139,7 @@ class DiplomaticMessage extends Message{
protected function acceptMerge(){ protected function acceptMerge(){
$helper = new Engine\Diplomacy($this->src->nationID, $this->dest->nationID); $helper = new Engine\Diplomacy($this->src->nationID, $this->dest->nationID);
$chk = $helper->acceptMerge(); $chk = $helper->acceptMerge($this->src->generalID, $this->dest->generalID);
if($chk[0] !== self::ACCEPTED){ if($chk[0] !== self::ACCEPTED){
return $chk; return $chk;
} }
@@ -175,7 +175,7 @@ class DiplomaticMessage extends Message{
protected function acceptSurrender(){ protected function acceptSurrender(){
$helper = new Engine\Diplomacy($this->src->nationID, $this->dest->nationID); $helper = new Engine\Diplomacy($this->src->nationID, $this->dest->nationID);
$chk = $helper->acceptSurrender(); $chk = $helper->acceptSurrender($this->src->generalID, $this->dest->generalID);
if($chk[0] !== self::ACCEPTED){ if($chk[0] !== self::ACCEPTED){
return $chk; return $chk;
} }
@@ -228,7 +228,7 @@ class DiplomaticMessage extends Message{
$this->dest->nationID $this->dest->nationID
); );
if(!$general){ if($general){
$this->dest->generalID = $receiverID; $this->dest->generalID = $receiverID;
$this->dest->generalName = $general['name']; $this->dest->generalName = $general['name'];
} }
+2 -2
View File
@@ -187,8 +187,8 @@ class Diplomacy{
$db = \sammo\DB::db(); $db = \sammo\DB::db();
$states = $db->queryOneField( $states = $db->queryFirstColumn(
'SELECT `state` FROM diplomacy WHERE me = %i AND you != %i AND `state` NOT IN (2, 7) GROUP BY `state` ORDER BY `state`', 'SELECT `state` FROM diplomacy WHERE `state` NOT IN (2, 7) AND me=%i AND you <>%i',
$this->srcNation['nation'], $this->srcNation['nation'],
$this->destNation['nation'] $this->destNation['nation']
); );