토너먼트 중복 참가 방지. 자동 참가시 돈을 받지 않음

This commit is contained in:
2018-08-08 01:54:57 +09:00
parent d5214d616c
commit f1243e3d5b
2 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -298,7 +298,7 @@ function fillLowGenAll() {
}
//자동신청하고, 돈 있고, 아직 참가 안한 장수
$query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='{$develcost}' order by rand() limit 0,64";
$query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' order by rand() limit 0,64";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genCount = MYDB_num_rows($result);
@@ -313,7 +313,7 @@ function fillLowGenAll() {
if($genCount > 0) {
$genCount--;
$gen = MYDB_fetch_array($result);
$query = "update general set gold=gold-'{$develcost}',tournament='1' where no='{$gen['no']}'";
$query = "update general set tournament='1' where no='{$gen['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('{$gen['no']}', '{$gen['npc']}', '{$gen['name']}', '{$gen['leader']}', '{$gen['power']}', '{$gen['intel']}', '{$gen['explevel']}', '$i', '$grpCount[$i]')";