history 타입들을 text에서 mediumtext로 변경

시나리오 생성 시 장수수 처리 수정
This commit is contained in:
2018-04-01 23:31:37 +09:00
parent e1f646daa5
commit a70bf667a4
6 changed files with 32 additions and 9 deletions
+7 -3
View File
@@ -18,6 +18,8 @@ class Nation{
private $cities = [];
private $generals = [];
public function __construct(
int $id = null,
string $name = '국가',
@@ -118,12 +120,14 @@ class Nation{
}
public function addGeneral(NPC $general){
$this->generals[] = $general;
}
public function postBuild($env=[]){
$npc_cnt = count($this->generals);
if($env['extended_general']){
$npc_cnt += count($this->generalsEx);
}
$db = DB::db();
$db->update('nation', [
'gennum'=>$npc_cnt,
'totaltech'=>$this->tech*$npc_cnt