소비 금액 반올림

This commit is contained in:
2019-10-07 00:17:17 +09:00
parent ee029aac10
commit 2d0c3ef881
3 changed files with 5 additions and 2 deletions
@@ -79,7 +79,7 @@ class che_상업투자 extends Command\GeneralCommand{
public function getCost():array{
$develCost = $this->env['develcost'];
$reqGold = $this->generalObj->onCalcDomestic(static::$actionKey, 'cost', $develCost);
$reqGold = Util::round($this->generalObj->onCalcDomestic(static::$actionKey, 'cost', $develCost));
$reqRice = 0;
return [$reqGold, $reqRice];
@@ -58,7 +58,7 @@ class che_정착장려 extends Command\GeneralCommand{
public function getCost():array{
$develCost = $this->env['develcost'] * 2;
$reqGold = 0;
$reqRice = $this->generalObj->onCalcDomestic(static::$actionKey, 'cost', $develCost);
$reqRice = Util::round($this->generalObj->onCalcDomestic(static::$actionKey, 'cost', $develCost));
return [$reqGold, $reqRice];
}
+3
View File
@@ -119,6 +119,9 @@ class che_징병 extends Command\GeneralCommand{
$reqGold = $this->generalObj->onCalcDomestic('징병', 'cost', $reqGold, ['armType'=>$this->reqCrewType->armType]);
$reqGold *= static::$costOffset;
$reqRice = $this->reqCrew / 100;
$reqGold = Util::round($reqGold);
$reqRice = Util::round($reqRice);
return [$reqGold, $reqRice];
}