빙의 선택 시 성격과 국가 표기

This commit is contained in:
2019-05-04 20:41:27 +09:00
parent 3267595bc5
commit 7d3ec1368f
2 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -90,9 +90,11 @@ if($token && !$refresh){
$candidates = [];
$weight = [];
foreach($db->query('SELECT `no`, `name`, leader, power, intel, imgsvr, picture, special, special2 FROM general WHERE npc=2') as $general){
foreach($db->query('SELECT `no`, `name`, leader, power, nation, personal, intel, imgsvr, picture, special, special2 FROM general WHERE npc=2') as $general){
$general['special'] = \sammo\SpecialityConst::DOMESTIC[$general['special']][0]??'-';
$general['special2'] = \sammo\SpecialityConst::WAR[$general['special2']][0]??'-';
$general['personal'] = getGenChar($general['personal']);
$general['nation'] = getNationStaticInfo($general['nation'])['name'];
$candidates[$general['no']] = $general + ['keepCnt'=>KEEP_CNT];
$allStat = $general['leader'] + $general['power'] + $general['intel'];
$weight[$general['no']] = pow($allStat, 1.5);