버그 수정

This commit is contained in:
2018-07-18 03:32:47 +09:00
parent 0f2625133f
commit 457f605898
5 changed files with 37 additions and 30 deletions
+8 -8
View File
@@ -43,19 +43,19 @@
/*체 지도*/ /*체 지도*/
.map_theme_che.map_spring .map_bglayer1{ .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{ .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{ .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{ .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{ .map_theme_che .map_bgroad{
@@ -64,19 +64,19 @@
/*미니체 지도*/ /*미니체 지도*/
.map_theme_miniche.map_spring .map_bglayer1{ .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{ .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{ .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{ .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{ .map_theme_miniche .map_bgroad{
-2
View File
@@ -350,7 +350,5 @@ class CityConstBase{
}, array_values(static::$constID)); }, array_values(static::$constID));
DB::db()->insert('city', $queries); DB::db()->insert('city', $queries);
return $cityPositions;
} }
} }
+27 -16
View File
@@ -365,6 +365,7 @@ class GameUnitConstBase{
$defence, $defence,
$speed, $speed,
$avoid, $avoid,
$magicCoef,
$cost, $cost,
$rice, $rice,
$reqTech, $reqTech,
@@ -384,15 +385,19 @@ class GameUnitConstBase{
$info[] = "기술력 {$reqTech} 이상 필요"; $info[] = "기술력 {$reqTech} 이상 필요";
} }
$reqCities = array_map(function($reqCity) use (&$info){ if($reqCities !== null){
$info[] = "{$reqCity} 소유시 가능"; $reqCities = array_map(function($reqCity) use (&$info){
return CityConst::byName($reqCity)->id; $info[] = "{$reqCity} 소유시 가능";
}, $reqCities); return CityConst::byName($reqCity)->id;
}, $reqCities);
}
$reqRegions = array_map(function($reqRegion) use (&$info){ if($reqRegions !== null){
$info[] = "{$reqRegion} 지역 소유시 가능"; $reqRegions = array_map(function($reqRegion) use (&$info){
return CityConst::$regionMap[$reqRegion]; $info[] = "{$reqRegion} 지역 소유시 가능";
}, $reqRegions); return CityConst::$regionMap[$reqRegion];
}, $reqRegions);
}
$unit = new GameUnitDetail( $unit = new GameUnitDetail(
$id, $id,
@@ -402,6 +407,7 @@ class GameUnitConstBase{
$defence, $defence,
$speed, $speed,
$avoid, $avoid,
$magicCoef,
$cost, $cost,
$rice, $rice,
$reqTech, $reqTech,
@@ -420,18 +426,23 @@ class GameUnitConstBase{
} }
$constType[$armType][] = $unit; $constType[$armType][] = $unit;
foreach($unit->reqCities as $reqCity){ if($unit->reqCities){
if(!key_exists($reqCity, $constCity)){ foreach($unit->reqCities as $reqCity){
$constCity[$reqCity] = []; if(!key_exists($reqCity, $constCity)){
$constCity[$reqCity] = [];
}
$constCity[$reqCity][] = $unit;
} }
$constCity[$reqCity][] = $unit;
} }
foreach($unit->reqRegions as $reqRegion){ if($unit->reqRegions){
if(!key_exists($reqRegion, $constRegion)){ foreach($unit->reqRegions as $reqRegion){
$constRegion[$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( Util::generateFileUsingSimpleTemplate(
__dir__.'/../templates/base_map.orig.js', __dir__.'/../templates/base_map.orig.js',
__dir__.'/../d_shared/base_map.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를 생성해주는 함수 * params에 맞도록 class를 생성해주는 함수
*/ */
public static function generatePHPClassFile(string $destFilePath, array $params, ?string $srcClassName=null, string $namespace='sammo'){ 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))) { if (!is_writable(dirname($destFilePath))) {
return 'destFilePath is not writable'; return 'destFilePath is not writable';
} }