Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2a3bc4626 | ||
|
|
e8ffa44544 | ||
|
|
bc09287666 | ||
|
|
392d9055fe | ||
|
|
0ee833d7ae | ||
|
|
3074bc00d7 | ||
|
|
cb6fb590c4 | ||
|
|
a7270b2cd2 | ||
|
|
0d925af065 | ||
|
|
7c7991e8ae | ||
|
|
54461b6ea4 | ||
|
|
6a17497fbd | ||
|
|
84f18aa4b6 | ||
|
|
73ab38563f | ||
|
|
1f2b40e4d4 | ||
|
|
1d920c5935 | ||
|
|
037a1e9c0c | ||
|
|
87e324d4d9 | ||
|
|
d1e9b489e3 | ||
|
|
34f1d538d1 | ||
|
|
fb8d2a2e01 | ||
|
|
837db5183e |
Vendored
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
-4
File diff suppressed because one or more lines are too long
@@ -15,6 +15,7 @@ require(__dir__.'/../vendor/autoload.php');
|
|||||||
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.validate.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
<?=WebUtil::printJS('../e_lib/sha512.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../js/common.js')?>
|
||||||
<?=WebUtil::printJS('../js/install.js')?>
|
<?=WebUtil::printJS('../js/install.js')?>
|
||||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../css/install.css')?>
|
<?=WebUtil::printCSS('../css/install.css')?>
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ $db = DB::db();
|
|||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
list($turntime, $tnmt_time) = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
|
[$turntime, $tnmt_time] = $gameStor->getValuesAsArray(['turntime','tnmt_time']);
|
||||||
|
|
||||||
$query = "select plock from plock";
|
$query = "select plock from plock";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|||||||
+2
-2
@@ -58,7 +58,7 @@ $db = DB::db();
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
|
||||||
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
|
$generalList = $db->query('SELECT `no`, `name`, npc, `block` FROM general ORDER BY npc, binary(`name`)');
|
||||||
|
|
||||||
foreach($generalList as $general){
|
foreach($generalList as $general){
|
||||||
@@ -76,7 +76,7 @@ echo "
|
|||||||
</td>
|
</td>
|
||||||
<td width=100 align=center>아이템 지급</td>
|
<td width=100 align=center>아이템 지급</td>
|
||||||
<td width=504>
|
<td width=504>
|
||||||
<select name=weap size=1 style=color:white;background-color:black;font-size:13>";
|
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
|
||||||
for($i=0; $i < 27; $i++) {
|
for($i=0; $i < 27; $i++) {
|
||||||
echo "
|
echo "
|
||||||
<option value={$i}>{$i}</option>";
|
<option value={$i}>{$i}</option>";
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ switch($btn) {
|
|||||||
], '`no` IN %li', $genlist);
|
], '`no` IN %li', $genlist);
|
||||||
break;
|
break;
|
||||||
case "특기 부여":
|
case "특기 부여":
|
||||||
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
|
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
||||||
$text = "특기 부여!";
|
$text = "특기 부여!";
|
||||||
|
|
||||||
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
|
foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ $conlimit = $gameStor->conlimit;
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
<select name=genlist[] size=20 multiple style='color:white;background-color:black;font-size:13px'>";
|
||||||
|
|
||||||
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
foreach($db->query('SELECT no,name,npc,block,con from general where ip!=\'\' order by npc,ip') as $general){
|
||||||
$style = "style=;";
|
$style = "style=;";
|
||||||
|
|||||||
@@ -26,9 +26,14 @@ increaseRefresh("명장일람", 1);
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1136" />
|
<meta name="viewport" content="width=1136" />
|
||||||
<title><?=UniqueConst::$serverName?>: 명장일람</title>
|
<title><?=UniqueConst::$serverName?>: 명장일람</title>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||||
|
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -213,7 +218,7 @@ $itemTypes = [
|
|||||||
["명 마", 'horse', function($v){return getHorseName($v);}, 7, 26, []],
|
["명 마", 'horse', function($v){return getHorseName($v);}, 7, 26, []],
|
||||||
["명 검", 'weap', function($v){return getWeapName($v);}, 7, 26, []],
|
["명 검", 'weap', function($v){return getWeapName($v);}, 7, 26, []],
|
||||||
["명 서", 'book', function($v){return getBookName($v);}, 7, 26, []],
|
["명 서", 'book', function($v){return getBookName($v);}, 7, 26, []],
|
||||||
["도 구", 'item', function($v){return getItemName($v);}, 7, 26, []],
|
["도 구", 'item', function($v){return displayItemInfo($v);}, 7, 26, []],
|
||||||
];
|
];
|
||||||
|
|
||||||
$simpleItemTypes = array_map(function($itemType){return $itemType[1];}, $itemTypes);
|
$simpleItemTypes = array_map(function($itemType){return $itemType[1];}, $itemTypes);
|
||||||
|
|||||||
+5
-2
@@ -41,10 +41,13 @@ if ($type <= 0 || $type > 15) {
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 장수일람</title>
|
<title><?=UniqueConst::$serverName?>: 장수일람</title>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -167,8 +170,8 @@ for ($j=0; $j < $gencount; $j++) {
|
|||||||
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
|
<td align=center><img width='64' height='64' src={$imageTemp}/{$general['picture']}></img></td>
|
||||||
<td align=center>$name</td>
|
<td align=center>$name</td>
|
||||||
<td align=center>{$general['age']}세</td>
|
<td align=center>{$general['age']}세</td>
|
||||||
<td align=center>".getGenChar($general['personal'])."</td>
|
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||||
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
|
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||||
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
|
<td align=center>Lv ".getExpLevel($general['experience'])."</td>
|
||||||
<td align=center>{$nation}</td>
|
<td align=center>{$nation}</td>
|
||||||
<td align=center>".getHonor($general['experience'])."</td>
|
<td align=center>".getHonor($general['experience'])."</td>
|
||||||
|
|||||||
@@ -36,11 +36,15 @@ else{
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1136" />
|
<meta name="viewport" content="width=1136" />
|
||||||
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
|
<title><?=UniqueConst::$serverName?>: 명예의 전당</title>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
<?=WebUtil::printCSS('css/hallOfFame.css')?>
|
||||||
|
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
<?=WebUtil::printJs('js/hallOfFame.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
+7
-2
@@ -29,9 +29,14 @@ $sel[$type] = "selected";
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
<title><?=UniqueConst::$serverName?>: 빙의일람</title>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -106,8 +111,8 @@ for ($j=0; $j < $gencount; $j++) {
|
|||||||
<td align=center>{$general['name2']}</td>
|
<td align=center>{$general['name2']}</td>
|
||||||
<td align=center>Lv {$general['explevel']}</td>
|
<td align=center>Lv {$general['explevel']}</td>
|
||||||
<td align=center>{$nation}</td>
|
<td align=center>{$nation}</td>
|
||||||
<td align=center>".getGenChar($general['personal'])."</td>
|
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||||
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
|
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||||
<td align=center>{$general['sum']}</td>
|
<td align=center>{$general['sum']}</td>
|
||||||
<td align=center>{$general['leader']}</td>
|
<td align=center>{$general['leader']}</td>
|
||||||
<td align=center>{$general['power']}</td>
|
<td align=center>{$general['power']}</td>
|
||||||
|
|||||||
+26
-21
@@ -21,9 +21,7 @@ $query = "select no,nation,level,city from general where owner='{$userID}'";
|
|||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
$me = MYDB_fetch_array($result);
|
$me = MYDB_fetch_array($result);
|
||||||
|
|
||||||
$query = "select nation,level,spy from nation where nation='{$me['nation']}'";
|
$myNation = $db->queryFirstRow('SELECT nation,level,spy FROM nation WHERE nation=%i', $me['nation']);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$myNation = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
$templates = new \League\Plates\Engine('templates');
|
$templates = new \League\Plates\Engine('templates');
|
||||||
|
|
||||||
@@ -121,27 +119,34 @@ if($me['level'] == 0) {
|
|||||||
|
|
||||||
if($myNation['level'] > 0) {
|
if($myNation['level'] > 0) {
|
||||||
// 첩보도시도 목록에 추가
|
// 첩보도시도 목록에 추가
|
||||||
$where = 'city=0';
|
|
||||||
$cities = array_map('intval',explode("|", $myNation['spy']));
|
$rawSpy = $myNation['spy'];
|
||||||
foreach($cities as $citySpy) {
|
|
||||||
$city = intdiv($citySpy, 10);
|
if($rawSpy == ''){
|
||||||
$where .= " or city='{$city}'";
|
$spyCities = [];
|
||||||
|
}
|
||||||
|
else if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
|
||||||
|
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
|
||||||
|
$spyCities = array_map(function($val){
|
||||||
|
$val = intval($val);
|
||||||
|
return intdiv($val, 10);
|
||||||
|
}, 'intval',explode('|', $myNation['spy']));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$spyCities = array_keys(Json::decode($rawSpy));
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = "select city,name,nation from city where {$where}";
|
|
||||||
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$citycount = MYDB_num_rows($cityresult);
|
|
||||||
|
|
||||||
for($i=0; $i < $citycount; $i++) {
|
if($spyCities){
|
||||||
$city = MYDB_fetch_array($cityresult);
|
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
|
||||||
echo "
|
echo "<option value={$city['city']}";
|
||||||
<option value={$city['city']}";
|
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
||||||
if($city['city'] == $citylist) { echo " selected"; $valid = 1; }
|
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
||||||
echo ">==================================================【".StringUtil::padString($city['name'], 4, '_')."】";
|
if($city['nation'] == 0) echo "공백지";
|
||||||
if($city['nation'] == 0) echo "공백지";
|
elseif($me['nation'] == $city['nation']) echo "본국==";
|
||||||
elseif($me['nation'] == $city['nation']) echo "본국==";
|
else echo "타국==";
|
||||||
else echo "타국==";
|
echo "============================================</option>";
|
||||||
echo "============================================</option>";
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ if ($me['level'] >= 5) {
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
<title><?=UniqueConst::$serverName?>: 내무부</title>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
|
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -45,11 +45,11 @@ for($i=0; $i < $nationcount; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$realConflict = [];
|
$realConflict = [];
|
||||||
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as list(
|
foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE conflict!=%s', '{}') as [
|
||||||
$cityID,
|
$cityID,
|
||||||
$cityName,
|
$cityName,
|
||||||
$rawConflict
|
$rawConflict
|
||||||
))
|
])
|
||||||
{
|
{
|
||||||
$conflict = Json::decode($rawConflict);
|
$conflict = Json::decode($rawConflict);
|
||||||
if (count($conflict)<2) {
|
if (count($conflict)<2) {
|
||||||
|
|||||||
@@ -54,9 +54,12 @@ $sel[$type] = "selected";
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 암행부</title>
|
<title><?=UniqueConst::$serverName?>: 암행부</title>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
+6
-2
@@ -40,8 +40,12 @@ $sel = [$type => "selected"];
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<title><?=UniqueConst::$serverName?>: 세력장수</title>
|
<title><?=UniqueConst::$serverName?>: 세력장수</title>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -181,8 +185,8 @@ for($j=0; $j < $gencount; $j++) {
|
|||||||
<td align=center>$intel</td>
|
<td align=center>$intel</td>
|
||||||
<td align=center>{$general['gold']}</td>
|
<td align=center>{$general['gold']}</td>
|
||||||
<td align=center>{$general['rice']}</td>
|
<td align=center>{$general['rice']}</td>
|
||||||
<td align=center>".getGenChar($general['personal'])."</td>
|
<td align=center>".displayCharInfo($general['personal'])."</td>
|
||||||
<td align=center>".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])."</td>
|
<td align=center>".displaySpecialInfo($general['special'])." / ".displaySpecialInfo($general['special2'])."</td>
|
||||||
<td align=center>{$general['belong']}</td>
|
<td align=center>{$general['belong']}</td>
|
||||||
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
|
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
|
|||||||
+2
-2
@@ -126,11 +126,11 @@ for($i=0; $i < $troopcount; $i++) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
|
<tr><td align=center><font size=2>【턴】".substr($turntime, 14)."</font></td><td align=center><font size=1>$name</font></td></tr>
|
||||||
<tr><td colspan=5>";
|
<tr><td colspan=5></td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</tbody>
|
echo "</tbody>
|
||||||
<tfoot>";
|
<tfoot><tr><td>";
|
||||||
if ($troopcount == 0) {
|
if ($troopcount == 0) {
|
||||||
}
|
}
|
||||||
else if($me['troop'] == 0) {
|
else if($me['troop'] == 0) {
|
||||||
|
|||||||
+4
-32
@@ -188,38 +188,10 @@ div.bar_out div.bar_in{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tooltip{
|
.tooltip{
|
||||||
position: relative;
|
font-size:12px;
|
||||||
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .tooltiptext {
|
.tooltiptext {
|
||||||
visibility: hidden;
|
display: none;
|
||||||
width: 120px;
|
|
||||||
background-color: #555;
|
|
||||||
color: #fff;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 5px 0;
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1;
|
|
||||||
bottom: 125%;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -60px;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.3s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip .tooltiptext::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -5px;
|
|
||||||
border-width: 5px;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: #555 transparent transparent transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip:hover .tooltiptext {
|
|
||||||
visibility: visible;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
+2
-2
@@ -63,8 +63,8 @@
|
|||||||
|
|
||||||
.world_map.map_detail .city_filler{
|
.world_map.map_detail .city_filler{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
width:100%;
|
width:calc(100% + 2px);
|
||||||
height:100%;
|
height:calc(100% + 2px);
|
||||||
left:-1px;
|
left:-1px;
|
||||||
top:-1px;
|
top:-1px;
|
||||||
background:transparent;
|
background:transparent;
|
||||||
|
|||||||
+13
-11
@@ -17,15 +17,14 @@
|
|||||||
#message_board section{
|
#message_board section{
|
||||||
overflow-y:auto;
|
overflow-y:auto;
|
||||||
overflow-x:hidden;
|
overflow-x:hidden;
|
||||||
max-width:498px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg_plate{
|
.msg_plate{
|
||||||
width:100%;
|
width:100%;
|
||||||
border-bottom:solid 1px gray;
|
outline-style:solid;
|
||||||
border-left:solid 1px gray;
|
outline-width:1px;
|
||||||
border-right:solid 1px gray;
|
outline-color: gray;
|
||||||
height:64px;
|
min-height:64px;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
color:white;
|
color:white;
|
||||||
@@ -96,7 +95,8 @@
|
|||||||
font-size:12px;
|
font-size:12px;
|
||||||
width:715px;
|
width:715px;
|
||||||
margin:0 2px;
|
margin:0 2px;
|
||||||
height:15px;
|
height:20px;
|
||||||
|
border:solid 1px gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
#msg_submit{
|
#msg_submit{
|
||||||
@@ -116,17 +116,19 @@
|
|||||||
|
|
||||||
.board_header{
|
.board_header{
|
||||||
color:white;
|
color:white;
|
||||||
border:solid 1px gray;
|
outline-style:solid;
|
||||||
|
outline-width:1px;
|
||||||
|
outline-color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board_side{
|
.board_side{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
height:1370px;
|
height:1370px;
|
||||||
width:498px;
|
width:50%;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
border-left:solid 1px;
|
outline-style:solid;
|
||||||
border-right:solid 1px;
|
outline-width:1px;
|
||||||
border-bottom:solid 1px;
|
outline-color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg_body{
|
.msg_body{
|
||||||
|
|||||||
+9
-10
@@ -490,7 +490,7 @@ function commandTable() {
|
|||||||
$develcostE = Util::round($develcostE);
|
$develcostE = Util::round($develcostE);
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=commandtype size=1 style=width:260px;color:white;background-color:black;font-size:12px;>";
|
<select name=commandtype size=1 style='height:20px;width:260px;color:white;background-color:black;font-size:12px;'>";
|
||||||
addCommand("휴 식", 0);
|
addCommand("휴 식", 0);
|
||||||
addCommand("요 양", 50);
|
addCommand("요 양", 50);
|
||||||
commandGroup("========= 내 정 ==========");
|
commandGroup("========= 내 정 ==========");
|
||||||
@@ -699,7 +699,7 @@ function CoreCommandTable() {
|
|||||||
if($city['supply'] == 0) { $valid = 0; }
|
if($city['supply'] == 0) { $valid = 0; }
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<select name=commandtype size=1 style=color:white;background-color:black;font-size:13>";
|
<select name=commandtype size=1 style='height:20px;color:white;background-color:black;font-size:13px;>";
|
||||||
addCommand("휴 식", 99);
|
addCommand("휴 식", 99);
|
||||||
commandGroup("", 1);
|
commandGroup("", 1);
|
||||||
commandGroup("====== 인 사 ======");
|
commandGroup("====== 인 사 ======");
|
||||||
@@ -821,7 +821,7 @@ function generalInfo($no) {
|
|||||||
$weapname = getWeapName($general['weap']);
|
$weapname = getWeapName($general['weap']);
|
||||||
$bookname = getBookName($general['book']);
|
$bookname = getBookName($general['book']);
|
||||||
$horsename = getHorseName($general['horse']);
|
$horsename = getHorseName($general['horse']);
|
||||||
$itemname = getItemName($general['item']);
|
$itemname = displayItemInfo($general['item']);
|
||||||
if($general['injury'] > 0) {
|
if($general['injury'] > 0) {
|
||||||
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
$leader = intdiv($general['leader'] * (100 - $general['injury']), 100);
|
||||||
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
|
$power = intdiv($general['power'] * (100 - $general['injury']), 100);
|
||||||
@@ -847,8 +847,8 @@ function generalInfo($no) {
|
|||||||
else { $general['age'] = "<font color=red>{$general['age']} 세</font>"; }
|
else { $general['age'] = "<font color=red>{$general['age']} 세</font>"; }
|
||||||
|
|
||||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||||
$special = $general['special'] == 0 ? "{$general['specage']}세" : "<font color=limegreen>".getGenSpecial($general['special'])."</font>";
|
$special = $general['special'] == 0 ? "{$general['specage']}세" : "<font color=limegreen>".displaySpecialInfo($general['special'])."</font>";
|
||||||
$special2 = $general['special2'] == 0 ? "{$general['specage2']}세" : "<font color=limegreen>".getGenSpecial($general['special2'])."</font>";
|
$special2 = $general['special2'] == 0 ? "{$general['specage2']}세" : "<font color=limegreen>".displaySpecialInfo($general['special2'])."</font>";
|
||||||
|
|
||||||
switch($general['personal']) {
|
switch($general['personal']) {
|
||||||
case 2: case 4:
|
case 2: case 4:
|
||||||
@@ -913,7 +913,7 @@ function generalInfo($no) {
|
|||||||
<td style='text-align:center;' class='bg1'><b>병사</b></td>
|
<td style='text-align:center;' class='bg1'><b>병사</b></td>
|
||||||
<td style='text-align:center;' colspan=2>{$general['crew']}</td>
|
<td style='text-align:center;' colspan=2>{$general['crew']}</td>
|
||||||
<td style='text-align:center;' class='bg1'><b>성격</b></td>
|
<td style='text-align:center;' class='bg1'><b>성격</b></td>
|
||||||
<td style='text-align:center;' colspan=2>".getGenChar($general['personal'])."</td>
|
<td style='text-align:center;' colspan=2>".displayCharInfo($general['personal'])."</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style='text-align:center;' class='bg1'><b>훈련</b></td>
|
<td style='text-align:center;' class='bg1'><b>훈련</b></td>
|
||||||
@@ -1128,7 +1128,7 @@ function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
|||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$message = explode("|", $msg);
|
$message = explode('|', $msg);
|
||||||
$count = (count($message) - 2)/2;
|
$count = (count($message) - 2)/2;
|
||||||
$message[0] = Tag2Code($message[0]);
|
$message[0] = Tag2Code($message[0]);
|
||||||
$message[1] = Tag2Code($message[1]);
|
$message[1] = Tag2Code($message[1]);
|
||||||
@@ -1180,11 +1180,10 @@ function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
|||||||
function banner() {
|
function banner() {
|
||||||
|
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<font size=2>%s %s / %s <br> %s</font>',
|
'<font size=2>%s %s / %s</font>',
|
||||||
GameConst::$title,
|
GameConst::$title,
|
||||||
VersionGit::$version,
|
VersionGit::$version,
|
||||||
GameConst::$banner,
|
GameConst::$banner);
|
||||||
GameConst::$helper);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addTurn($date, int $turnterm, int $turn=1) {
|
function addTurn($date, int $turnterm, int $turn=1) {
|
||||||
|
|||||||
+107
-1
@@ -135,6 +135,28 @@ function getGenChar($type) {
|
|||||||
return $call;
|
return $call;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCharInfo(?int $type):?string {
|
||||||
|
if($type === null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$infoText = [
|
||||||
|
10=>['은둔', '명성 -10%, 계급 -10%, 사기 -5, 훈련 -5, 단련 성공률 +10%'],
|
||||||
|
9=>['안전', '사기 -5, 징·모병 비용 -20%'],
|
||||||
|
8=>['유지', '훈련 -5, 징·모병 비용 -20%'],
|
||||||
|
7=>['재간', '명성 -10%, 징·모병 비용 -20%'],
|
||||||
|
6=>['출세', '명성 +10%, 징·모병 비용 +20%'],
|
||||||
|
5=>['할거', '명성 -10%, 훈련 +5'],
|
||||||
|
4=>['정복', '명성 -10%, 사기 +5'],
|
||||||
|
3=>['패권', '훈련 +5, 징·모병 비용 +20%'],
|
||||||
|
2=>['의협', '사기 +5, 징·모병 비용 +20%'],
|
||||||
|
1=>['대의', '명성 +10%, 훈련 -5'],
|
||||||
|
0=>['왕좌', '명성 +10%, 사기 -5'],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $infoText[$type][1]??null;
|
||||||
|
}
|
||||||
|
|
||||||
function getGenSpecial($type) {
|
function getGenSpecial($type) {
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case 0: $call = '-'; break;
|
case 0: $call = '-'; break;
|
||||||
@@ -179,6 +201,55 @@ function getGenSpecial($type) {
|
|||||||
return $call;
|
return $call;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSpecialInfo(?int $type):?string{
|
||||||
|
if($type === null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
//앞칸은 '설명을 위해' '그냥' 적어둠
|
||||||
|
$infoText = [
|
||||||
|
0 => ['-', null],
|
||||||
|
1 => ['경작', '[내정] 농지 개간 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
2 => ['상재', '[내정] 상업 투자 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
3 => ['발명', '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
|
||||||
|
10 => ['축성', '[내정] 성벽 보수 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
11 => ['수비', '[내정] 수비 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
12 => ['통찰', '[내정] 치안 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
|
||||||
|
20 => ['인덕', '[내정] 주민 선정·정착 장려 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%'],
|
||||||
|
|
||||||
|
30 => ['거상', '이것 저것'],
|
||||||
|
31 => ['귀모', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
|
||||||
|
|
||||||
|
40 => ['귀병', '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p'],
|
||||||
|
41 => ['신산', '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p '],
|
||||||
|
42 => ['환술', '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%'],
|
||||||
|
43 => ['집중', '[전투] 계략 성공 시 대미지 +50%'],
|
||||||
|
44 => ['신중', '[전투] 계략 성공 확률 100%'],
|
||||||
|
45 => ['반계', '[전투] 상대의 계략을 30% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)'],
|
||||||
|
|
||||||
|
50 => ['보병', '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%'],
|
||||||
|
51 => ['궁병', '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p'],
|
||||||
|
52 => ['기병', '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%'],
|
||||||
|
53 => ['공성', '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%'],
|
||||||
|
|
||||||
|
60 => ['돌격', '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%'],
|
||||||
|
61 => ['무쌍', '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p'],
|
||||||
|
62 => ['견고', '[전투] 수비 시 대미지 +10%, 공격 시 아군 피해 -10%'],
|
||||||
|
63 => ['위압', '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)'],
|
||||||
|
|
||||||
|
70 => ['저격', '[전투] 전투 개시 시 1/3 확률로 저격 발동'],
|
||||||
|
71 => ['필살', '[전투] 필살 확률 +20%p'],
|
||||||
|
72 => ['징병', '[군사] 징·모병비 -50%'],
|
||||||
|
73 => ['의술', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
|
||||||
|
74 => ['격노', '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)'],
|
||||||
|
75 => ['척사', '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%']
|
||||||
|
];
|
||||||
|
|
||||||
|
return $infoText[$type][1]??null;
|
||||||
|
}
|
||||||
|
|
||||||
function getNationType($type) {
|
function getNationType($type) {
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case 13: $call = '명 가'; break;
|
case 13: $call = '명 가'; break;
|
||||||
@@ -727,7 +798,7 @@ function getHorseEff($horse) : int {
|
|||||||
return $horse;
|
return $horse;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItemName($item) : string {
|
function getItemName($item) : ?string {
|
||||||
switch($item) {
|
switch($item) {
|
||||||
case 0: $itemname = '-'; break;
|
case 0: $itemname = '-'; break;
|
||||||
case 1: $itemname = '환약(치료)'; break;
|
case 1: $itemname = '환약(치료)'; break;
|
||||||
@@ -757,10 +828,45 @@ function getItemName($item) : string {
|
|||||||
case 24: $itemname = '태평청령(의술)'; break;
|
case 24: $itemname = '태평청령(의술)'; break;
|
||||||
case 25: $itemname = '태평요술(회피)'; break;
|
case 25: $itemname = '태평요술(회피)'; break;
|
||||||
case 26: $itemname = '둔갑천서(회피)'; break;
|
case 26: $itemname = '둔갑천서(회피)'; break;
|
||||||
|
default: $itemname = null;
|
||||||
}
|
}
|
||||||
return $itemname;
|
return $itemname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getItemInfo(?int $item):?string{
|
||||||
|
$itemInfo = [
|
||||||
|
1=>['환약(치료)', '[군사] 턴 실행 전 부상 회복. 1회용'],
|
||||||
|
2=>['수극(저격)', '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용'],
|
||||||
|
3=>['탁주(사기)', '[전투] 사기 보정 +3. 1회용'],
|
||||||
|
4=>['청주(훈련)', '[전투] 훈련 보정 +3. 1회용'],
|
||||||
|
5=>['이추(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p. 1회용'],
|
||||||
|
6=>['향낭(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p. 1회용'],
|
||||||
|
|
||||||
|
7=>['오석산(치료)', '[군사] 턴 실행 전 부상 회복.'],
|
||||||
|
8=>['무후행군(치료)', '[군사] 턴 실행 전 부상 회복.'],
|
||||||
|
9=>['도소연명(치료)', '[군사] 턴 실행 전 부상 회복.'],
|
||||||
|
10=>['칠엽청점(치료)', '[군사] 턴 실행 전 부상 회복.'],
|
||||||
|
11=>['정력견혈(치료)', '[군사] 턴 실행 전 부상 회복.'],
|
||||||
|
12=>['과실주(훈련)', '[전투] 훈련 보정 +5'],
|
||||||
|
13=>['이강주(훈련)', '[전투] 훈련 보정 +5'],
|
||||||
|
14=>['의적주(사기)', '[전투] 사기 보정 +5'],
|
||||||
|
15=>['두강주(사기)', '[전투] 사기 보정 +5'],
|
||||||
|
16=>['보령압주(사기)', '[전투] 사기 보정 +5'],
|
||||||
|
17=>['철벽서(훈련)', '[전투] 훈련 보정 +7'],
|
||||||
|
18=>['단결도(훈련)', '[전투] 훈련 보정 +7'],
|
||||||
|
19=>['춘화첩(사기)', '[전투] 사기 보정 +7'],
|
||||||
|
20=>['초선화(사기)', '[전투] 사기 보정 +7'],
|
||||||
|
21=>['육도(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
|
||||||
|
22=>['삼략(계략)', '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p'],
|
||||||
|
23=>['청낭서(의술)', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
|
||||||
|
24=>['태평청령(의술)', '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'],
|
||||||
|
25=>['태평요술(회피)', '[전투] 회피 확률 +20%p'],
|
||||||
|
26=>['둔갑천서(회피)', '[전투] 회피 확률 +20%p'],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $itemInfo[$item][1]??null;
|
||||||
|
}
|
||||||
|
|
||||||
function getItemCost2($weap) : int {
|
function getItemCost2($weap) : int {
|
||||||
switch($weap) {
|
switch($weap) {
|
||||||
case 0: $weapcost = 0; break;
|
case 0: $weapcost = 0; break;
|
||||||
|
|||||||
+26
-16
@@ -395,23 +395,33 @@ function preUpdateMonthly() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//첩보-1
|
//첩보-1
|
||||||
$query = "select nation,spy from nation where spy!=''";
|
foreach($db->queryAllLists("SELECT nation, spy FROM nation WHERE spy!='' AND spy!='{}'") as [$nationNo, $rawSpy]){
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
if (strpos($rawSpy, '|') !== false || is_numeric($rawSpy)) {
|
||||||
$nationCount = MYDB_num_rows($result);
|
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
|
||||||
for($i=0; $i < $nationCount; $i++) {
|
$spyInfo = [];
|
||||||
$nation = MYDB_fetch_array($result);
|
foreach(explode('|', $rawSpy) as $value){
|
||||||
$spy = ""; $k = 0;
|
$value = intval($value);
|
||||||
$cities = [];
|
$cityNo = intdiv($value, 10);
|
||||||
if($nation['spy'] != "") { $cities = explode("|", (string)$nation['spy']); }
|
$remainMonth = $value % 10;
|
||||||
while(count($cities)) {
|
$spyInfo[$cityNo] = $remainMonth;
|
||||||
$cities[$k]--;
|
}
|
||||||
if($cities[$k]%10 != 0) { $spy .= (string)$cities[$k]; }
|
|
||||||
$k++;
|
|
||||||
if($k >= count($cities)) { break; }
|
|
||||||
if($cities[$k-1]%10 != 0) { $spy .= "|"; }
|
|
||||||
}
|
}
|
||||||
$query = "update nation set spy='$spy' where nation='{$nation['nation']}'";
|
else{
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$spyInfo = Json::decode($rawSpy);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($spyInfo as $cityNo => $remainMonth){
|
||||||
|
if($remainMonth <= 1){
|
||||||
|
unset($spyInfo[$cityNo]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$spyInfo[$cityNo] -= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->update('nation', [
|
||||||
|
'spy'=>Json::encode($spyInfo, Json::EMPTY_ARRAY_IS_DICT)
|
||||||
|
], 'nation=%i', $nationNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ function bar($per, $h=7) {
|
|||||||
|
|
||||||
$per = round($per, 1);
|
$per = round($per, 1);
|
||||||
|
|
||||||
$str = "<div class='bar_out' style='height:{$h2}px;'>
|
$str = "<div class='bar_out' style='height:{$h}px;'>
|
||||||
<div class='bar_in' style='background:url(".ServConfig::$gameImagePath."/pr{$h2}.gif)'></div>
|
<div class='bar_in' style='background:url(".ServConfig::$gameImagePath."/pr{$h2}.gif)'></div>
|
||||||
<div style='width:{$per}%;background:url(".ServConfig::$gameImagePath."/pb{$h2}.gif)'></div>
|
<div style='width:{$per}%;background:url(".ServConfig::$gameImagePath."/pb{$h2}.gif)'></div>
|
||||||
</div>";
|
</div>";
|
||||||
|
|||||||
+19
-9
@@ -94,19 +94,29 @@ function getWorldMap($req){
|
|||||||
$myNation = null;
|
$myNation = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$spyInfo = (object)null;
|
||||||
|
|
||||||
if($myNation){
|
if($myNation){
|
||||||
$spyList = $db->queryFirstField('select `spy` from `nation` where `nation`=%i',
|
$rawSpy = $db->queryFirstField('select `spy` from `nation` where `nation`=%i',
|
||||||
$myNation);
|
$myNation);
|
||||||
if($spyList){
|
|
||||||
$spyList = array_map('\sammo\Util::toInt', explode("|", $spyList));
|
if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
|
||||||
|
//NOTE: 0.8 이전 데이터가 남아있으므로, 0.8버전으로 마이그레이션 이후에도 이곳은 삭제하면 안됨
|
||||||
|
$spyInfo = [];
|
||||||
|
foreach(explode('|', $rawSpy) as $value){
|
||||||
|
$value = intval($value);
|
||||||
|
$cityNo = intdiv($value, 10);
|
||||||
|
$remainMonth = $value % 10;
|
||||||
|
$spyInfo[$cityNo] = $remainMonth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if($rawSpy != ''){
|
||||||
$spyList = [];
|
$spyInfo = Json::decode($rawSpy);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
$spyList = [];
|
if(!$spyInfo){
|
||||||
|
$spyInfo = (object)null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nationList = [];
|
$nationList = [];
|
||||||
@@ -142,7 +152,7 @@ function getWorldMap($req){
|
|||||||
'month' => $month,
|
'month' => $month,
|
||||||
'cityList' => $cityList,
|
'cityList' => $cityList,
|
||||||
'nationList' => $nationList,
|
'nationList' => $nationList,
|
||||||
'spyList' => $spyList,
|
'spyList' => $spyInfo,
|
||||||
'shownByGeneralList' => $shownByGeneralList,
|
'shownByGeneralList' => $shownByGeneralList,
|
||||||
'myCity' => $myCity,
|
'myCity' => $myCity,
|
||||||
'myNation' => $myNation,
|
'myNation' => $myNation,
|
||||||
|
|||||||
+4
-4
@@ -361,7 +361,7 @@ function processAI($no) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: //이동 20%
|
case 2: //이동 20%
|
||||||
$paths = explode("|", $city['path']);
|
$paths = explode('|', $city['path']);
|
||||||
$command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21);
|
$command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -429,7 +429,7 @@ function processAI($no) {
|
|||||||
return;
|
return;
|
||||||
} elseif(rand()%4 > 0) {
|
} elseif(rand()%4 > 0) {
|
||||||
//이동
|
//이동
|
||||||
$paths = explode("|", $city['path']);
|
$paths = explode('|', $city['path']);
|
||||||
$command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21);
|
$command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21);
|
||||||
$query = "update general set turn0='$command' where no='{$general['no']}'";
|
$query = "update general set turn0='$command' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),"");
|
||||||
@@ -600,7 +600,7 @@ function processAI($no) {
|
|||||||
//현도시가 전방이면 공격 가능성 체크
|
//현도시가 전방이면 공격 가능성 체크
|
||||||
if($city['front'] > 0) {
|
if($city['front'] > 0) {
|
||||||
//주변도시 체크
|
//주변도시 체크
|
||||||
$paths = explode("|", $city['path']);
|
$paths = explode('|', $city['path']);
|
||||||
for($i=0; $i < count($paths); $i++) {
|
for($i=0; $i < count($paths); $i++) {
|
||||||
$query = "select city,nation from city where city='$paths[$i]'";
|
$query = "select city,nation from city where city='$paths[$i]'";
|
||||||
$result = MYDB_query($query, $connect) or Error("processAI20 ".MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error("processAI20 ".MYDB_error($connect),"");
|
||||||
@@ -766,7 +766,7 @@ function processAI($no) {
|
|||||||
$command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달
|
$command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달
|
||||||
} else {
|
} else {
|
||||||
//공격 & 내정
|
//공격 & 내정
|
||||||
$paths = explode("|", $city['path']);
|
$paths = explode('|', $city['path']);
|
||||||
for($i=0; $i < count($paths); $i++) {
|
for($i=0; $i < count($paths); $i++) {
|
||||||
$query = "select city,nation from city where city='$paths[$i]'";
|
$query = "select city,nation from city where city='$paths[$i]'";
|
||||||
$result = MYDB_query($query, $connect) or Error("processAI21 ".MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error("processAI21 ".MYDB_error($connect),"");
|
||||||
|
|||||||
+23
-23
@@ -898,7 +898,7 @@ function process_11(&$general, $type) {
|
|||||||
if(intdiv($armtype, 10) == 1 && $general['special2'] == 51) { $cost *= 0.9; }
|
if(intdiv($armtype, 10) == 1 && $general['special2'] == 51) { $cost *= 0.9; }
|
||||||
if(intdiv($armtype, 10) == 2 && $general['special2'] == 52) { $cost *= 0.9; }
|
if(intdiv($armtype, 10) == 2 && $general['special2'] == 52) { $cost *= 0.9; }
|
||||||
if(intdiv($armtype, 10) == 3 && $general['special2'] == 40) { $cost *= 0.9; }
|
if(intdiv($armtype, 10) == 3 && $general['special2'] == 40) { $cost *= 0.9; }
|
||||||
if(intdiv($armtype, 10) == 4 && $general['special2'] == 43) { $cost *= 0.9; }
|
if(intdiv($armtype, 10) == 4 && $general['special2'] == 53) { $cost *= 0.9; }
|
||||||
if($general['special2'] == 72) { $cost *= 0.5; }
|
if($general['special2'] == 72) { $cost *= 0.5; }
|
||||||
|
|
||||||
if($type == 1) { $dtype = "징병"; }
|
if($type == 1) { $dtype = "징병"; }
|
||||||
@@ -1743,32 +1743,32 @@ function process_31(&$general) {
|
|||||||
$query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'";
|
$query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'";
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
|
|
||||||
$query = "select spy from nation where nation='{$general['nation']}'";
|
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$nation = MYDB_fetch_array($result);
|
$rawSpy = $db->queryFirstField('SELECT spy FROM nation WHERE nation = %i', $general['nation']);
|
||||||
if($nation['spy'] != "")
|
|
||||||
{
|
if($rawSpy == ''){
|
||||||
$cities = array_map('intval', explode("|", $nation['spy']));
|
$spyInfo = [];
|
||||||
}
|
}
|
||||||
else{
|
else if(strpos($rawSpy, '|') !== false || is_numeric($rawSpy)){
|
||||||
$cities = [];
|
//TODO: 0.8 버전 이후에는 삭제할 것. 이후 버전은 json으로 변경됨.
|
||||||
}
|
$spyInfo = [];
|
||||||
$exist = 0;
|
foreach(explode('|', $rawSpy) as $value){
|
||||||
for($i=0; $i < count($cities); $i++) {
|
$value = intval($value);
|
||||||
if(intdiv($cities[$i], 10) == $destination) {
|
$cityNo = intdiv($value, 10);
|
||||||
$exist = 1;
|
$remainMonth = $value % 10;
|
||||||
break;
|
$spyInfo[$cityNo] = $remainMonth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 기존 첩보 목록에 없으면 새로 등록, 있으면 갱신
|
else{
|
||||||
if($exist == 0) {
|
$spyInfo = Json::decode($rawSpy);
|
||||||
$cities[] = $destination * 10 + 3;
|
|
||||||
} else {
|
|
||||||
$cities[$i] = $destination * 10 + 3;
|
|
||||||
}
|
}
|
||||||
$spy = implode("|", $cities);
|
|
||||||
$query = "update nation set spy='$spy' where nation='{$general['nation']}'";
|
$spyInfo[$destination] = 3;
|
||||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
|
$db->update('nation', [
|
||||||
|
'spy'=>Json::encode($spyInfo, Json::EMPTY_ARRAY_IS_DICT)
|
||||||
|
], 'nation=%i', $general['nation']);
|
||||||
|
|
||||||
$log = checkAbility($general, $log);
|
$log = checkAbility($general, $log);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,42 @@ function CoreTurnTable() {
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayCharInfo(?int $type):string{
|
||||||
|
$info = getCharInfo($type);
|
||||||
|
$text = getGenChar($type);
|
||||||
|
|
||||||
|
$templates = new \League\Plates\Engine(__dir__.'/templates');
|
||||||
|
|
||||||
|
return $templates->render('tooltip', [
|
||||||
|
'text'=>$text,
|
||||||
|
'info'=>$info,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function displaySpecialInfo(?int $type):string{
|
||||||
|
$info = getSpecialInfo($type);
|
||||||
|
$text = getGenSpecial($type);
|
||||||
|
|
||||||
|
$templates = new \League\Plates\Engine(__dir__.'/templates');
|
||||||
|
|
||||||
|
return $templates->render('tooltip', [
|
||||||
|
'text'=>$text,
|
||||||
|
'info'=>$info,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayItemInfo(?int $type):string{
|
||||||
|
$info = getItemInfo($type);
|
||||||
|
$text = getItemName($type);
|
||||||
|
|
||||||
|
$templates = new \League\Plates\Engine(__dir__.'/templates');
|
||||||
|
|
||||||
|
return $templates->render('tooltip', [
|
||||||
|
'text'=>$text,
|
||||||
|
'info'=>$info,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function allButton() {
|
function allButton() {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|||||||
+3
-2
@@ -87,6 +87,7 @@ $color = "cyan";
|
|||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/main.js')?>
|
<?=WebUtil::printJS('js/main.js')?>
|
||||||
@@ -104,7 +105,7 @@ $(function(){
|
|||||||
}, 10000);
|
}, 10000);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/main.css')?>
|
<?=WebUtil::printCSS('css/main.css')?>
|
||||||
@@ -287,7 +288,7 @@ else if($session->userGrade == 4){
|
|||||||
<div class="message_input_form bg0">
|
<div class="message_input_form bg0">
|
||||||
<select id="mailbox_list" size="1">
|
<select id="mailbox_list" size="1">
|
||||||
|
|
||||||
<select name="genlist" size="1" style="color:white;background-color:black;font-size:13">
|
<select name="genlist" size="1" style="color:white;background-color:black;font-size:13px">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ $defaultPost = [
|
|||||||
'showMe' => true
|
'showMe' => true
|
||||||
];
|
];
|
||||||
$post = Json::decode(Util::getReq('data', 'string', '{}'));
|
$post = Json::decode(Util::getReq('data', 'string', '{}'));
|
||||||
|
$post += $defaultPost;
|
||||||
|
|
||||||
if(!$session->isGameLoggedIn()){
|
if(!$session->isGameLoggedIn()){
|
||||||
$post['neutralView'] = true;
|
$post['neutralView'] = true;
|
||||||
|
|||||||
+15
-2
@@ -38,11 +38,24 @@ $connect=$db->get();
|
|||||||
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
var defaultStatTotal = <?=GameConst::$defaultStatTotal?>;
|
||||||
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
var defaultStatMin = <?=GameConst::$defaultStatMin?>;
|
||||||
var defaultStatMax = <?=GameConst::$defaultStatMax?>;
|
var defaultStatMax = <?=GameConst::$defaultStatMax?>;
|
||||||
|
|
||||||
|
var charInfoText = <?php
|
||||||
|
|
||||||
|
$charInfoText = [];
|
||||||
|
for($i=0;$i<=9;$i++){
|
||||||
|
//XXX:하드코딩 금지!
|
||||||
|
$charInfoText[$i] = getCharInfo($i);
|
||||||
|
}
|
||||||
|
echo Json::encode((object)$charInfoText);
|
||||||
|
?>;
|
||||||
</script>
|
</script>
|
||||||
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/join.js')?>
|
<?=WebUtil::printJS('js/join.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -106,7 +119,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
|
|||||||
<tr>
|
<tr>
|
||||||
<td width=498 align=right id=bg1>성격</td>
|
<td width=498 align=right id=bg1>성격</td>
|
||||||
<td colspan=2>
|
<td colspan=2>
|
||||||
<select name=character size=1 maxlength=15 style=color:white;background-color:black;>
|
<select id="selChar" name=character size=1 maxlength=15 style=color:white;background-color:black;>
|
||||||
<option selected value=11>????</option>
|
<option selected value=11>????</option>
|
||||||
<!--
|
<!--
|
||||||
<option value=10>은둔</option>
|
<option value=10>은둔</option>
|
||||||
@@ -121,7 +134,7 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
|
|||||||
<option value=2>의협</option>
|
<option value=2>의협</option>
|
||||||
<option value=1>대의</option>
|
<option value=1>대의</option>
|
||||||
<option value=0>왕좌</option>
|
<option value=0>왕좌</option>
|
||||||
</select> ※보정은 도움말 참고
|
</select> <span id="charInfoText"></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
+10
-1
@@ -128,4 +128,13 @@ function getIconPath(imgsvr, picture){
|
|||||||
else{
|
else{
|
||||||
return pathConfig.root+'/d_pic/'+picture;
|
return pathConfig.root+'/d_pic/'+picture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jQuery(function($){
|
||||||
|
$('.obj_tooltip').tooltip({
|
||||||
|
title:function(){
|
||||||
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
|
},
|
||||||
|
html:true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ $(function() {
|
|||||||
var $name = $this.children('.i_name');
|
var $name = $this.children('.i_name');
|
||||||
$name.addClass('nameplate');
|
$name.addClass('nameplate');
|
||||||
|
|
||||||
var name = $name.find('.t_name').html();
|
var name = $name.find('.t_name').text();
|
||||||
|
|
||||||
var $work = $this.children('.i_action');
|
var $work = $this.children('.i_action');
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -150,4 +150,17 @@ jQuery(function($){
|
|||||||
window.abilityLeadpow = abilityLeadpow;
|
window.abilityLeadpow = abilityLeadpow;
|
||||||
window.abilityLeadint = abilityLeadint;
|
window.abilityLeadint = abilityLeadint;
|
||||||
window.abilityPowint = abilityPowint;
|
window.abilityPowint = abilityPowint;
|
||||||
});
|
|
||||||
|
var $charInfoText = $('#charInfoText');
|
||||||
|
var $selChar = $('#selChar');
|
||||||
|
$selChar.change(function(){
|
||||||
|
var $this = $(this);
|
||||||
|
var char = $this.val();
|
||||||
|
if(char in charInfoText){
|
||||||
|
$charInfoText.html(charInfoText[char]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$charInfoText.html('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
+1
-13
@@ -119,23 +119,11 @@ function reloadWorldMap(option){
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertSpyList(arr){
|
|
||||||
var result = [];
|
|
||||||
arr.forEach(function(v){
|
|
||||||
var cityId = (v / 10) | 0;
|
|
||||||
var spy = v % 10;
|
|
||||||
result[cityId] = spy;
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var cityList = obj.cityList.map(toCityObj);
|
var cityList = obj.cityList.map(toCityObj);
|
||||||
var nationList = obj.nationList.map(toNationObj);
|
var nationList = obj.nationList.map(toNationObj);
|
||||||
nationList = convertDictById(nationList); //array of object -> dict
|
nationList = convertDictById(nationList); //array of object -> dict
|
||||||
|
|
||||||
var spyList = convertSpyList(obj.spyList);//Array -> Dict
|
var spyList = obj.spyList;
|
||||||
var shownByGeneralList = convertSet(obj.shownByGeneralList);//Array -> Set
|
var shownByGeneralList = convertSet(obj.shownByGeneralList);//Array -> Set
|
||||||
|
|
||||||
var myCity = obj.myCity;
|
var myCity = obj.myCity;
|
||||||
|
|||||||
+1
-1
@@ -128,7 +128,7 @@ function redrawMsg(deferred){
|
|||||||
var $msgs = msgSource.map(function(msg){
|
var $msgs = msgSource.map(function(msg){
|
||||||
|
|
||||||
var contactTarget = (msg.src.id != myGeneralID) ? msg.src.id : msg.dest.id;
|
var contactTarget = (msg.src.id != myGeneralID) ? msg.src.id : msg.dest.id;
|
||||||
if(needRefreshLastContact && contactTarget != myGeneralID)
|
if(needRefreshLastContact && contactTarget != myGeneralID && contactTarget in generalList)
|
||||||
{
|
{
|
||||||
needRefreshLastContact = false;
|
needRefreshLastContact = false;
|
||||||
$('#last_contact').val(contactTarget).html(generalList[contactTarget].textName).show();
|
$('#last_contact').val(contactTarget).html(generalList[contactTarget].textName).show();
|
||||||
|
|||||||
+35
-1
@@ -3,11 +3,19 @@ var templateGeneralCard =
|
|||||||
<h4 class="bg1 with_border"><%name%></h4>\
|
<h4 class="bg1 with_border"><%name%></h4>\
|
||||||
<h4><img src="<%iconPath%>" height=64 width=64></h4>\
|
<h4><img src="<%iconPath%>" height=64 width=64></h4>\
|
||||||
<p><%leader%> / <%power%> / <%intel%><br>\
|
<p><%leader%> / <%power%> / <%intel%><br>\
|
||||||
<%special%> / <%special2%></p>\
|
<%specialText%> / <%special2Text%></p>\
|
||||||
<button type="subject" class="with_skin with_border select_btn" value="<%no%>" name="pick">빙의하기</button>\
|
<button type="subject" class="with_skin with_border select_btn" value="<%no%>" name="pick">빙의하기</button>\
|
||||||
<label><input <%keepCnt?"":disabled="disabled"%> type="checkbox" value="<%no%>" name="keep[]" class="keep_select">보관(<%keepCnt%>회)</label>\
|
<label><input <%keepCnt?"":disabled="disabled"%> type="checkbox" value="<%no%>" name="keep[]" class="keep_select">보관(<%keepCnt%>회)</label>\
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
var templateSpecial =
|
||||||
|
'<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><%text%>\
|
||||||
|
<span class="tooltiptext">\
|
||||||
|
<%info%>\
|
||||||
|
</span>\
|
||||||
|
</span>\
|
||||||
|
';
|
||||||
|
|
||||||
function pickGeneral(){
|
function pickGeneral(){
|
||||||
$btn = $(this);
|
$btn = $(this);
|
||||||
|
|
||||||
@@ -85,12 +93,38 @@ function printGenerals(value){
|
|||||||
|
|
||||||
$.each(pick, function(idx, cardData){
|
$.each(pick, function(idx, cardData){
|
||||||
cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture);
|
cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture);
|
||||||
|
if(cardData.special in specialInfo){
|
||||||
|
cardData.specialText = TemplateEngine(templateSpecial, {
|
||||||
|
text:cardData.special,
|
||||||
|
info:specialInfo[cardData.special]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
cardData.specialText = cardData.special;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cardData.special2 in specialInfo){
|
||||||
|
cardData.special2Text = TemplateEngine(templateSpecial, {
|
||||||
|
text:cardData.special2,
|
||||||
|
info:specialInfo[cardData.special2]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
cardData.special2Text = cardData.special2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var $card = $(TemplateEngine(templateGeneralCard, cardData));
|
var $card = $(TemplateEngine(templateGeneralCard, cardData));
|
||||||
console.log($card);
|
console.log($card);
|
||||||
|
|
||||||
$('.card_holder').append($card);
|
$('.card_holder').append($card);
|
||||||
$card.find('.select_btn').click(pickGeneral);
|
$card.find('.select_btn').click(pickGeneral);
|
||||||
|
$card.find('.obj_tooltip').tooltip({
|
||||||
|
title:function(){
|
||||||
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
|
},
|
||||||
|
html:true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
updatePickMoreTimer();
|
updatePickMoreTimer();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div
|
<div
|
||||||
class="msg_plate msg_plate_<%msgType%> msg_plate_<%nationType%>""
|
class="msg_plate msg_plate_<%msgType%> msg_plate_<%nationType%>"
|
||||||
id="msg_<%id%>"
|
id="msg_<%id%>"
|
||||||
data-id="<%id%>"
|
data-id="<%id%>"
|
||||||
>
|
>
|
||||||
|
|||||||
+2
-1
@@ -125,6 +125,7 @@ function starter($name, $type=0) {
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/base_map.js')?>
|
<?=WebUtil::printJS('js/base_map.js')?>
|
||||||
@@ -144,7 +145,7 @@ $(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/main.css')?>
|
<?=WebUtil::printCSS('css/main.css')?>
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ class CityConst{
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach(static::$initCity as $rawCity){
|
foreach(static::$initCity as $rawCity){
|
||||||
list(
|
[
|
||||||
$id,
|
$id,
|
||||||
$name,
|
$name,
|
||||||
$level,
|
$level,
|
||||||
@@ -198,7 +198,7 @@ class CityConst{
|
|||||||
$wall,
|
$wall,
|
||||||
$region,
|
$region,
|
||||||
$path
|
$path
|
||||||
) = $rawCity;
|
] = $rawCity;
|
||||||
|
|
||||||
$level = static::$levelMap[$level];
|
$level = static::$levelMap[$level];
|
||||||
$population *= 100;
|
$population *= 100;
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ class Diplomacy{
|
|||||||
$chk = $this->checkValidNation();
|
$chk = $this->checkValidNation();
|
||||||
$chk = $this->checkNonAggressionTreaty($chk);
|
$chk = $this->checkNonAggressionTreaty($chk);
|
||||||
|
|
||||||
list($result, $reason) = $chk;
|
[$result, $reason] = $chk;
|
||||||
if($result !== DiplomaticMessage::ACCEPTED){
|
if($result !== DiplomaticMessage::ACCEPTED){
|
||||||
return $chk;
|
return $chk;
|
||||||
}
|
}
|
||||||
@@ -322,7 +322,7 @@ class Diplomacy{
|
|||||||
$chk = $this->checkValidNation();
|
$chk = $this->checkValidNation();
|
||||||
$chk = $this->checkInWar($chk);
|
$chk = $this->checkInWar($chk);
|
||||||
|
|
||||||
list($result, $reason) = $chk;
|
[$result, $reason] = $chk;
|
||||||
if($result !== DiplomaticMessage::ACCEPTED){
|
if($result !== DiplomaticMessage::ACCEPTED){
|
||||||
return $chk;
|
return $chk;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ class Personnel{
|
|||||||
$this->nation = $nation;
|
$this->nation = $nation;
|
||||||
$this->valid = true;
|
$this->valid = true;
|
||||||
|
|
||||||
list(
|
[
|
||||||
$this->startYear,
|
$this->startYear,
|
||||||
$this->year,
|
$this->year,
|
||||||
$this->month,
|
$this->month,
|
||||||
$this->killturn
|
$this->killturn
|
||||||
) = $gameStor->getValuesAsArray(['startyear', 'year', 'month', 'killturn']);
|
] = $gameStor->getValuesAsArray(['startyear', 'year', 'month', 'killturn']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class ResetHelper{
|
|||||||
$year = $startyear;
|
$year = $startyear;
|
||||||
} else {
|
} else {
|
||||||
// 현재 시간과 동기화
|
// 현재 시간과 동기화
|
||||||
list($starttime, $yearPulled, $month) = cutDay($turntime, $turnterm);
|
[$starttime, $yearPulled, $month] = cutDay($turntime, $turnterm);
|
||||||
if($yearPulled){
|
if($yearPulled){
|
||||||
$year = $startyear-1;
|
$year = $startyear-1;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-2
@@ -27,15 +27,36 @@ $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=1024" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<?=WebUtil::printCSS('css/normalize.css')?>
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
<?=WebUtil::printCSS('../css/config.css')?>
|
<?=WebUtil::printCSS('../css/config.css')?>
|
||||||
<?=WebUtil::printCSS('css/common.css')?>
|
<?=WebUtil::printCSS('css/common.css')?>
|
||||||
<?=WebUtil::printCSS('css/select_npc.css')?>
|
<?=WebUtil::printCSS('css/select_npc.css')?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var specialInfo =
|
||||||
|
<?php
|
||||||
|
$specialAll = [];
|
||||||
|
foreach (SpecialityConst::DOMESTIC as $id=>$values) {
|
||||||
|
$name = $values[0];
|
||||||
|
$text = getSpecialInfo($id);
|
||||||
|
$specialAll[$name] = $text;
|
||||||
|
}
|
||||||
|
foreach (SpecialityConst::WAR as $id=>$values) {
|
||||||
|
$name = $values[0];
|
||||||
|
$text = getSpecialInfo($id);
|
||||||
|
$specialAll[$name] = $text;
|
||||||
|
}
|
||||||
|
$specialAll['-'] = '없음';
|
||||||
|
echo Json::encode($specialAll);
|
||||||
|
?>
|
||||||
|
;
|
||||||
|
</script>
|
||||||
|
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
<?=WebUtil::printJS('../e_lib/jquery-3.3.1.min.js')?>
|
||||||
<?=WebUtil::printJS('../js/common.js')?>
|
<?=WebUtil::printJS('../e_lib/bootstrap.bundle.min.js')?>
|
||||||
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<?=WebUtil::printJS('js/select_npc.js')?>
|
<?=WebUtil::printJS('js/select_npc.js')?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+1
-1
@@ -199,7 +199,7 @@ CREATE TABLE `nation` (
|
|||||||
`tech` INT(8) NULL DEFAULT '0',
|
`tech` INT(8) NULL DEFAULT '0',
|
||||||
`totaltech` INT(8) NULL DEFAULT '0',
|
`totaltech` INT(8) NULL DEFAULT '0',
|
||||||
`power` INT(8) NULL DEFAULT '0',
|
`power` INT(8) NULL DEFAULT '0',
|
||||||
`spy` CHAR(255) NULL DEFAULT '',
|
`spy` CHAR(255) NOT NULL DEFAULT '{}',
|
||||||
`level` INT(1) NULL DEFAULT '0',
|
`level` INT(1) NULL DEFAULT '0',
|
||||||
`type` INT(2) NULL DEFAULT '0',
|
`type` INT(2) NULL DEFAULT '0',
|
||||||
`rule` TEXT NULL DEFAULT '',
|
`rule` TEXT NULL DEFAULT '',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="rankView bg0" style="border:1px solid gray;">
|
<div class="rankView bg0" style="outline-style:solid;outline-width:1px;outline-color: gray;">
|
||||||
<h3 class="rankType bg1"><?=$typeName?></h3>
|
<h3 class="rankType bg1"><?=$typeName?></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($generals as $rank=>$general): ?><li class='<?=(key_exists("rankName", $general))?'no_value':''?> <?=(key_exists("serverName", $general))?'has_server':''?>'>
|
<?php foreach($generals as $rank=>$general): ?><li class='<?=(key_exists("rankName", $general))?'no_value':''?> <?=(key_exists("serverName", $general))?'has_server':''?>'>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="hall_img"><img width="64" height="64" src="<?=$general['pictureFullPath']?>"></div>
|
<div class="hall_img"><img width="64" height="64" src="<?=$general['pictureFullPath']?>"></div>
|
||||||
<?php if(key_exists("serverName",$general)): ?>
|
<?php if(key_exists("serverName",$general)): ?>
|
||||||
<div class="hall_server tooltip"><?=$general['serverName']?><?=$general['serverIdx']?>기
|
<div class="hall_server obj_tooltip" data-toggle="tooltip" data-placement="top"><?=$general['serverName']?><?=$general['serverIdx']?>기
|
||||||
<span class="tooltiptext">
|
<span class="tooltiptext">
|
||||||
<?=$general['scenarioName']?><br>
|
<?=$general['scenarioName']?><br>
|
||||||
<?=substr($general['startTime'], 0, 10)?> ~ <?=substr($general['unitedTime'], 0, 10)?>
|
<?=substr($general['startTime'], 0, 10)?> ~ <?=substr($general['unitedTime'], 0, 10)?>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><?=$text??''?>
|
||||||
|
<span class="tooltiptext">
|
||||||
|
<?=$info??''?>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
+15
-4
@@ -3,10 +3,11 @@ namespace sammo;
|
|||||||
|
|
||||||
class Json
|
class Json
|
||||||
{
|
{
|
||||||
const PRETTY = 1;
|
const PRETTY = 1 << 0;
|
||||||
const DELETE_NULL = 2;
|
const DELETE_NULL = 1 << 1;
|
||||||
const NO_CACHE = 4;
|
const NO_CACHE = 1 << 2;
|
||||||
const PASS_THROUGH = 8;
|
const PASS_THROUGH = 1 << 3;
|
||||||
|
const EMPTY_ARRAY_IS_DICT = 1 << 4;
|
||||||
|
|
||||||
public static function encode($value, $flag = 0)
|
public static function encode($value, $flag = 0)
|
||||||
{
|
{
|
||||||
@@ -17,6 +18,10 @@ class Json
|
|||||||
if ($flag & static::DELETE_NULL) {
|
if ($flag & static::DELETE_NULL) {
|
||||||
$value = Util::eraseNullValue($value);
|
$value = Util::eraseNullValue($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(($flag & static::EMPTY_ARRAY_IS_DICT) && $value === []){
|
||||||
|
$value = (object)null;
|
||||||
|
}
|
||||||
return json_encode($value, $rawFlag);
|
return json_encode($value, $rawFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,6 +30,12 @@ class Json
|
|||||||
return json_decode($value, true);
|
return json_decode($value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function decodeObj($value){
|
||||||
|
//NOTE: 구 코드가 모두 '배열'을 가정하기 때문에 decode는 연관배열로 반환하였으나,
|
||||||
|
//호환을 위해서는object로 반환하는 것이 더 나을것
|
||||||
|
return json_decode($value);
|
||||||
|
}
|
||||||
|
|
||||||
public static function die($value, $flag = self::NO_CACHE)
|
public static function die($value, $flag = self::NO_CACHE)
|
||||||
{
|
{
|
||||||
//NOTE: REST 형식에 맞게, ok(), fail()로 쪼개는게 낫지 않을까 생각해봄.
|
//NOTE: REST 형식에 맞게, ok(), fail()로 쪼개는게 낫지 않을까 생각해봄.
|
||||||
|
|||||||
@@ -160,6 +160,9 @@ class Util extends \utilphp\util
|
|||||||
if ($val == null) {
|
if ($val == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if ($val == ''){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return intval($val);
|
return intval($val);
|
||||||
}
|
}
|
||||||
throw new \InvalidArgumentException('올바르지 않은 타입형 :'.$val);
|
throw new \InvalidArgumentException('올바르지 않은 타입형 :'.$val);
|
||||||
|
|||||||
Reference in New Issue
Block a user