버그 수정
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -44,7 +44,10 @@ class che_몰수 extends Command\NationCommand{
|
||||
$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);
|
||||
|
||||
@@ -170,12 +170,12 @@ class che_증축 extends Command\NationCommand{
|
||||
|
||||
$db->update('city', [
|
||||
'level'=>$db->sqleval('level+1'),
|
||||
'pop2'=>$db->sqleval('pop_max + %i', GameConst::$expandCityPopIncreaseAmount),
|
||||
'agri2'=>$db->sqleval('agri_max + %i', GameConst::$expandCityDevelIncreaseAmount),
|
||||
'comm2'=>$db->sqleval('comm_max + %i', GameConst::$expandCityDevelIncreaseAmount),
|
||||
'secu2'=>$db->sqleval('secu_max + %i', GameConst::$expandCityDevelIncreaseAmount),
|
||||
'def2'=>$db->sqleval('def_max + %i', GameConst::$expandCityWallIncreaseAmount),
|
||||
'wall2'=>$db->sqleval('wall_max + %i', GameConst::$expandCityWallIncreaseAmount),
|
||||
'pop_max'=>$db->sqleval('pop_max + %i', GameConst::$expandCityPopIncreaseAmount),
|
||||
'agri_max'=>$db->sqleval('agri_max + %i', GameConst::$expandCityDevelIncreaseAmount),
|
||||
'comm_max'=>$db->sqleval('comm_max + %i', GameConst::$expandCityDevelIncreaseAmount),
|
||||
'secu_max'=>$db->sqleval('secu_max + %i', GameConst::$expandCityDevelIncreaseAmount),
|
||||
'def_max'=>$db->sqleval('def_max + %i', GameConst::$expandCityWallIncreaseAmount),
|
||||
'wall_max'=>$db->sqleval('wall_max + %i', GameConst::$expandCityWallIncreaseAmount),
|
||||
], 'city=%i', $destCityID);
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
@@ -41,7 +41,10 @@ class che_포상 extends Command\NationCommand{
|
||||
$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);
|
||||
|
||||
Reference in New Issue
Block a user