집합장 등장 수식 수정

This commit is contained in:
2018-09-18 00:36:05 +09:00
parent 87171b4246
commit 0904d17a5f
+33 -29
View File
@@ -1020,37 +1020,41 @@ function updateNationState() {
break; break;
} }
$lastAssemblerID = $gameStor->assemblerID??0; $lastAssemblerID = $gameStor->assemblerID??0;
foreach(range($nation['level'] + 1, $nationLevel) as $levelGen){ $jumpStep = $nationLevel - max(1, $nation['level']);
$lastAssemblerID += 1; if($jumpStep > 0){
foreach(range(1, $jumpStep) as $levelGen){
$npcObj = new Scenario\NPC( $lastAssemblerID += 1;
999, '집합장'.$lastAssemblerID, null, $nation['nation'], $nation['capital'],
10, 10, 10, 1, $admin['year'] - 15, $admin['year'] + 15, 10, 75 $npcObj = new Scenario\NPC(
); 999, '집합장'.$lastAssemblerID, null, $nation['nation'], $nation['capital'],
$npcObj->npc = 5; 10, 10, 10, 1, $admin['year'] - 15, $admin['year'] + 15, 10, 75
$npcObj->build(); );
$npcID = $npcObj->generalID; $npcObj->npc = 5;
$npcObj->build();
$npcID = $npcObj->generalID;
$db->insert('troop', [ $db->insert('troop', [
'name'=>$npcObj->realName, 'name'=>$npcObj->realName,
'nation'=>$nation['nation'], 'nation'=>$nation['nation'],
'no'=>$npcID 'no'=>$npcID
]); ]);
$troopID = $db->insertId(); $troopID = $db->insertId();
$command = EncodeCommand(0, 0, 0, 26); //집합 $command = EncodeCommand(0, 0, 0, 26); //집합
$db->update('general', [ $db->update('general', [
'troop'=>$troopID, 'troop'=>$troopID,
'turn0'=>$command, 'turn0'=>$command,
'turn1'=>$command, 'turn1'=>$command,
'turn2'=>$command, 'turn2'=>$command,
'turn3'=>$command, 'turn3'=>$command,
'turn4'=>$command, 'turn4'=>$command,
'turn5'=>$command, 'turn5'=>$command,
'killturn'=>80 'killturn'=>80
], 'no=%i', $npcID); ], 'no=%i', $npcID);
}
} }
$gameStor->assemberlID = $lastAssemblerID; $gameStor->assemberlID = $lastAssemblerID;