func_map.php에서 연관배열을 일반 배열로 착각한 버그 수정

func_map.php에서 result를 설정하지 않은 버그 수정

main.php에서 지도를 제대로 불러오도록 수정

map.js에서 국가가 재야인 경우 국가 tooltip을 띄우지 않도록 수정

b_CurrentCity.php의 도시 정보 값을 get으로도 받을 수 있도록 변경
This commit is contained in:
2018-02-02 00:55:02 +09:00
parent 0841950366
commit 438511972e
5 changed files with 56 additions and 31 deletions
+13 -5
View File
@@ -54,13 +54,19 @@ function getWorldMap($req){
$db = getDB();
list($startYear, $year, $month) = $db->queryFirstRow('select `startyear`, `year`, `month` from `game` where `no`=1');
$game = $db->queryFirstRow('select `startyear`, `year`, `month` from `game` where `no` = 1');
$startYear = $game['startyear'];
$year = $game['year'];
$month = $game['month'];
if($generalID && ($req->showMe || $req->neutralView)){
list($myCity, $myNation)
= $db->queryFirstRow(
$city = $db->queryFirstRow(
'select `city`, `nation` from `general` where `user_id`=%i',
$generalID);
$myCity = $city['city'];
$myNation = $city['nation'];
if(!$req->showMe){
$myCity = null;
}
@@ -99,7 +105,8 @@ function getWorldMap($req){
$cityList = [];
foreach($db->query('select `city`, `level`, `state`, `nation`, `region`, `supply` from `city`') as $r){
$cityList[] = [$r['city'], $r['level'], $r['state'], $r['nation'], $r['region'], $r['supply']];
$cityList[] =
array_map('intval', [$r['city'], $r['level'], $r['state'], $r['nation'], $r['region'], $r['supply']]);
}
return [
@@ -111,6 +118,7 @@ function getWorldMap($req){
'spyList' => $spyList,
'shownByGeneralList' => $shownByGeneralList,
'myCity' => $myCity,
'myNation' => $myNation
'myNation' => $myNation,
'result' => true
];
}