버그 수정
This commit is contained in:
@@ -35,14 +35,14 @@ class che_군량매매 extends Command\GeneralCommand{
|
||||
}
|
||||
$buyRice = boolval($buyRice);
|
||||
$amount = $this->arg['amount']??null;
|
||||
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;
|
||||
}
|
||||
$this->arg = [
|
||||
'buyRice'=>$buyRice,
|
||||
'amount'=>$amount
|
||||
|
||||
@@ -43,13 +43,14 @@ class che_증여 extends Command\GeneralCommand{
|
||||
$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;
|
||||
}
|
||||
|
||||
@@ -38,12 +38,10 @@ class che_헌납 extends Command\GeneralCommand{
|
||||
}
|
||||
$isGold = $this->arg['isGold'];
|
||||
$amount = $this->arg['amount'];
|
||||
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(!is_bool($isGold)){
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user