From 5048a8831069634d931578fed014ed3563892161 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 18 Jul 2018 04:30:54 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=95=EB=B3=91=EC=B0=BD=20=EC=9A=B0?= =?UTF-8?q?=EC=84=A0=20=EB=B6=80=ED=99=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/processing.php | 9 +++++---- hwe/sammo/GameUnitConstBase.php | 1 + hwe/sammo/GameUnitDetail.php | 1 + hwe/templates/recruitCrewForm.php | 7 ++++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hwe/processing.php b/hwe/processing.php index 3cf135ae..ba8978c6 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -221,7 +221,7 @@ function command_11($turn, $command, bool $is모병 = false) { $leader = getGeneralLeadership($me, true, true, true); $maxCrew = $leader - Util::round($me['crew']/100); - $abil = getTechAbil($nation['tech']); + $abil = getTechAbil($tech); $armTypes = []; @@ -229,7 +229,7 @@ function command_11($turn, $command, bool $is모병 = false) { $armTypeCrews = []; foreach(GameUnitConst::byType($armType) as $unit){ - $crewObj = new stdClass; + $crewObj = new \stdClass; if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){ continue; //TODO: 불가능한 병종도 보여줄 필요가 있음. } @@ -244,7 +244,7 @@ function command_11($turn, $command, bool $is모병 = false) { } $crewObj->baseRice = $unit->rice * getTechCost($tech); - $crewObj->baseCost = CharCost($unit->getTechCost($tech), $me['personal']); + $crewObj->baseCost = CharCost(getTechCost($tech), $me['personal']); $armType = $unit->armType; if($me['special2'] == 50 && $armType == GameUnitConst::T_FOOTMAN){ @@ -275,7 +275,7 @@ function command_11($turn, $command, bool $is모병 = false) { $crewObj->img = ServConfig::$sharedIconPath."/default.jpg"; } else{ - $crewObj->img = ServConfig::$gameImagePath."/weap{$unit->id}.png"; + $crewObj->img = ServConfig::$gameImagePath."/weap".$unit->id.".png"; } $crewObj->baseRiceShort = round($crewObj->baseRice, 1); @@ -304,6 +304,7 @@ function command_11($turn, $command, bool $is모병 = false) { 'techLevelText'=>getTechCall($tech), 'tech'=>$tech, 'leader'=>$leader, + 'crewType'=>GameUnitConst::byId($me['crewtype'])->id, 'crewTypeName'=>GameUnitConst::byId($me['crewtype'])->name, 'crew'=>$me['crew'], 'maxCrew'=>$maxCrew, diff --git a/hwe/sammo/GameUnitConstBase.php b/hwe/sammo/GameUnitConstBase.php index 3b2e1937..4781141d 100644 --- a/hwe/sammo/GameUnitConstBase.php +++ b/hwe/sammo/GameUnitConstBase.php @@ -451,6 +451,7 @@ class GameUnitConstBase{ static::$constName = $constName; static::$constCity = $constCity; static::$constRegion = $constRegion; + static::$constType = $constType; } } \ No newline at end of file diff --git a/hwe/sammo/GameUnitDetail.php b/hwe/sammo/GameUnitDetail.php index 527cbd94..41463257 100644 --- a/hwe/sammo/GameUnitDetail.php +++ b/hwe/sammo/GameUnitDetail.php @@ -39,6 +39,7 @@ class GameUnitDetail{ array $defenceCoef, array $info ){ + $this->id = $id; $this->name = $name; $this->armType = $armType; $this->attack = $attack; diff --git a/hwe/templates/recruitCrewForm.php b/hwe/templates/recruitCrewForm.php index d35d55bd..75f07440 100644 --- a/hwe/templates/recruitCrewForm.php +++ b/hwe/templates/recruitCrewForm.php @@ -1,12 +1,12 @@