버그 수정

This commit is contained in:
2020-04-21 02:06:03 +09:00
parent 6b9157f1d4
commit 3c7bee32f8
13 changed files with 103 additions and 40 deletions
+6 -6
View File
@@ -44,13 +44,14 @@ class che_몰수 extends Command\NationCommand{
$isGold = $this->arg['isGold'];
$amount = $this->arg['amount'];
$destGeneralID = $this->arg['destGeneralID'];
if(is_float($amount)){
$amount = Util::toInt($amount);
}
else if(!is_int($amount)){
if(!is_numeric($amount)){
return false;
}
$amount = Util::round($amount, -2);
$amount = Util::valueFit($amount, 100, GameConst::$maxResourceActionAmount);
if($amount <= 0){
return false;
}
if(!is_bool($isGold)){
return false;
}
@@ -140,8 +141,7 @@ class che_몰수 extends Command\NationCommand{
$amount = Util::valueFit(
$amount,
0,
($destGeneral->getVar($resKey) -
($isGold?GameConst::$generalMinimumGold:GameConst::$generalMinimumRice))
$destGeneral->getVar($resKey)
);
$amountText = number_format($amount, 0);
+1 -1
View File
@@ -17,7 +17,7 @@ use function \sammo\{
getDomesticExpLevelBonus,
CriticalRatioDomestic,
CriticalScoreEx,
function cutTurn
cutTurn
};
use \sammo\Constraint\Constraint;
+5 -4
View File
@@ -41,13 +41,14 @@ class che_포상 extends Command\NationCommand{
$isGold = $this->arg['isGold'];
$amount = $this->arg['amount'];
$destGeneralID = $this->arg['destGeneralID'];
if(is_float($amount)){
$amount = Util::toInt($amount);
}
else if(!is_int($amount)){
if(!is_numeric($amount)){
return false;
}
$amount = Util::round($amount, -2);
$amount = Util::valueFit($amount, 100, GameConst::$maxResourceActionAmount);
if($amount <= 0){
return false;
}
if(!is_bool($isGold)){
return false;
}