지도에 필요한 데이터를 얻어오는 과정의 버그 수정

This commit is contained in:
2018-04-06 03:30:44 +09:00
parent 11a9985543
commit 56e6692817
+4 -3
View File
@@ -50,7 +50,8 @@ function getWorldMap($req){
return getHistoryMap($req->year, $req->month); return getHistoryMap($req->year, $req->month);
} }
$generalID = Session::Instance()->generalID; $session = Session::Instance();
$generalID = $session->generalID;
$db = DB::db(); $db = DB::db();
@@ -59,7 +60,7 @@ function getWorldMap($req){
$year = Util::toInt($game['year']); $year = Util::toInt($game['year']);
$month = Util::toInt($game['month']); $month = Util::toInt($game['month']);
if($generalID && ($req->showMe || $req->neutralView)){ if($generalID && ($req->showMe || !$req->neutralView)){
$city = $db->queryFirstRow( $city = $db->queryFirstRow(
'select `city`, `nation` from `general` where `no`=%i', 'select `city`, `nation` from `general` where `no`=%i',
$generalID); $generalID);
@@ -70,7 +71,7 @@ function getWorldMap($req){
if(!$req->showMe){ if(!$req->showMe){
$myCity = null; $myCity = null;
} }
if(!$req->neutralView){ if($req->neutralView){
$myNation = null; $myNation = null;
} }
} }