버그 수정
This commit is contained in:
@@ -123,7 +123,7 @@ function pullNationCommand(int $nationID, int $level, int $turnCnt=1){
|
||||
'action'=>'휴식',
|
||||
'arg'=>'{}'
|
||||
], 'nation_id=%i AND level=%i AND turn_idx < %i', $nationID, $level, $turnCnt);
|
||||
$db->update('general_turn', [
|
||||
$db->update('nation_turn', [
|
||||
'turn_idx'=>$db->sqleval('turn_idx - %i', $turnCnt)
|
||||
], 'nation_id=%i AND level=%i', $nationID, $level);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use \sammo\{
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
CityConst,
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
@@ -1735,6 +1735,7 @@ class GeneralAI{
|
||||
|
||||
while(key_exists($candidate, $promoted)){
|
||||
$iterCurrentType->next();
|
||||
$candidate = $iterCurrentType->current();
|
||||
}
|
||||
|
||||
$chiefCandidate[$cheifLevel] = $candidate;
|
||||
@@ -1779,7 +1780,7 @@ class GeneralAI{
|
||||
$db->update('nation', [
|
||||
'war'=>0,
|
||||
'rate'=>$rate
|
||||
]);
|
||||
], 'nation=%i', $nationID);
|
||||
return $rate;
|
||||
}
|
||||
}
|
||||
@@ -1806,7 +1807,7 @@ class GeneralAI{
|
||||
return $bill;
|
||||
}
|
||||
|
||||
protected function caclRiceBillRate():int{
|
||||
protected function calcRiceBillRate():int{
|
||||
$db = DB::db();
|
||||
$nation = $this->nation;
|
||||
$env = $this->env;
|
||||
|
||||
@@ -153,15 +153,15 @@ class Nation{
|
||||
foreach(range(getNationChiefLevel(0) - 1, getNationChiefLevel($this->nationLevel), -1) as $chiefLevel){
|
||||
foreach(range(0, GameConst::$maxChiefTurn - 1) as $turnIdx){
|
||||
$turnRows[] = [
|
||||
'nation_id'=>$nation['nation'],
|
||||
'nation_id'=>$this->id,
|
||||
'level'=>$chiefLevel,
|
||||
'turn_idx'=>$turnIdx,
|
||||
'action'=>'휴식',
|
||||
'arg'=>null,
|
||||
'arg'=>'{}',
|
||||
];
|
||||
}
|
||||
}
|
||||
$db->insertIgnore('nation_turn', $turnRows);
|
||||
$db->insert('nation_turn', $turnRows);
|
||||
}
|
||||
|
||||
public function getBrief(){
|
||||
|
||||
Reference in New Issue
Block a user