장수 수 적용 관련 변경

This commit is contained in:
2020-05-09 23:09:36 +09:00
parent 8eb2380542
commit d083dc36b2
8 changed files with 43 additions and 12 deletions
+13
View File
@@ -167,6 +167,18 @@ function checkSupply()
}
}
function updateGeneralNumber(){
$db = DB::db();
foreach($db->queryAllLists('SELECT nation, count(*) FROM general WHERE npc != 5 GROUP BY nation') as [$nationID, $gennum]){
if($nationID === 0){
continue;
}
$db->update('nation', [
'gennum'=>$gennum
], 'nation=%i', $nationID);
}
refreshNationStaticInfo();
}
function updateYearly()
{
@@ -471,6 +483,7 @@ function postUpdateMonthly()
}
// 작위 업데이트
updateNationState();
updateGeneralNumber();
refreshNationStaticInfo();
// 천통여부 검사
checkEmperior();