feat: HasRouteWithEnemy에서 "교전 중인 국가가 아닙니다" 추가
- 경로에 도달할 방법이 없는 것은 맞으나.. - 교전중이 아니라는 것에 의미가 있음
This commit is contained in:
@@ -35,6 +35,12 @@ class HasRouteWithEnemy extends Constraint{
|
||||
$allowedNationList[] = $this->general['nation'];
|
||||
$allowedNationList[] = 0;
|
||||
|
||||
$destCityNation = $db->queryFirstField('SELECT nation FROM city WHERE city = %i', $this->destCity['city']);
|
||||
if($destCityNation !== 0 && $destCityNation !== $this->general['nation'] && !in_array($destCityNation, $allowedNationList)){
|
||||
$this->reason = "교전중인 국가가 아닙니다.";
|
||||
return false;
|
||||
}
|
||||
|
||||
$distanceList = \sammo\searchDistanceListToDest($this->general['city'], $this->destCity['city'], $allowedNationList);
|
||||
if(!$distanceList){
|
||||
$this->reason = "경로에 도달할 방법이 없습니다.";
|
||||
|
||||
Reference in New Issue
Block a user