버그 수정

This commit is contained in:
2020-04-19 18:48:56 +09:00
parent c611e98cf7
commit 8d41dead5d
11 changed files with 90 additions and 60 deletions
@@ -35,7 +35,10 @@ class che_군량매매 extends Command\GeneralCommand{
}
$buyRice = boolval($buyRice);
$amount = $this->arg['amount']??null;
if(!is_int($amount)){
if(is_float($amount)){
$amount = Util::toInt($amount);
}
else if(!is_int($amount)){
return false;
}
$amount = Util::valueFit($amount, 100, GameConst::$maxResourceActionAmount);
+4 -1
View File
@@ -43,7 +43,10 @@ class che_증여 extends Command\GeneralCommand{
$isGold = $this->arg['isGold'];
$amount = $this->arg['amount'];
$destGeneralID = $this->arg['destGeneralID'];
if(!is_int($amount)){
if(is_float($amount)){
$amount = Util::toInt($amount);
}
else if(!is_int($amount)){
return false;
}
$amount = Util::valueFit($amount, 100, GameConst::$maxResourceActionAmount);
+4 -1
View File
@@ -38,7 +38,10 @@ class che_헌납 extends Command\GeneralCommand{
}
$isGold = $this->arg['isGold'];
$amount = $this->arg['amount'];
if(!is_int($amount)){
if(is_float($amount)){
$amount = Util::toInt($amount);
}
else if(!is_int($amount)){
return false;
}
$amount = Util::valueFit($amount, 100, GameConst::$maxResourceActionAmount);