From 4c1790014f7fe7437950efdcf2ee258aadefe2b3 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 20 Feb 2019 01:40:56 +0900 Subject: [PATCH 01/16] =?UTF-8?q?=EB=A9=94=EC=8B=9C=EC=A7=80=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_time_event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwe/func_time_event.php b/hwe/func_time_event.php index c60e6224..49da5719 100644 --- a/hwe/func_time_event.php +++ b/hwe/func_time_event.php @@ -40,7 +40,7 @@ function processSpring() { $admin = $gameStor->getValues(['year', 'month']); - pushWorldHistory(["★{$admin['year']}년 {$admin['month']}월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~"], $admin['year'], $admin['month']); + pushWorldHistory(["★{$admin['year']}년 {$admin['month']}월: 모두들 즐거운 게임 하고 계신가요? ^^ 매너 있는 플레이 부탁드리고, 지나친 훼접은 삼가주세요~"], $admin['year'], $admin['month']); } function processGoldIncome() { From 3e9cc367af14a09017c742e00fd62b3c7833918f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:23:45 +0900 Subject: [PATCH 02/16] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=E3=85=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/t_board.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hwe/t_board.php b/hwe/t_board.php index 2827e080..d540a265 100644 --- a/hwe/t_board.php +++ b/hwe/t_board.php @@ -63,6 +63,13 @@ var isSecretBoard = ; // + +
+
+ +
+ + @@ -113,7 +120,7 @@ var isSecretBoard = ; // -
+

From 7447a42d40878c7a83392f6011436f9835cc1538 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:32:22 +0900 Subject: [PATCH 03/16] =?UTF-8?q?=EC=99=B8=EA=B5=90=20=EC=84=9C=EC=8B=A0?= =?UTF-8?q?=20=EC=88=98=EB=9D=BD=EC=8B=9C,=20=EA=B5=AD=EB=A9=94,=20?= =?UTF-8?q?=EC=99=B8=EA=B5=90=20=EB=91=98=EB=8B=A4=20=EB=9C=A8=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/j_diplomacy_respond_letter.php | 11 +++++++++++ hwe/sammo/DiplomaticMessage.php | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/hwe/j_diplomacy_respond_letter.php b/hwe/j_diplomacy_respond_letter.php index a8e492c7..294f3fc4 100644 --- a/hwe/j_diplomacy_respond_letter.php +++ b/hwe/j_diplomacy_respond_letter.php @@ -112,6 +112,17 @@ $msg = new Message( ); $msgID = $msg->send(); +$msg = new Message( + Message::MSGTYPE_NATIONAL, + $src, + $dest, + $msgText, + $now, + $unlimited, + ['invalid' => true] +); +$msgID = $msg->send(); + Json::die([ 'result'=>true, 'reason'=>'success' diff --git a/hwe/sammo/DiplomaticMessage.php b/hwe/sammo/DiplomaticMessage.php index 183d2e0a..2bb69009 100644 --- a/hwe/sammo/DiplomaticMessage.php +++ b/hwe/sammo/DiplomaticMessage.php @@ -345,6 +345,20 @@ class DiplomaticMessage extends Message{ $this->invalidate(); $newMsg->send(); + $newMsg = new Message( + self::MSGTYPE_DIPLOMACY, + $this->dest, + $this->src, + "【외교】{$year}년 {$month}월: {$this->src->nationName}{$josaYi} {$this->dest->nationName}에게 제안한 {$this->diplomacyDetail}{$this->diplomacyName} 동의.", + new \DateTime(), + new \DateTime('9999-12-31'), + [ + 'delete'=>$this->id, + 'silence'=>true, + ] + ); + $newMsg->send(); + return self::ACCEPTED; } From c3bb312b5fa906bf143255c76904c4446f55c146 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:37:01 +0900 Subject: [PATCH 04/16] =?UTF-8?q?=EC=84=A0=EC=96=91=EC=8B=9C=20=EC=99=B8?= =?UTF-8?q?=EA=B5=90=EA=B6=8C=EC=9E=90=20=EC=A7=80=EC=A0=95=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process_personnel.php | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index 2971e140..cf31a0e8 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -847,18 +847,28 @@ function process_54(&$general) { $log[] = "●{$admin['month']}월:현재 통합 진행중입니다. 선양 실패."; } else { //군주 교체 - $query = "update general set level='12' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 태수,군사,종사이었다면 해제 - $query = "update city set gen1='0' where gen1='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $db->update('general', [ + 'level'=>12, + 'permission'=>'normal' + ], 'no=%i', $who); - $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 태수,군사,종사이었다면 해제 + $db->update('general', [ + 'gen1'=>0, + ], 'gen1=%i', $who); + $db->update('general', [ + 'gen2'=>0, + ], 'gen2=%i', $who); + $db->update('general', [ + 'gen3'=>0, + ], 'gen3=%i', $who); + + $db->update('general', [ + 'resturn'=>'SUCCESS', + 'level'=>1, + 'permission'=>'auditor', + 'experience'=>$db->sqleval('experience*0.7'), + ], 'no=%i', $general['no']); $josaYi = JosaUtil::pick($general['name'], '이'); $history[] = "●{$admin['year']}년 {$admin['month']}월:【선양】{$general['name']}{$josaYi} {$nation['name']}의 군주 자리를 {$nextruler['name']}에게 선양했습니다."; From 0c60ea66e368294c56604af7e0431921d461da0e Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:42:34 +0900 Subject: [PATCH 05/16] =?UTF-8?q?=EC=9E=90=EA=B5=AD=20=EB=82=B4=20?= =?UTF-8?q?=EC=99=B8=EA=B5=90=EA=B6=8C=EC=9E=90=EC=97=90=EA=B2=8C=EB=8A=94?= =?UTF-8?q?=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=EB=B3=B4=EB=82=BC=20=EC=88=98?= =?UTF-8?q?=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/j_msg_submit.php | 2 +- hwe/js/msg.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hwe/j_msg_submit.php b/hwe/j_msg_submit.php index 51bd87b9..dbaba7e0 100644 --- a/hwe/j_msg_submit.php +++ b/hwe/j_msg_submit.php @@ -161,7 +161,7 @@ if($mailbox > 0) { } $destPermission = checkSecretPermission($destUser, false); - if($permission == 4 && $destPermission == 4){ + if($permission == 4 && $destPermission == 4 && $destUser['nation'] != $me['nation']){ Json::die([ 'result' => false, 'reason' => '외교권자끼리는 메시지를 보낼 수 없습니다.', diff --git a/hwe/js/msg.js b/hwe/js/msg.js index b812cc49..b70eaf93 100644 --- a/hwe/js/msg.js +++ b/hwe/js/msg.js @@ -385,7 +385,7 @@ function refreshMailboxList(obj){ var $item = $(''.format(generalID, textName)); - if(permissionLevel == 4 && isAmbassador){ + if(permissionLevel == 4 && isAmbassador && myNation.mailbox != nation.mailbox){ $item.prop('disabled', true); } $optgroup.append($item); From 9ee3021b76768e0580c4591f1b7e1b54f891e26f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:52:42 +0900 Subject: [PATCH 06/16] =?UTF-8?q?NPC=20=EA=B5=B0=EC=A3=BC=EB=8A=94=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=EC=9E=A5=20=EC=88=98=EB=87=8C=EC=97=90?= =?UTF-8?q?=EA=B2=8C=20=EC=99=B8=EA=B5=90=EA=B6=8C=EC=9E=90=20=EA=B6=8C?= =?UTF-8?q?=ED=95=9C=20=EB=B6=80=EC=97=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_npc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hwe/func_npc.php b/hwe/func_npc.php index d58a120f..5ac18199 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -1416,6 +1416,10 @@ function Promotion($nation, $level) { $query = "update general set level={$i2} where no='{$level['no']}'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } + + $db->update('general', [ + 'permission'=>'ambassador', + ], 'nation=%i AND npc < 2 AND level > 4', $nation); } function TaxRate($nation) { From 747089f1a84594bc38593f028e83fadcf8abebe2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:55:13 +0900 Subject: [PATCH 07/16] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=9C=84?= =?UTF-8?q?=EC=95=84=EB=9E=98=20=EA=B0=80=EC=9A=B4=EB=8D=B0=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/t_board.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hwe/t_board.php b/hwe/t_board.php index d540a265..39641fef 100644 --- a/hwe/t_board.php +++ b/hwe/t_board.php @@ -64,7 +64,7 @@ var isSecretBoard = ; // -
+

@@ -120,7 +120,7 @@ var isSecretBoard = ; // -
+

From b7758da2f3a35f0e3833c689e8d4f245dce230b1 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 00:56:25 +0900 Subject: [PATCH 08/16] =?UTF-8?q?=ED=9A=8C=EC=9D=98=EC=8B=A4=20=EA=B8=B0?= =?UTF-8?q?=EB=B0=80=EC=8B=A4=20'=ED=83=80=EC=9D=B4=ED=8B=80'=EC=9D=B4=20?= =?UTF-8?q?=EA=B1=B0=EA=BE=B8=EB=A1=9C=20=ED=91=9C=EA=B8=B0=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/t_board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwe/t_board.php b/hwe/t_board.php index 39641fef..5ca5cd8a 100644 --- a/hwe/t_board.php +++ b/hwe/t_board.php @@ -33,7 +33,7 @@ else if ($isSecretBoard && $permission < 2) { die(); } -$boardName = $isSecretBoard?'회의실':'기밀실'; +$boardName = $isSecretBoard?'기밀실':'회의실'; ?> From ff654df997faaa882a55ba85bd593e67abac60d1 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 01:12:59 +0900 Subject: [PATCH 09/16] =?UTF-8?q?=EB=B3=B8=EC=9D=B8=20=EA=B5=AD=EA=B0=80?= =?UTF-8?q?=20=EC=95=84=EB=8B=8C=20=EA=B3=B3=EC=97=90=20=EC=9E=84=EB=AA=85?= =?UTF-8?q?=20=EA=B0=80=EB=8A=A5=ED=95=9C=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/c_myBossInfo.php | 49 +++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/hwe/c_myBossInfo.php b/hwe/c_myBossInfo.php index 7dd2073b..d177f9a3 100644 --- a/hwe/c_myBossInfo.php +++ b/hwe/c_myBossInfo.php @@ -310,27 +310,29 @@ if($btn == "임명" && $level >= 5 && $level <= 11) { if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) { switch($level) { - case 4: $lv = 1; break; - case 3: $lv = 2; break; - case 2: $lv = 3; break; + case 4: $genlv = 'gen1'; $genlvset = 'gen1set'; break; + case 3: $genlv = 'gen2'; $genlvset = 'gen2set'; break; + case 2: $genlv = 'gen3'; $genlvset = 'gen3set'; break; } - $query = "select gen{$lv} from city where nation='{$me['nation']}' and city='$citylist'"; + $query = "select {$genlv} from city where nation='{$me['nation']}' and city='$citylist'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); if(!$city){ header('location:b_myBossInfo.php'); die(); } - $oldlist = $city["gen{$lv}"]; + $oldlist = $city[$genlv]; if($oldlist != 0) { //기존 장수 일반으로 - $query = "update general set level=1 where no='$oldlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $db->update('general', [ + 'level'=>1 + ], 'no=%i', $oldlist); //기존 자리 공석으로 - $query = "update city set gen{$lv}=0 where city='$citylist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $db->update('city', [ + $genlv=>0 + ], 'city = %i AND nation %i', $citylist , $general['nation']); } if($genlist != 0) { $valid = 0; @@ -342,17 +344,26 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) { if($valid == 1) { // 신임 장수의 원래 자리 해제 - $query = "update city set gen1=0 where gen1='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2=0 where gen2='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3=0 where gen3='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $db->update('city', [ + 'gen1'=>0, + ], 'gen1=%i', $genlist); + $db->update('city', [ + 'gen2'=>0, + ], 'gen2=%i', $genlist); + $db->update('city', [ + 'gen3'=>0, + ], 'gen3=%i', $genlist); + //신임 장수 - $query = "update general set level='$level' where no='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen{$lv}='$genlist',gen{$lv}set='1' where city='$citylist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $db->update('city', [ + $genlv=>$genlist, + $genlvset=>1 + ], 'city=%i AND nation=%i', $citylist, $general['nation']); + if($db->affectedRows() > 0){ + $db->update('general',[ + 'level'=>$level + ], 'no=%i', $genlist); + } } } header('location:b_myBossInfo.php'); From 9bdc34dc4252b11b5781aa814d7ba081d9a7fafc Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Feb 2019 19:41:00 +0900 Subject: [PATCH 10/16] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/c_myBossInfo.php | 2 +- hwe/j_basic_info.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hwe/c_myBossInfo.php b/hwe/c_myBossInfo.php index d177f9a3..b821ce71 100644 --- a/hwe/c_myBossInfo.php +++ b/hwe/c_myBossInfo.php @@ -332,7 +332,7 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) { //기존 자리 공석으로 $db->update('city', [ $genlv=>0 - ], 'city = %i AND nation %i', $citylist , $general['nation']); + ], 'city = %i AND nation = %i', $citylist , $general['nation']); } if($genlist != 0) { $valid = 0; diff --git a/hwe/j_basic_info.php b/hwe/j_basic_info.php index b7fccd3a..ac458e7c 100644 --- a/hwe/j_basic_info.php +++ b/hwe/j_basic_info.php @@ -12,7 +12,7 @@ $result = [ $session = Session::requireGameLogin([])->setReadOnly(); $userID = Session::getUserID(); -$generalInfo = DB::db()->queryFirstRow('SELECT `no`, `nation`, `level`, penalty, permission from `general` where `owner`=%i', $userID); +$generalInfo = DB::db()->queryFirstRow('SELECT `no`, `nation`, `level`, belong, penalty, permission from `general` where `owner`=%i', $userID); if(!$generalInfo){ Json::die($result); } From 33f4fd8fee3fbb751412a197c07f5522e42236d8 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 25 Feb 2019 21:25:29 +0900 Subject: [PATCH 11/16] =?UTF-8?q?=EC=99=B8=EA=B5=90=EA=B6=8C=EC=9E=90=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/c_myBossInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwe/c_myBossInfo.php b/hwe/c_myBossInfo.php index b821ce71..86eeb34f 100644 --- a/hwe/c_myBossInfo.php +++ b/hwe/c_myBossInfo.php @@ -59,7 +59,7 @@ if($btn == "임명") { header('location:b_myBossInfo.php'); exit(); } - $query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr,permission,penalty from general where no='$outlist'"; + $query = "select no,name,gold,rice,nation,troop,level,npc,picture,imgsvr,permission,penalty,belong from general where no='$outlist'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); From 65c3d7f9250dca1076342a2fcadf3b5dbeb04227 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 25 Feb 2019 21:27:17 +0900 Subject: [PATCH 12/16] =?UTF-8?q?=EC=84=A0=EC=96=91=20=EB=B2=84=EA=B7=B8?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_process_personnel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hwe/func_process_personnel.php b/hwe/func_process_personnel.php index cf31a0e8..a7f21420 100644 --- a/hwe/func_process_personnel.php +++ b/hwe/func_process_personnel.php @@ -853,13 +853,13 @@ function process_54(&$general) { ], 'no=%i', $who); // 태수,군사,종사이었다면 해제 - $db->update('general', [ + $db->update('city', [ 'gen1'=>0, ], 'gen1=%i', $who); - $db->update('general', [ + $db->update('city', [ 'gen2'=>0, ], 'gen2=%i', $who); - $db->update('general', [ + $db->update('city', [ 'gen3'=>0, ], 'gen3=%i', $who); From 5870213ff0ff30b96a45e230f5cd941ec17fc6db Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 27 Feb 2019 23:23:53 +0900 Subject: [PATCH 13/16] =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EA=B4=80=EB=A0=A8?= =?UTF-8?q?=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/c_myBossInfo.php | 2 +- hwe/j_msg_submit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hwe/c_myBossInfo.php b/hwe/c_myBossInfo.php index 86eeb34f..ec1ff6a1 100644 --- a/hwe/c_myBossInfo.php +++ b/hwe/c_myBossInfo.php @@ -332,7 +332,7 @@ if($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) { //기존 자리 공석으로 $db->update('city', [ $genlv=>0 - ], 'city = %i AND nation = %i', $citylist , $general['nation']); + ], 'city = %i AND nation = %i', $citylist , $me['nation']); } if($genlist != 0) { $valid = 0; diff --git a/hwe/j_msg_submit.php b/hwe/j_msg_submit.php index dbaba7e0..e5abb600 100644 --- a/hwe/j_msg_submit.php +++ b/hwe/j_msg_submit.php @@ -49,7 +49,7 @@ $now = new \DateTime(); $unlimited = new \DateTime('9999-12-31'); $db = DB::db(); -$me = $db->queryFirstRow('SELECT `no`,`name`,`nation`,`level`,`con`,`picture`,`imgsvr`,penalty,permission FROM general WHERE `owner`=%i', $userID); +$me = $db->queryFirstRow('SELECT `no`,`name`,`nation`,`level`,`con`,`picture`,`imgsvr`,penalty,permission,belong FROM general WHERE `owner`=%i', $userID); if(!$me){ $session->logoutGame(); From a49508fd20884f56e06e2a76d8f05c388ee03cc5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 27 Feb 2019 23:33:18 +0900 Subject: [PATCH 14/16] =?UTF-8?q?=EC=99=B8=EA=B5=90=EA=B6=8C=EC=9E=90=20?= =?UTF-8?q?=EB=93=B1=EC=97=90=EC=84=9C=20=EC=9D=B8=EC=82=AC=EB=B6=80=20?= =?UTF-8?q?=EC=97=B0=EB=8F=99=EC=9D=B4=20=EC=95=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/b_myBossInfo.php | 2 +- hwe/js/ext.expand_city.js | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/hwe/b_myBossInfo.php b/hwe/b_myBossInfo.php index 054a1771..ae5b6c50 100644 --- a/hwe/b_myBossInfo.php +++ b/hwe/b_myBossInfo.php @@ -351,7 +351,7 @@ if($meLevel == 12): -
새 게시물 작성
+
= 5) { diff --git a/hwe/js/ext.expand_city.js b/hwe/js/ext.expand_city.js index 970913e9..3c3d1b00 100644 --- a/hwe/js/ext.expand_city.js +++ b/hwe/js/ext.expand_city.js @@ -330,16 +330,7 @@ $(function() { //window.$html = $html; var cnt =0; - var $tmpTable = null; - $html.each(function(idx){ - if(this.tagName == "TABLE"){ - cnt+=1; - if(cnt==5){ - $tmpTable = $(this); - return false; - } - } - }); + var $tmpTable = $html.filter('#officer_list').eq(0); $selects = $tmpTable.find("select"); if($selects.length == 0){ From 7d1c5f351042c3cc0221c33ca77a5ac39c3df518 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 5 Mar 2019 01:20:27 +0900 Subject: [PATCH 15/16] =?UTF-8?q?=EC=A7=91=ED=95=A9=EC=9E=A5=EC=9D=B4=20?= =?UTF-8?q?=EA=B5=B0=EC=A3=BC=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20=EC=95=84?= =?UTF-8?q?=EB=AC=B4=EC=97=90=EA=B2=8C=EB=82=98=20=EC=84=A0=EC=96=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_npc.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hwe/func_npc.php b/hwe/func_npc.php index 5ac18199..fff0c074 100644 --- a/hwe/func_npc.php +++ b/hwe/func_npc.php @@ -204,6 +204,21 @@ function processAI($no) { 'killturn'=>1 ], 'no=%i', $general['no']); } + else if($general['level'] == 12){ + $newRuler = $db->queryFirstField('SELECT `no` FROM general WHERE nation = %i AND no != %i ORDER BY RAND() LIMIT 1', $general['nation'], $general['no']); + if($newRuler){ + $command = EncodeCommand(0, 0, $newRuler, 54); //선양 + $db->update('general', [ + 'turn0'=>$command, + 'turn1'=>$command, + 'turn2'=>$command, + 'turn3'=>$command, + 'turn4'=>$command, + 'killturn'=>rand(70,75), + ], 'no=%i', $general['no']); + } + + } else{ $command = EncodeCommand(0, 0, 0, 26); //집합 $db->update('general', [ From 6bd677ad6fb8e9c26f8b291aeb1c98edeedcc3ca Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 5 Mar 2019 01:45:03 +0900 Subject: [PATCH 16/16] =?UTF-8?q?=EC=9D=80=ED=87=B4=20=ED=9B=84=20?= =?UTF-8?q?=EB=AA=85=EC=A0=84=20=EB=93=B1=EB=A1=9D=20=EC=8B=9C=20'?= =?UTF-8?q?=EC=9D=B4=EC=A0=84=20=EA=B0=92=EB=B3=B4=EB=8B=A4=20=EB=86=92?= =?UTF-8?q?=EC=95=84=EC=A7=84=20=EA=B2=BD=EC=9A=B0'=EC=97=90=EB=A7=8C=20?= =?UTF-8?q?=EA=B2=BD=EC=8B=A0=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index d41e1988..90c6230a 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -2188,7 +2188,7 @@ function CheckHall($no) { ]; $jsonAux = Json::encode($aux); - $db->insertUpdate('ng_hall', [ + $db->insertIgnore('ng_hall', [ 'server_id'=>UniqueConst::$serverID, 'scenario'=>$scenarioIdx, 'general_no'=>$no, @@ -2196,10 +2196,21 @@ function CheckHall($no) { 'value'=>$general[$typeName]??0, 'owner'=>$general['owner']??null, 'aux'=>$jsonAux - ],[ - 'value'=>$general[$typeName]??0, - 'aux'=>$jsonAux ]); + + if($db->affectedRows() == 0){ + $db->update('ng_hall', [ + 'value'=>$general[$typeName]??0, + 'aux'=>$jsonAux + ], + 'server_id = %s AND scenario = %i AND general_no = %i AND type = %i AND value < %?', + UniqueConst::$serverID, + $scenarioIdx, + $no, + $idx, + $general[$typeName]??0); + } + } }