버그 수정

This commit is contained in:
2019-04-21 12:52:57 +09:00
parent 066e62c0aa
commit 44e0067e34
6 changed files with 55 additions and 52 deletions
+3 -3
View File
@@ -151,7 +151,7 @@ function _setNationCommand(int $nationID, int $level, array $turnList, string $c
$db->update('nation_turn', [
'action'=>$command,
'arg'=>Json::encode($arg, JSON::EMPTY_ARRAY_IS_DICT)
], 'nation_id = %i AND level = %i AND turn_idx IN %li', $generalID, $level, $turnList);
], 'nation_id = %i AND level = %i AND turn_idx IN %li', $nationID, $level, $turnList);
}
function checkCommandArg(?array $arg):?string{
@@ -221,7 +221,7 @@ function setGeneralCommand(int $generalID, array $turnList, string $command, ?ar
$general = General::createGeneralObjFromDB($generalID);
try{
$commandObj = buildGeneralCommandClass($action, $general, $env, $arg);
$commandObj = buildGeneralCommandClass($command, $general, $env, $arg);
}
catch (\InvalidArgumentException $e){
return [
@@ -292,7 +292,7 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr
}
try{
$commandObj = buildNationCommandClass($action, $general, $env, $arg);
$commandObj = buildNationCommandClass($command, $general, $env, $general->getLastTurn(), $arg);
}
catch (\InvalidArgumentException $e){
return [