feat: 군주/외교권자에게 부대명 변경 기능 부여

This commit is contained in:
2022-07-05 00:46:45 +09:00
parent f9a73be82b
commit 47366086d5
5 changed files with 122 additions and 56 deletions
-26
View File
@@ -53,32 +53,6 @@ if($action == '부대창설'){
]);
}
if($action == '부대변경'){
$name = StringUtil::neutralize($name);
if(!$name){
Json::die([
'result'=>false,
'reason'=>'부대 이름이 없습니다.'
]);
}
$db->update('troop', [
'name'=>$name
], 'troop_leader=%i',$generalID);
if($db->affectedRows() == 0){
Json::die([
'result'=>false,
'reason'=>'부대장이 아닙니다.'
]);
}
Json::die([
'result'=>true,
'reason'=>'success'
]);
}
if($action == '부대추방'){
if (!$gen){
Json::die([