fix: 부대 이름 변경 오작동

This commit is contained in:
2024-09-23 13:43:35 +00:00
parent c117ada117
commit 61bdb8da01
+1 -2
View File
@@ -45,7 +45,6 @@ class SetTroopName extends \sammo\BaseAPI
$permission = checkSecretPermission($me->getRaw(), false);
$troopID = $this->args['troopID'];
$generalID = $me['no'];
if($generalID != $troopID && $permission < 4){
return "권한이 부족합니다.";
}
@@ -55,7 +54,7 @@ class SetTroopName extends \sammo\BaseAPI
return '부대 이름이 없습니다.';
}
$nationID = $me['nation'];
$nationID = $me->getNationID();
$db->update('troop', [
'name'=>$troopName
], 'troop_leader=%i AND `nation`=%i',$troopID, $nationID);