부대 번호를 부대장 ID로 변경

This commit is contained in:
2019-04-28 20:50:25 +09:00
parent e21fbaff83
commit 6423c22cf8
12 changed files with 49 additions and 77 deletions
+3 -5
View File
@@ -265,17 +265,15 @@ class General implements iAction{
], 'gen3=%i', $generalID);
// 부대 처리
$troopID = $this->getVar('troop');
$troopLeaderID = $db->queryFirstField('SELECT `no` FROM troop WHERE troop=%i', $troopID);
$troopLeaderID = $this->getVar('troop');
if($troopLeaderID == $generalID){
//부대장일 경우
// 모두 탈퇴
$db->update('general', [
'troop'=>0
], 'troop=%i', $troopID);
], 'troop_leader=%i', $troopLeaderID);
// 부대 삭제
$db->delete('troop', 'troop=%i', $troopID);
$db->delete('troop', 'troop_leader=%i', $troopLeaderID);
}
$dyingMessage = new TextDecoration\DyingMessage($this->getName(), $this->getVar('npc'));