fix: ?? 연산자 우선순위

This commit is contained in:
2025-08-20 12:59:40 +00:00
parent 2b376b6aab
commit 4bb940c8c5
9 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ class Join extends \sammo\BaseAPI
$penalty = [];
foreach($penaltyInfo as $penaltyKey => $penaltyValue){
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
if(($penaltyValue['expire'] ?? 0) > TimeUtil::now()){
$penalty[$penaltyKey] = $penaltyValue['value'];
}
}
+1 -1
View File
@@ -162,7 +162,7 @@ class che_초토화 extends Command\NationCommand{
$aux = $this->nation['aux'];
if($destCity['level'] >= 8){
$aux[NationAuxKey::did_특성초토화->value] = $aux[NationAuxKey::did_특성초토화->value] ?? 0 + 1;
$aux[NationAuxKey::did_특성초토화->value] = ($aux[NationAuxKey::did_특성초토화->value] ?? 0) + 1;
}
$db->update('general', [
+1 -1
View File
@@ -50,7 +50,7 @@ class AllowJoinDestNation extends Constraint{
return false;
}
if(($this->general['npc']??2 < 2) && \str_starts_with($this->destNation['name'], 'ⓤ')){
if((($this->general['npc']??2) < 2) && \str_starts_with($this->destNation['name'], 'ⓤ')){
$this->reason = "유저장은 태수국에 임관할 수 없습니다.";
return false;
}