fix: 부대 이름 변경 오작동
This commit is contained in:
@@ -45,7 +45,6 @@ class SetTroopName extends \sammo\BaseAPI
|
|||||||
$permission = checkSecretPermission($me->getRaw(), false);
|
$permission = checkSecretPermission($me->getRaw(), false);
|
||||||
$troopID = $this->args['troopID'];
|
$troopID = $this->args['troopID'];
|
||||||
|
|
||||||
$generalID = $me['no'];
|
|
||||||
if($generalID != $troopID && $permission < 4){
|
if($generalID != $troopID && $permission < 4){
|
||||||
return "권한이 부족합니다.";
|
return "권한이 부족합니다.";
|
||||||
}
|
}
|
||||||
@@ -55,7 +54,7 @@ class SetTroopName extends \sammo\BaseAPI
|
|||||||
return '부대 이름이 없습니다.';
|
return '부대 이름이 없습니다.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$nationID = $me['nation'];
|
$nationID = $me->getNationID();
|
||||||
$db->update('troop', [
|
$db->update('troop', [
|
||||||
'name'=>$troopName
|
'name'=>$troopName
|
||||||
], 'troop_leader=%i AND `nation`=%i',$troopID, $nationID);
|
], 'troop_leader=%i AND `nation`=%i',$troopID, $nationID);
|
||||||
|
|||||||
Reference in New Issue
Block a user