버그 수정

This commit is contained in:
2018-07-18 03:32:47 +09:00
parent 62520fb7fe
commit 403d914193
5 changed files with 37 additions and 30 deletions
+8 -8
View File
@@ -43,19 +43,19 @@
/*체 지도*/
.map_theme_che.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_spring.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
}
.map_theme_che.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_summer.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
}
.map_theme_che.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_fall.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
}
.map_theme_che.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_winter.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
}
.map_theme_che .map_bgroad{
@@ -64,19 +64,19 @@
/*미니체 지도*/
.map_theme_miniche.map_spring .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_spring.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_spring.jpg') no-repeat;
}
.map_theme_miniche.map_summer .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_summer.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_summer.jpg') no-repeat;
}
.map_theme_miniche.map_fall .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_fall.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_fall.jpg') no-repeat;
}
.map_theme_miniche.map_winter .map_bglayer1{
background: url('_tK_gameImagePath_/map/che/map_winter.jpg') no-repeat;
background: url('_tK_gameImagePath_/map/che/bg_winter.jpg') no-repeat;
}
.map_theme_miniche .map_bgroad{
-2
View File
@@ -350,7 +350,5 @@ class CityConstBase{
}, array_values(static::$constID));
DB::db()->insert('city', $queries);
return $cityPositions;
}
}
+27 -16
View File
@@ -365,6 +365,7 @@ class GameUnitConstBase{
$defence,
$speed,
$avoid,
$magicCoef,
$cost,
$rice,
$reqTech,
@@ -384,15 +385,19 @@ class GameUnitConstBase{
$info[] = "기술력 {$reqTech} 이상 필요";
}
$reqCities = array_map(function($reqCity) use (&$info){
$info[] = "{$reqCity} 소유시 가능";
return CityConst::byName($reqCity)->id;
}, $reqCities);
if($reqCities !== null){
$reqCities = array_map(function($reqCity) use (&$info){
$info[] = "{$reqCity} 소유시 가능";
return CityConst::byName($reqCity)->id;
}, $reqCities);
}
$reqRegions = array_map(function($reqRegion) use (&$info){
$info[] = "{$reqRegion} 지역 소유시 가능";
return CityConst::$regionMap[$reqRegion];
}, $reqRegions);
if($reqRegions !== null){
$reqRegions = array_map(function($reqRegion) use (&$info){
$info[] = "{$reqRegion} 지역 소유시 가능";
return CityConst::$regionMap[$reqRegion];
}, $reqRegions);
}
$unit = new GameUnitDetail(
$id,
@@ -402,6 +407,7 @@ class GameUnitConstBase{
$defence,
$speed,
$avoid,
$magicCoef,
$cost,
$rice,
$reqTech,
@@ -420,18 +426,23 @@ class GameUnitConstBase{
}
$constType[$armType][] = $unit;
foreach($unit->reqCities as $reqCity){
if(!key_exists($reqCity, $constCity)){
$constCity[$reqCity] = [];
if($unit->reqCities){
foreach($unit->reqCities as $reqCity){
if(!key_exists($reqCity, $constCity)){
$constCity[$reqCity] = [];
}
$constCity[$reqCity][] = $unit;
}
$constCity[$reqCity][] = $unit;
}
foreach($unit->reqRegions as $reqRegion){
if(!key_exists($reqRegion, $constRegion)){
$constRegion[$reqRegion] = [];
if($unit->reqRegions){
foreach($unit->reqRegions as $reqRegion){
if(!key_exists($reqRegion, $constRegion)){
$constRegion[$reqRegion] = [];
}
$constRegion[$reqRegion][] = $unit;
}
$constRegion[$reqRegion][] = $unit;
}
}
+2 -1
View File
@@ -154,7 +154,8 @@ class ResetHelper{
Util::generateFileUsingSimpleTemplate(
__dir__.'/../templates/base_map.orig.js',
__dir__.'/../d_shared/base_map.js',
['cityPosition'=>Json::encode($cityPositions)]
['cityPosition'=>Json::encode($cityPositions)],
true
);
-3
View File
@@ -132,9 +132,6 @@ class Util extends \utilphp\util
* params에 맞도록 class를 생성해주는 함수
*/
public static function generatePHPClassFile(string $destFilePath, array $params, ?string $srcClassName=null, string $namespace='sammo'){
if ($destFilePath === $srcFilePath) {
return 'invalid destFilePath';
}
if (!is_writable(dirname($destFilePath))) {
return 'destFilePath is not writable';
}