집합장 테스트

This commit is contained in:
2018-09-18 00:29:44 +09:00
parent 78f8b56203
commit 87171b4246
6 changed files with 85 additions and 3 deletions
+34
View File
@@ -1020,6 +1020,40 @@ function updateNationState() {
break;
}
$lastAssemblerID = $gameStor->assemblerID??0;
foreach(range($nation['level'] + 1, $nationLevel) as $levelGen){
$lastAssemblerID += 1;
$npcObj = new Scenario\NPC(
999, '집합장'.$lastAssemblerID, null, $nation['nation'], $nation['capital'],
10, 10, 10, 1, $admin['year'] - 15, $admin['year'] + 15, 10, 75
);
$npcObj->npc = 5;
$npcObj->build();
$npcID = $npcObj->generalID;
$db->insert('troop', [
'name'=>$npcObj->realName,
'nation'=>$nation['nation'],
'no'=>$npcID
]);
$troopID = $db->insertId();
$command = EncodeCommand(0, 0, 0, 26); //집합
$db->update('general', [
'troop'=>$troopID,
'turn0'=>$command,
'turn1'=>$command,
'turn2'=>$command,
'turn3'=>$command,
'turn4'=>$command,
'turn5'=>$command,
'killturn'=>80
], 'no=%i', $npcID);
}
$gameStor->assemberlID = $lastAssemblerID;
//작위 상승
$query = "update nation set level='{$nation['level']}' where nation='{$nation['nation']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");