버그 수정

This commit is contained in:
2019-04-21 12:11:01 +09:00
parent b4b6f5a1f7
commit cf1f023379
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -159,7 +159,7 @@ class General implements iAction{
} }
function setRawCity(?array $city){ function setRawCity(?array $city){
$this->city = $city; $this->rawCity = $city;
} }
function getCityID():int{ function getCityID():int{
@@ -401,7 +401,7 @@ class General implements iAction{
continue; continue;
} }
/** @var iAction $iObj */ /** @var iAction $iObj */
$value = $iObj->onCalcDomestic($turnType, $varType, $value); $value = $iObj->onCalcDomestic($turnType, $varType, $value, $aux);
} }
return $value; return $value;
} }
@@ -550,7 +550,7 @@ class General implements iAction{
'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'belong', 'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'belong',
'personal', 'special', 'special2', 'mode', 'npc', 'npc_org', 'deadyear', 'npcmsg', 'personal', 'special', 'special2', 'mode', 'npc', 'npc_org', 'deadyear', 'npcmsg',
'dex0', 'dex10', 'dex20', 'dex30', 'dex40', 'dex0', 'dex10', 'dex20', 'dex30', 'dex40',
'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn' 'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn', 'myset'
]; ];
if($column === null){ if($column === null){
+2 -2
View File
@@ -44,7 +44,7 @@ class GeneralAI{
public function __construct(General $general){ public function __construct(General $general){
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
$this->env = $gameStor->getValues(['startyear','year','month','turnterm','killturn','scenario','gold_rate','rice_rate']); $this->env = $gameStor->getValues(['startyear','year','month','turnterm','killturn','scenario','gold_rate','rice_rate', 'develcost']);
$this->baseDevelCost = $this->env['develcost'] * 12; $this->baseDevelCost = $this->env['develcost'] * 12;
$this->general = $general; $this->general = $general;
if($general->getRawCity() === null){ if($general->getRawCity() === null){
@@ -1051,7 +1051,7 @@ class GeneralAI{
break; break;
case '이동': //이동 case '이동': //이동
$paths = array_keys(CityConst::byID($city['city'])::$path); $paths = array_keys(CityConst::byID($city['city'])->path);
$command = 'che_이동'; $command = 'che_이동';
$arg = ['destCityID'=>Util::choiceRandom($paths)]; $arg = ['destCityID'=>Util::choiceRandom($paths)];
break; break;
+1 -1
View File
@@ -233,7 +233,7 @@ WHERE turntime < %s ORDER BY turntime ASC, `no` ASC',
if($general->getVar('nation') != 0 && $general->getVar('level') >= 5){ if($general->getVar('nation') != 0 && $general->getVar('level') >= 5){
$nationStor = KVStorage::getStorage($db, 'nation_env'); $nationStor = KVStorage::getStorage($db, 'nation_env');
$lastNationTurnKey = "turn_last_{$general->getVar('nation')}_{$general->getVar('level')}"; $lastNationTurnKey = "turn_last_{$general->getVar('nation')}_{$general->getVar('level')}";
$lastNationTurn = $nationStor->getDBValue($lastNationTurnKey)??[]; $lastNationTurn = $nationStor->getValue($lastNationTurnKey)??[];
//수뇌 몇 없는데 매번 left join 하는건 낭비인것 같다. //수뇌 몇 없는데 매번 left join 하는건 낭비인것 같다.
$rawNationTurn = Json::decode($db->queryFirstRow( $rawNationTurn = Json::decode($db->queryFirstRow(
'SELECT action, arg FROM nation_turn WHERE nation_id = %i AND level = %i AND turn_idx =0', 'SELECT action, arg FROM nation_turn WHERE nation_id = %i AND level = %i AND turn_idx =0',