From 70b1f23a491dfaec625dc1dc0b93aa090d0af7d5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 5 May 2018 23:25:21 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=99=EC=9D=98=20=ED=95=B4=EC=A0=9C?= =?UTF-8?q?=EC=9A=A9=20=EC=82=AD=ED=84=B4=20=EC=84=B8=ED=8C=85.=20-=2010?= =?UTF-8?q?=EB=B6=84=20=EB=AF=B8=EB=A7=8C=EC=9D=80=2030=EB=B6=84=20-=2010?= =?UTF-8?q?=EB=B6=84=20=EC=9D=B4=ED=95=98=EB=8A=94=2060=EB=B6=84=20?= =?UTF-8?q?=EB=8C=80=EA=B8=B0=20=ED=95=84=EC=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/b_myPage.php | 53 +++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/hwe/b_myPage.php b/hwe/b_myPage.php index 4e83baca..449e5ede 100644 --- a/hwe/b_myPage.php +++ b/hwe/b_myPage.php @@ -7,6 +7,7 @@ include "func.php"; $btn = Util::getReq('btn'); $mode = Util::getReq('mode', 'int', 2); $tnmt = Util::getReq('tnmt', 'int', 1); +$detachNPC = Util::getReq('detachNPC', 'bool'); extractMissingPostToGlobals(); @@ -27,33 +28,48 @@ $connect=$db->get(); increaseRefresh("내정보", 1); -$query = "select myset from general where owner='{$userID}'"; +$query = "select no,npc,mode,tnmt,myset from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); + if ($me['myset'] > 0) { $submit = 'submit'; } else { $submit = 'hidden'; } -if ($btn == "설정저장" && $me['myset'] > 0) { +if (($btn == "설정저장" || $detachNPC) && $me['myset'] > 0) { if ($me['myset'] > 1) { $submit = 'submit'; } else { $submit = 'hidden'; } + $me['myset'] -= 1; + $db->update('general', [ 'myset'=>$db->sqleval('myset-1'), 'mode'=>$mode, 'tnmt'=>$tnmt ], 'owner=%i', $userID); -} -$query = "select no,mode,tnmt,myset from general where owner='{$userID}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); -$me = MYDB_fetch_array($result); + if($me['npc'] == 1 && $detachNPC){ + $turnterm = $db->queryFirstField('SELECT turnterm FROM game LIMIT 1'); + + if($turnterm < 10){ + $targetKillTurn = 30 / $turnterm; + } + else{ + $targetKillTurn = 60 / $turnterm; + } + $db->update('general', [ + 'killturn'=>$targetKillTurn + ], 'owner=%i AND npc=1', $userID); + + $me['killturn']=$targetKillTurn; + } +} ?> @@ -63,13 +79,6 @@ $me = MYDB_fetch_array($result); <?=UniqueConst::$serverName?>: 내정보 - @@ -83,23 +92,25 @@ function go(type) { - +
-     토너먼트 【 + 토너먼트 【 >수동참여 >자동참여 】
-     ∞개막직전 남는자리가 있을경우 랜덤하게 참여합니다.

-     수비 【 + ∞개막직전 남는자리가 있을경우 랜덤하게 참여합니다.

+ 수비 【 >◎(훈사80) >○(훈사60) >× 】

-      name=btn style=background-color:;color:white;width:160px;height:30px;font-size:13px; value=설정저장>
-     ∞설정저장은 이달중 회 남았습니다.

+ name=btn style=background-color:;color:white;width:160px;height:30px;font-size:13px; value=설정저장>
+ ∞설정저장은 이달중 회 남았습니다.

-     휴 가 신 청
-     ;color:white;width:160px;height:30px;font-size:13px; value=휴가신청 onclick='go(0)'> + 휴 가 신 청
+

+ 빙의 해제용 삭턴 조절
+