Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83d6a2169b | ||
|
|
21e7a4d966 | ||
|
|
404cd24855 | ||
|
|
b4ad72ee67 | ||
|
|
bea628b619 | ||
|
|
3637e54982 | ||
|
|
e0d1a0a612 | ||
|
|
3040996671 | ||
|
|
dd830e7500 | ||
|
|
d2dfe2c418 | ||
|
|
139fb6b6e0 | ||
|
|
c4f6976c42 | ||
|
|
ab428fc104 | ||
|
|
aa97f78acd | ||
|
|
dbce900aeb | ||
|
|
30b382e2e7 | ||
|
|
433c4abb86 | ||
|
|
64404e4092 | ||
|
|
08d483af8a | ||
|
|
fa19c17941 | ||
|
|
c896a999ad | ||
|
|
f9bca935ac | ||
|
|
7abf274d89 | ||
|
|
e2ad417306 | ||
|
|
2ea9655f6b | ||
|
|
f450d5d9de | ||
|
|
f8f4b73a09 | ||
|
|
926d96732d | ||
|
|
167113d6a3 | ||
|
|
911cb614a5 | ||
|
|
7a939b7024 | ||
|
|
6e57a60997 | ||
|
|
9f1151e699 | ||
|
|
3fbe1fb63d | ||
|
|
d4906eec5a | ||
|
|
ebe0663e74 | ||
|
|
04c89b9711 | ||
|
|
4f2bc874e5 | ||
|
|
316ac5c3c8 | ||
|
|
7882aa667e | ||
|
|
8b8d5eecbf | ||
|
|
65b76643ee | ||
|
|
f33e645113 | ||
|
|
528d30c317 | ||
|
|
7f0a3d320c | ||
|
|
8e940aeb65 | ||
|
|
a77ee60809 | ||
|
|
83383c29cd | ||
|
|
b6393141e8 | ||
|
|
10ce1827d8 | ||
|
|
605f3a12ff | ||
|
|
a33539e75f | ||
|
|
b2cca3687a | ||
|
|
628c54044f | ||
|
|
c0e7a3eece | ||
|
|
c7c13c19c1 | ||
|
|
d5f71b5878 | ||
|
|
cb589e9e26 | ||
|
|
eaeed47297 | ||
|
|
e00e5c5cd7 | ||
|
|
b3719f7166 | ||
|
|
337896974b | ||
|
|
bb7d1fc9ab | ||
|
|
07765c8d44 | ||
|
|
85cb91071e | ||
|
|
d41839845a | ||
|
|
c3d12aa55f | ||
|
|
a781e4b84c | ||
|
|
1fc0989fd2 | ||
|
|
14752260d3 | ||
|
|
84675c874f | ||
|
|
f30e6057be | ||
|
|
ba8b629f0e | ||
|
|
a0a45ff2aa | ||
|
|
325f890a0b | ||
|
|
923cac5408 | ||
|
|
23505326c7 | ||
|
|
5f1a48f523 | ||
|
|
a607d39030 | ||
|
|
96d108729e | ||
|
|
ef15adaaf8 | ||
|
|
f190b74a7e | ||
|
|
edbc2b88b6 | ||
|
|
dc000cecf1 | ||
|
|
7c95a483df | ||
|
|
27e5d73da1 | ||
|
|
6306dae92d | ||
|
|
a427ddff83 | ||
|
|
b62ee6e820 | ||
|
|
3c18666080 | ||
|
|
40968b301a | ||
|
|
05904d31fd | ||
|
|
75aeaf4ee7 | ||
|
|
ff4e67a9f6 | ||
|
|
5f672d5bd1 | ||
|
|
5cb39eba8b | ||
|
|
4d8c3c75d6 | ||
|
|
8bdd19fc06 | ||
|
|
0ec99d8ba1 | ||
|
|
929d2db5a5 | ||
|
|
a7ad77f433 | ||
|
|
9cd47d5deb | ||
|
|
3cb5691aae | ||
|
|
dce63919fa | ||
|
|
1cdbedcb96 | ||
|
|
1586712ce5 | ||
|
|
f059186494 | ||
|
|
0af0be57b0 | ||
|
|
dad2b03212 | ||
|
|
b6e307660f | ||
|
|
c21c14825a | ||
|
|
39f9c986e9 | ||
|
|
393683aebc | ||
|
|
a87fcb44a6 | ||
|
|
0a6496ddfb | ||
|
|
fa2841fac6 | ||
|
|
861e45419b | ||
|
|
15fd943456 | ||
|
|
b538bfc27e | ||
|
|
e0f32eddc4 | ||
|
|
75a704c196 | ||
|
|
6565fdbe7e | ||
|
|
6248d72852 | ||
|
|
00d1797b96 | ||
|
|
911194eba8 | ||
|
|
0fad3ae31d | ||
|
|
b6988d866a | ||
|
|
e30959a656 | ||
|
|
52eeff3466 | ||
|
|
a06ded552d | ||
|
|
e9b8a84243 | ||
|
|
1fc3cfd1f2 |
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"@babel/preset-env",
|
||||||
|
{
|
||||||
|
"targets": {
|
||||||
|
"browsers": [
|
||||||
|
"last 2 versions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"modules":false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"lodash"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
"project": "./tsconfig.json"
|
||||||
|
},
|
||||||
|
ignorePatterns: ['*.test.ts', '.eslintrc.js', 'webpack.config.js', '*.js'],
|
||||||
|
overrides: [{
|
||||||
|
files: ['*.ts', '*.tsx'],
|
||||||
|
}],
|
||||||
|
plugins: [
|
||||||
|
"@typescript-eslint",
|
||||||
|
],
|
||||||
|
extends: [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended"
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-floating-promises': 'error',
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
-1
@@ -4,7 +4,8 @@
|
|||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
/node_modules
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
|
||||||
# 체섭 ignore
|
# 체섭 ignore
|
||||||
@@ -29,12 +30,15 @@ d_shared
|
|||||||
d_pic/*.jpg
|
d_pic/*.jpg
|
||||||
d_pic/*.gif
|
d_pic/*.gif
|
||||||
d_pic/*.png
|
d_pic/*.png
|
||||||
|
d_pic/*.webp
|
||||||
d_pic/uploaded_image
|
d_pic/uploaded_image
|
||||||
|
|
||||||
d_setting/*.php
|
d_setting/*.php
|
||||||
*/d_setting/*.php
|
*/d_setting/*.php
|
||||||
*/d_setting/templates/*.php
|
*/d_setting/templates/*.php
|
||||||
|
|
||||||
|
*/data/file_cache
|
||||||
|
|
||||||
**/old/*
|
**/old/*
|
||||||
test.php
|
test.php
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ return [
|
|||||||
'f_config/config.php',
|
'f_config/config.php',
|
||||||
'hwe/a_bestGeneral.php',
|
'hwe/a_bestGeneral.php',
|
||||||
'hwe/a_emperior.php',
|
'hwe/a_emperior.php',
|
||||||
'hwe/a_emperior2.php',
|
|
||||||
'hwe/a_emperior_detail.php',
|
'hwe/a_emperior_detail.php',
|
||||||
'hwe/a_genList.php',
|
'hwe/a_genList.php',
|
||||||
'hwe/a_hallOfFame.php',
|
'hwe/a_hallOfFame.php',
|
||||||
|
|||||||
@@ -9,18 +9,18 @@
|
|||||||
* <code>mpm_event</code> 권장
|
* <code>mpm_event</code> 권장
|
||||||
* PHP 7.3 이상
|
* PHP 7.3 이상
|
||||||
* <code>php-fpm</code> 권장
|
* <code>php-fpm</code> 권장
|
||||||
* php에서 curl, pdo-sqlite을 실행가능해야 합니다. (기본값: 지원)
|
* php에서 curl, pdo-sqlite을 실행가능해야 합니다.
|
||||||
* mysqlnd가 지원되어야합니다. (기본값: 지원)
|
* mysqli, mysqlnd
|
||||||
* mysqli
|
|
||||||
* gd
|
* gd
|
||||||
|
* mbstring
|
||||||
* MariaDB 10.2.1 이상
|
* MariaDB 10.2.1 이상
|
||||||
* 현재 MySQL은 지원하지 않습니다.
|
* 현재 MySQL은 지원하지 않습니다.
|
||||||
* <code>git</code>
|
* <code>git</code>
|
||||||
* <code>curl</code>
|
* <code>curl</code>
|
||||||
|
|
||||||
Linux는 Ubuntu 16.04, 18.04, Windows는 Windows 10에서 XAMPP를 사용한 환경에서 테스트되었습니다.
|
Linux는 Ubuntu 18.04, 20.04, Windows는 Windows 10에서 XAMPP, WSL2를 사용한 환경에서 테스트되었습니다.
|
||||||
|
|
||||||
Docker를 이용한 설치는 계획중입니다.
|
Docker를 이용한 설치는 테스트버전만 제공됩니다.
|
||||||
|
|
||||||
## Docker를 이용한 설치
|
## Docker를 이용한 설치
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -26,8 +26,9 @@
|
|||||||
"ezyang/htmlpurifier": "^4.10",
|
"ezyang/htmlpurifier": "^4.10",
|
||||||
"xemlock/htmlpurifier-html5": "^0.1.7",
|
"xemlock/htmlpurifier-html5": "^0.1.7",
|
||||||
"catfan/medoo": "^1.5",
|
"catfan/medoo": "^1.5",
|
||||||
"phan/phan": "^2.7",
|
"phan/phan": "*",
|
||||||
"erusev/parsedown-extra": "^0.8.1"
|
"erusev/parsedown-extra": "^0.8.1",
|
||||||
|
"nette/caching": "^3.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
Generated
+1364
-271
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "1c2e0182ebdf9bfe795e52a5d7fc6abd",
|
"content-hash": "2aeb036fc53a6fdc343bd2707d4697ee",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brandonwamboldt/utilphp",
|
"name": "brandonwamboldt/utilphp",
|
||||||
@@ -50,20 +50,24 @@
|
|||||||
"php",
|
"php",
|
||||||
"utility"
|
"utility"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/brandonwamboldt/utilphp/issues",
|
||||||
|
"source": "https://github.com/brandonwamboldt/utilphp/tree/master"
|
||||||
|
},
|
||||||
"time": "2015-02-02T17:56:14+00:00"
|
"time": "2015-02-02T17:56:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "catfan/medoo",
|
"name": "catfan/medoo",
|
||||||
"version": "v1.7.8",
|
"version": "v1.7.10",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/catfan/Medoo.git",
|
"url": "https://github.com/catfan/Medoo.git",
|
||||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d"
|
"reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/catfan/Medoo/zipball/dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
"url": "https://api.github.com/repos/catfan/Medoo/zipball/2d675f73e23f63bbaeb9a8aa33318659a3d3c32f",
|
||||||
"reference": "dd9d570584cfb1e09ec470608479b86e41d5b60d",
|
"reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -110,32 +114,37 @@
|
|||||||
"sql",
|
"sql",
|
||||||
"sqlite"
|
"sqlite"
|
||||||
],
|
],
|
||||||
"time": "2019-12-19T05:04:34+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/catfan/Medoo/issues",
|
||||||
|
"source": "https://github.com/catfan/Medoo"
|
||||||
|
},
|
||||||
|
"time": "2020-02-11T08:20:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "composer/semver",
|
"name": "composer/semver",
|
||||||
"version": "1.5.1",
|
"version": "3.2.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/composer/semver.git",
|
"url": "https://github.com/composer/semver.git",
|
||||||
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
|
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
|
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
|
||||||
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
|
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.3.2 || ^7.0"
|
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.5 || ^5.0.5"
|
"phpstan/phpstan": "^0.12.54",
|
||||||
|
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.x-dev"
|
"dev-main": "3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -171,28 +180,48 @@
|
|||||||
"validation",
|
"validation",
|
||||||
"versioning"
|
"versioning"
|
||||||
],
|
],
|
||||||
"time": "2020-01-13T12:06:48+00:00"
|
"support": {
|
||||||
|
"irc": "irc://irc.freenode.org/composer",
|
||||||
|
"issues": "https://github.com/composer/semver/issues",
|
||||||
|
"source": "https://github.com/composer/semver/tree/3.2.5"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://packagist.com",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/composer",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-24T12:41:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "composer/xdebug-handler",
|
"name": "composer/xdebug-handler",
|
||||||
"version": "1.4.1",
|
"version": "2.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/composer/xdebug-handler.git",
|
"url": "https://github.com/composer/xdebug-handler.git",
|
||||||
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
|
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
|
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
|
||||||
"reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
|
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.3.2 || ^7.0 || ^8.0",
|
"php": "^5.3.2 || ^7.0 || ^8.0",
|
||||||
"psr/log": "^1.0"
|
"psr/log": "^1 || ^2 || ^3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
|
"phpstan/phpstan": "^0.12.55",
|
||||||
|
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -215,7 +244,26 @@
|
|||||||
"Xdebug",
|
"Xdebug",
|
||||||
"performance"
|
"performance"
|
||||||
],
|
],
|
||||||
"time": "2020-03-01T12:26:26+00:00"
|
"support": {
|
||||||
|
"irc": "irc://irc.freenode.org/composer",
|
||||||
|
"issues": "https://github.com/composer/xdebug-handler/issues",
|
||||||
|
"source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://packagist.com",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/composer",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-07-31T17:03:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "erusev/parsedown",
|
"name": "erusev/parsedown",
|
||||||
@@ -261,6 +309,10 @@
|
|||||||
"markdown",
|
"markdown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/erusev/parsedown/issues",
|
||||||
|
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
||||||
|
},
|
||||||
"time": "2019-12-30T22:54:17+00:00"
|
"time": "2019-12-30T22:54:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -308,20 +360,24 @@
|
|||||||
"parsedown",
|
"parsedown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/erusev/parsedown-extra/issues",
|
||||||
|
"source": "https://github.com/erusev/parsedown-extra/tree/0.8.x"
|
||||||
|
},
|
||||||
"time": "2019-12-30T23:20:37+00:00"
|
"time": "2019-12-30T23:20:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ezyang/htmlpurifier",
|
"name": "ezyang/htmlpurifier",
|
||||||
"version": "v4.12.0",
|
"version": "v4.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03"
|
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03",
|
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
|
||||||
"reference": "a617e55bc62a87eec73bd456d146d134ad716f03",
|
"reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -337,6 +393,9 @@
|
|||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"library/HTMLPurifier.composer.php"
|
"library/HTMLPurifier.composer.php"
|
||||||
|
],
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/library/HTMLPurifier/Language/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@@ -355,29 +414,33 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"html"
|
"html"
|
||||||
],
|
],
|
||||||
"time": "2019-10-28T03:44:26+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/ezyang/htmlpurifier/issues",
|
||||||
|
"source": "https://github.com/ezyang/htmlpurifier/tree/master"
|
||||||
|
},
|
||||||
|
"time": "2020-06-29T00:56:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "felixfbecker/advanced-json-rpc",
|
"name": "felixfbecker/advanced-json-rpc",
|
||||||
"version": "v3.1.1",
|
"version": "v3.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
|
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
|
||||||
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40"
|
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40",
|
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447",
|
||||||
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40",
|
"reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"netresearch/jsonmapper": "^1.0 || ^2.0",
|
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0",
|
||||||
"php": ">=7.0",
|
"php": "^7.1 || ^8.0",
|
||||||
"phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
|
"phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^6.0.0"
|
"phpunit/phpunit": "^7.0 || ^8.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -396,7 +459,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A more advanced JSONRPC implementation",
|
"description": "A more advanced JSONRPC implementation",
|
||||||
"time": "2020-03-11T15:21:41+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues",
|
||||||
|
"source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1"
|
||||||
|
},
|
||||||
|
"time": "2021-06-11T22:34:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "firephp/firephp-core",
|
"name": "firephp/firephp-core",
|
||||||
@@ -432,27 +499,33 @@
|
|||||||
],
|
],
|
||||||
"description": "Traditional FirePHPCore library for sending PHP variables to the browser.",
|
"description": "Traditional FirePHPCore library for sending PHP variables to the browser.",
|
||||||
"homepage": "https://github.com/firephp/firephp-core",
|
"homepage": "https://github.com/firephp/firephp-core",
|
||||||
|
"support": {
|
||||||
|
"forum": "http://groups.google.com/group/firephp-dev",
|
||||||
|
"issues": "https://github.com/firephp/firephp-core/issues",
|
||||||
|
"source": "https://github.com/firephp/firephp-core"
|
||||||
|
},
|
||||||
"time": "2013-04-23T15:28:20+00:00"
|
"time": "2013-04-23T15:28:20+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
"version": "6.5.2",
|
"version": "6.5.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
"url": "https://github.com/guzzle/guzzle.git",
|
||||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82"
|
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82",
|
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||||
"reference": "43ece0e75098b7ecd8d13918293029e555a50f82",
|
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"guzzlehttp/promises": "^1.0",
|
"guzzlehttp/promises": "^1.0",
|
||||||
"guzzlehttp/psr7": "^1.6.1",
|
"guzzlehttp/psr7": "^1.6.1",
|
||||||
"php": ">=5.5"
|
"php": ">=5.5",
|
||||||
|
"symfony/polyfill-intl-idn": "^1.17.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
@@ -460,7 +533,6 @@
|
|||||||
"psr/log": "^1.1"
|
"psr/log": "^1.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
|
||||||
"psr/log": "Required for using the Log middleware"
|
"psr/log": "Required for using the Log middleware"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@@ -499,27 +571,31 @@
|
|||||||
"rest",
|
"rest",
|
||||||
"web service"
|
"web service"
|
||||||
],
|
],
|
||||||
"time": "2019-12-23T11:57:10+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||||
|
"source": "https://github.com/guzzle/guzzle/tree/6.5"
|
||||||
|
},
|
||||||
|
"time": "2020-06-16T21:01:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
"version": "v1.3.1",
|
"version": "1.4.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/promises.git",
|
"url": "https://github.com/guzzle/promises.git",
|
||||||
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
|
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||||
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
|
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.0"
|
"php": ">=5.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.0"
|
"symfony/phpunit-bridge": "^4.4 || ^5.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -550,20 +626,24 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"promise"
|
"promise"
|
||||||
],
|
],
|
||||||
"time": "2016-12-20T10:07:11+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/guzzle/promises/issues",
|
||||||
|
"source": "https://github.com/guzzle/promises/tree/1.4.1"
|
||||||
|
},
|
||||||
|
"time": "2021-03-07T09:25:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "1.6.1",
|
"version": "1.8.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
|
||||||
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -576,15 +656,15 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-zlib": "*",
|
"ext-zlib": "*",
|
||||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.6-dev"
|
"dev-master": "1.7-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -621,29 +701,33 @@
|
|||||||
"uri",
|
"uri",
|
||||||
"url"
|
"url"
|
||||||
],
|
],
|
||||||
"time": "2019-07-01T23:21:34+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
|
"source": "https://github.com/guzzle/psr7/tree/1.8.2"
|
||||||
|
},
|
||||||
|
"time": "2021-04-26T09:17:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/plates",
|
"name": "league/plates",
|
||||||
"version": "3.3.0",
|
"version": "v3.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/plates.git",
|
"url": "https://github.com/thephpleague/plates.git",
|
||||||
"reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af"
|
"reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/plates/zipball/b1684b6f127714497a0ef927ce42c0b44b45a8af",
|
"url": "https://api.github.com/repos/thephpleague/plates/zipball/6d3ee31199b536a4e003b34a356ca20f6f75496a",
|
||||||
"reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af",
|
"reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.3 | ^7.0"
|
"php": "^7.0|^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mikey179/vfsstream": "^1.4",
|
"mikey179/vfsstream": "^1.6",
|
||||||
"phpunit/phpunit": "~4.0",
|
"phpunit/phpunit": "^9.5",
|
||||||
"squizlabs/php_codesniffer": "~1.5"
|
"squizlabs/php_codesniffer": "^3.5"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -665,10 +749,15 @@
|
|||||||
"name": "Jonathan Reinink",
|
"name": "Jonathan Reinink",
|
||||||
"email": "jonathan@reinink.ca",
|
"email": "jonathan@reinink.ca",
|
||||||
"role": "Developer"
|
"role": "Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "RJ Garcia",
|
||||||
|
"email": "ragboyjr@icloud.com",
|
||||||
|
"role": "Developer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.",
|
"description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.",
|
||||||
"homepage": "http://platesphp.com",
|
"homepage": "https://platesphp.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"league",
|
"league",
|
||||||
"package",
|
"package",
|
||||||
@@ -676,27 +765,31 @@
|
|||||||
"templating",
|
"templating",
|
||||||
"views"
|
"views"
|
||||||
],
|
],
|
||||||
"time": "2016-12-28T00:14:17+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/thephpleague/plates/issues",
|
||||||
|
"source": "https://github.com/thephpleague/plates/tree/v3.4.0"
|
||||||
|
},
|
||||||
|
"time": "2020-12-25T05:00:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "microsoft/tolerant-php-parser",
|
"name": "microsoft/tolerant-php-parser",
|
||||||
"version": "v0.0.20",
|
"version": "v0.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/microsoft/tolerant-php-parser.git",
|
"url": "https://github.com/microsoft/tolerant-php-parser.git",
|
||||||
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4"
|
"reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
|
"url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/6a965617cf484355048ac6d2d3de7b6ec93abb16",
|
||||||
"reference": "c5e2bf5d8c9f4f27eef1370bd39ea2d1f374eeb4",
|
"reference": "6a965617cf484355048ac6d2d3de7b6ec93abb16",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^6.4"
|
"phpunit/phpunit": "^8.5.15"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -717,20 +810,24 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios",
|
"description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios",
|
||||||
"time": "2020-02-18T02:57:19+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/microsoft/tolerant-php-parser/issues",
|
||||||
|
"source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.1"
|
||||||
|
},
|
||||||
|
"time": "2021-07-16T21:28:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "1.25.3",
|
"version": "1.26.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Seldaek/monolog.git",
|
"url": "https://github.com/Seldaek/monolog.git",
|
||||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1"
|
"reference": "c6b00f05152ae2c9b04a448f99c7590beb6042f5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1",
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c6b00f05152ae2c9b04a448f99c7590beb6042f5",
|
||||||
"reference": "fa82921994db851a8becaf3787a9e73c5976b6f1",
|
"reference": "c6b00f05152ae2c9b04a448f99c7590beb6042f5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -744,11 +841,10 @@
|
|||||||
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
||||||
"doctrine/couchdb": "~1.0@dev",
|
"doctrine/couchdb": "~1.0@dev",
|
||||||
"graylog2/gelf-php": "~1.0",
|
"graylog2/gelf-php": "~1.0",
|
||||||
"jakub-onderka/php-parallel-lint": "0.9",
|
|
||||||
"php-amqplib/php-amqplib": "~2.4",
|
"php-amqplib/php-amqplib": "~2.4",
|
||||||
"php-console/php-console": "^3.1.3",
|
"php-console/php-console": "^3.1.3",
|
||||||
|
"phpstan/phpstan": "^0.12.59",
|
||||||
"phpunit/phpunit": "~4.5",
|
"phpunit/phpunit": "~4.5",
|
||||||
"phpunit/phpunit-mock-objects": "2.3.0",
|
|
||||||
"ruflin/elastica": ">=0.90 <3.0",
|
"ruflin/elastica": ">=0.90 <3.0",
|
||||||
"sentry/sentry": "^0.13",
|
"sentry/sentry": "^0.13",
|
||||||
"swiftmailer/swiftmailer": "^5.3|^6.0"
|
"swiftmailer/swiftmailer": "^5.3|^6.0"
|
||||||
@@ -767,11 +863,6 @@
|
|||||||
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Monolog\\": "src/Monolog"
|
"Monolog\\": "src/Monolog"
|
||||||
@@ -795,20 +886,34 @@
|
|||||||
"logging",
|
"logging",
|
||||||
"psr-3"
|
"psr-3"
|
||||||
],
|
],
|
||||||
"time": "2019-12-20T14:15:16+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||||
|
"source": "https://github.com/Seldaek/monolog/tree/1.26.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Seldaek",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-28T08:32:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "netresearch/jsonmapper",
|
"name": "netresearch/jsonmapper",
|
||||||
"version": "v2.1.0",
|
"version": "v4.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/cweiske/jsonmapper.git",
|
"url": "https://github.com/cweiske/jsonmapper.git",
|
||||||
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e"
|
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e",
|
"url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
|
||||||
"reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e",
|
"reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -816,10 +921,10 @@
|
|||||||
"ext-pcre": "*",
|
"ext-pcre": "*",
|
||||||
"ext-reflection": "*",
|
"ext-reflection": "*",
|
||||||
"ext-spl": "*",
|
"ext-spl": "*",
|
||||||
"php": ">=5.6"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0",
|
"phpunit/phpunit": "~7.5 || ~8.0 || ~9.0",
|
||||||
"squizlabs/php_codesniffer": "~3.5"
|
"squizlabs/php_codesniffer": "~3.5"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@@ -841,7 +946,235 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Map nested JSON structures onto PHP classes",
|
"description": "Map nested JSON structures onto PHP classes",
|
||||||
"time": "2020-04-16T18:48:43+00:00"
|
"support": {
|
||||||
|
"email": "cweiske@cweiske.de",
|
||||||
|
"issues": "https://github.com/cweiske/jsonmapper/issues",
|
||||||
|
"source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0"
|
||||||
|
},
|
||||||
|
"time": "2020-12-01T19:48:11+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nette/caching",
|
||||||
|
"version": "v3.1.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/nette/caching.git",
|
||||||
|
"reference": "3e771c589dee414724be473c24ad16dae50c1960"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/nette/caching/zipball/3e771c589dee414724be473c24ad16dae50c1960",
|
||||||
|
"reference": "3e771c589dee414724be473c24ad16dae50c1960",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"nette/finder": "^2.4 || ^3.0",
|
||||||
|
"nette/utils": "^2.4 || ^3.0",
|
||||||
|
"php": ">=7.2 <8.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"latte/latte": "^2.10",
|
||||||
|
"nette/di": "^v3.0",
|
||||||
|
"nette/tester": "^2.0",
|
||||||
|
"phpstan/phpstan": "^0.12",
|
||||||
|
"tracy/tracy": "^2.4"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-pdo_sqlite": "to use SQLiteStorage or SQLiteJournal"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"src/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"GPL-2.0-only",
|
||||||
|
"GPL-3.0-only"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "David Grudl",
|
||||||
|
"homepage": "https://davidgrudl.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nette Community",
|
||||||
|
"homepage": "https://nette.org/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.",
|
||||||
|
"homepage": "https://nette.org",
|
||||||
|
"keywords": [
|
||||||
|
"cache",
|
||||||
|
"journal",
|
||||||
|
"memcached",
|
||||||
|
"nette",
|
||||||
|
"sqlite"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/nette/caching/issues",
|
||||||
|
"source": "https://github.com/nette/caching/tree/v3.1.1"
|
||||||
|
},
|
||||||
|
"time": "2021-03-06T14:07:38+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nette/finder",
|
||||||
|
"version": "v2.5.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/nette/finder.git",
|
||||||
|
"reference": "4ad2c298eb8c687dd0e74ae84206a4186eeaed50"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/nette/finder/zipball/4ad2c298eb8c687dd0e74ae84206a4186eeaed50",
|
||||||
|
"reference": "4ad2c298eb8c687dd0e74ae84206a4186eeaed50",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"nette/utils": "^2.4 || ^3.0",
|
||||||
|
"php": ">=7.1"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"nette/nette": "<2.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"nette/tester": "^2.0",
|
||||||
|
"phpstan/phpstan": "^0.12",
|
||||||
|
"tracy/tracy": "^2.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.5-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"src/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"GPL-2.0",
|
||||||
|
"GPL-3.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "David Grudl",
|
||||||
|
"homepage": "https://davidgrudl.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nette Community",
|
||||||
|
"homepage": "https://nette.org/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "🔍 Nette Finder: find files and directories with an intuitive API.",
|
||||||
|
"homepage": "https://nette.org",
|
||||||
|
"keywords": [
|
||||||
|
"filesystem",
|
||||||
|
"glob",
|
||||||
|
"iterator",
|
||||||
|
"nette"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/nette/finder/issues",
|
||||||
|
"source": "https://github.com/nette/finder/tree/v2.5.2"
|
||||||
|
},
|
||||||
|
"time": "2020-01-03T20:35:40+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nette/utils",
|
||||||
|
"version": "v3.2.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/nette/utils.git",
|
||||||
|
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
|
||||||
|
"reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2 <8.1"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"nette/di": "<3.0.6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"nette/tester": "~2.0",
|
||||||
|
"phpstan/phpstan": "^0.12",
|
||||||
|
"tracy/tracy": "^2.3"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gd": "to use Image",
|
||||||
|
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
|
||||||
|
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
|
||||||
|
"ext-json": "to use Nette\\Utils\\Json",
|
||||||
|
"ext-mbstring": "to use Strings::lower() etc...",
|
||||||
|
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()",
|
||||||
|
"ext-xml": "to use Strings::length() etc. when mbstring is not available"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.2-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"src/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"GPL-2.0-only",
|
||||||
|
"GPL-3.0-only"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "David Grudl",
|
||||||
|
"homepage": "https://davidgrudl.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nette Community",
|
||||||
|
"homepage": "https://nette.org/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
||||||
|
"homepage": "https://nette.org",
|
||||||
|
"keywords": [
|
||||||
|
"array",
|
||||||
|
"core",
|
||||||
|
"datetime",
|
||||||
|
"images",
|
||||||
|
"json",
|
||||||
|
"nette",
|
||||||
|
"paginator",
|
||||||
|
"password",
|
||||||
|
"slugify",
|
||||||
|
"string",
|
||||||
|
"unicode",
|
||||||
|
"utf-8",
|
||||||
|
"utility",
|
||||||
|
"validation"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/nette/utils/issues",
|
||||||
|
"source": "https://github.com/nette/utils/tree/v3.2.2"
|
||||||
|
},
|
||||||
|
"time": "2021-03-03T22:53:25+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pguardiario/phpuri",
|
"name": "pguardiario/phpuri",
|
||||||
@@ -865,47 +1198,52 @@
|
|||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"description": "A php library for converting relative urls to absolute.",
|
"description": "A php library for converting relative urls to absolute.",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/monkeysuffrage/phpuri/issues",
|
||||||
|
"source": "https://github.com/monkeysuffrage/phpuri/tree/1.0.0"
|
||||||
|
},
|
||||||
"time": "2015-05-24T09:13:17+00:00"
|
"time": "2015-05-24T09:13:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phan/phan",
|
"name": "phan/phan",
|
||||||
"version": "2.7.1",
|
"version": "5.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phan/phan.git",
|
"url": "https://github.com/phan/phan.git",
|
||||||
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77"
|
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phan/phan/zipball/67c51bb1593e5c30271fc16d691b82e318b90b77",
|
"url": "https://api.github.com/repos/phan/phan/zipball/f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
|
||||||
"reference": "67c51bb1593e5c30271fc16d691b82e318b90b77",
|
"reference": "f36b6b9a2f4143a25f35ce94d712ceb0527e9d90",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"composer/semver": "^1.4",
|
"composer/semver": "^1.4|^2.0|^3.0",
|
||||||
"composer/xdebug-handler": "^1.3.2",
|
"composer/xdebug-handler": "^1.3.2|^2.0.0",
|
||||||
"ext-filter": "*",
|
"ext-filter": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-tokenizer": "*",
|
"ext-tokenizer": "*",
|
||||||
"felixfbecker/advanced-json-rpc": "^3.0.4",
|
"felixfbecker/advanced-json-rpc": "^3.0.4",
|
||||||
"microsoft/tolerant-php-parser": "0.0.20",
|
"microsoft/tolerant-php-parser": "^0.1.0",
|
||||||
"netresearch/jsonmapper": "^1.6.0|^2.0",
|
"netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0",
|
||||||
"php": "^7.1.0",
|
"php": "^7.2.0|^8.0.0",
|
||||||
"sabre/event": "^5.0",
|
"sabre/event": "^5.0.3",
|
||||||
"symfony/console": "^2.3|^3.0|^4.0|^5.0",
|
"symfony/console": "^3.2|^4.0|^5.0",
|
||||||
"symfony/polyfill-mbstring": "^1.11.0",
|
"symfony/polyfill-mbstring": "^1.11.0",
|
||||||
"symfony/polyfill-php72": "^1.15"
|
"symfony/polyfill-php80": "^1.20.0",
|
||||||
|
"tysonandre/var_representation_polyfill": "^0.0.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"brianium/paratest": "^4.0.0",
|
"phpunit/phpunit": "^8.5.0"
|
||||||
"phpunit/phpunit": "^7.5.0"
|
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.6+ is recommended.",
|
"ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.14+ is recommended.",
|
||||||
"ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
|
"ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
|
||||||
"ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",
|
"ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable",
|
||||||
"ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
|
"ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8",
|
||||||
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions."
|
"ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.",
|
||||||
|
"ext-var_representation": "Suggested for converting values to strings in issue messages"
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"phan",
|
"phan",
|
||||||
@@ -939,7 +1277,11 @@
|
|||||||
"php",
|
"php",
|
||||||
"static"
|
"static"
|
||||||
],
|
],
|
||||||
"time": "2020-04-12T01:25:29+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/phan/phan/issues",
|
||||||
|
"source": "https://github.com/phan/phan/tree/5.0.0"
|
||||||
|
},
|
||||||
|
"time": "2021-08-01T18:17:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "php-extended/php-system",
|
"name": "php-extended/php-system",
|
||||||
@@ -979,6 +1321,10 @@
|
|||||||
"php",
|
"php",
|
||||||
"system"
|
"system"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://gitlab.com/php-extended/php-system/issues",
|
||||||
|
"source": "https://gitlab.com/php-extended/php-system"
|
||||||
|
},
|
||||||
"time": "2018-06-07T06:03:27+00:00"
|
"time": "2018-06-07T06:03:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1023,29 +1369,33 @@
|
|||||||
"php",
|
"php",
|
||||||
"tail"
|
"tail"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://gitlab.com/php-extended/php-tail/issues",
|
||||||
|
"source": "https://gitlab.com/php-extended/php-tail"
|
||||||
|
},
|
||||||
"time": "2018-06-07T06:04:58+00:00"
|
"time": "2018-06-07T06:04:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-common",
|
"name": "phpdocumentor/reflection-common",
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
||||||
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
|
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
|
||||||
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
|
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": "^7.2 || ^8.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.x-dev"
|
"dev-2.x": "2.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1072,32 +1422,35 @@
|
|||||||
"reflection",
|
"reflection",
|
||||||
"static analysis"
|
"static analysis"
|
||||||
],
|
],
|
||||||
"time": "2020-04-27T09:25:28+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
|
||||||
|
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
|
||||||
|
},
|
||||||
|
"time": "2020-06-27T09:03:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-docblock",
|
"name": "phpdocumentor/reflection-docblock",
|
||||||
"version": "5.1.0",
|
"version": "5.2.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||||
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
|
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||||
"reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
|
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-filter": "^7.1",
|
"ext-filter": "*",
|
||||||
"php": "^7.2",
|
"php": "^7.2 || ^8.0",
|
||||||
"phpdocumentor/reflection-common": "^2.0",
|
"phpdocumentor/reflection-common": "^2.2",
|
||||||
"phpdocumentor/type-resolver": "^1.0",
|
"phpdocumentor/type-resolver": "^1.3",
|
||||||
"webmozart/assert": "^1"
|
"webmozart/assert": "^1.9.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/instantiator": "^1",
|
"mockery/mockery": "~1.3.2"
|
||||||
"mockery/mockery": "^1"
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -1125,34 +1478,37 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||||
"time": "2020-02-22T12:28:44+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
|
||||||
|
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
|
||||||
|
},
|
||||||
|
"time": "2020-09-03T19:13:55+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/type-resolver",
|
"name": "phpdocumentor/type-resolver",
|
||||||
"version": "1.1.0",
|
"version": "1.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||||
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
|
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
|
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||||
"reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
|
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2",
|
"php": "^7.2 || ^8.0",
|
||||||
"phpdocumentor/reflection-common": "^2.0"
|
"phpdocumentor/reflection-common": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-tokenizer": "^7.2",
|
"ext-tokenizer": "*"
|
||||||
"mockery/mockery": "~1"
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.x-dev"
|
"dev-1.x": "1.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1171,31 +1527,30 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||||
"time": "2020-02-18T18:59:58+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
|
||||||
|
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
|
||||||
|
},
|
||||||
|
"time": "2020-09-17T18:55:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/container",
|
"name": "psr/container",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/container.git",
|
"url": "https://github.com/php-fig/container.git",
|
||||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": ">=7.2.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Psr\\Container\\": "src/"
|
"Psr\\Container\\": "src/"
|
||||||
@@ -1208,7 +1563,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "http://www.php-fig.org/"
|
"homepage": "https://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||||
@@ -1220,7 +1575,11 @@
|
|||||||
"container-interop",
|
"container-interop",
|
||||||
"psr"
|
"psr"
|
||||||
],
|
],
|
||||||
"time": "2017-02-14T16:28:37+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/php-fig/container/issues",
|
||||||
|
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
||||||
|
},
|
||||||
|
"time": "2021-03-05T17:36:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/http-message",
|
"name": "psr/http-message",
|
||||||
@@ -1270,20 +1629,23 @@
|
|||||||
"request",
|
"request",
|
||||||
"response"
|
"response"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/http-message/tree/master"
|
||||||
|
},
|
||||||
"time": "2016-08-06T14:39:51+00:00"
|
"time": "2016-08-06T14:39:51+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
"version": "1.1.2",
|
"version": "1.1.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/log.git",
|
"url": "https://github.com/php-fig/log.git",
|
||||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
|
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
||||||
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
|
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1307,7 +1669,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "PHP-FIG",
|
"name": "PHP-FIG",
|
||||||
"homepage": "http://www.php-fig.org/"
|
"homepage": "https://www.php-fig.org/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Common interface for logging libraries",
|
"description": "Common interface for logging libraries",
|
||||||
@@ -1317,7 +1679,10 @@
|
|||||||
"psr",
|
"psr",
|
||||||
"psr-3"
|
"psr-3"
|
||||||
],
|
],
|
||||||
"time": "2019-11-01T11:05:21+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/log/tree/1.1.4"
|
||||||
|
},
|
||||||
|
"time": "2021-05-03T11:20:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
@@ -1357,28 +1722,33 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A polyfill for getallheaders.",
|
"description": "A polyfill for getallheaders.",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/ralouphie/getallheaders/issues",
|
||||||
|
"source": "https://github.com/ralouphie/getallheaders/tree/develop"
|
||||||
|
},
|
||||||
"time": "2019-03-08T08:55:37+00:00"
|
"time": "2019-03-08T08:55:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sabre/event",
|
"name": "sabre/event",
|
||||||
"version": "5.1.0",
|
"version": "5.1.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sabre-io/event.git",
|
"url": "https://github.com/sabre-io/event.git",
|
||||||
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276"
|
"reference": "c120bec57c17b6251a496efc82b732418b49d50a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sabre-io/event/zipball/d00a17507af0e7544cfe17096372f5d733e3b276",
|
"url": "https://api.github.com/repos/sabre-io/event/zipball/c120bec57c17b6251a496efc82b732418b49d50a",
|
||||||
"reference": "d00a17507af0e7544cfe17096372f5d733e3b276",
|
"reference": "c120bec57c17b6251a496efc82b732418b49d50a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1"
|
"php": "^7.1 || ^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"friendsofphp/php-cs-fixer": "~2.16.1",
|
"friendsofphp/php-cs-fixer": "~2.16.1",
|
||||||
"phpunit/phpunit": "^7 || ^8"
|
"phpstan/phpstan": "^0.12",
|
||||||
|
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1417,20 +1787,25 @@
|
|||||||
"reactor",
|
"reactor",
|
||||||
"signal"
|
"signal"
|
||||||
],
|
],
|
||||||
"time": "2020-01-31T18:52:29+00:00"
|
"support": {
|
||||||
|
"forum": "https://groups.google.com/group/sabredav-discuss",
|
||||||
|
"issues": "https://github.com/sabre-io/event/issues",
|
||||||
|
"source": "https://github.com/fruux/sabre-event"
|
||||||
|
},
|
||||||
|
"time": "2020-10-03T11:02:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "scssphp/scssphp",
|
"name": "scssphp/scssphp",
|
||||||
"version": "1.0.6",
|
"version": "v1.6.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/scssphp/scssphp.git",
|
"url": "https://github.com/scssphp/scssphp.git",
|
||||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c"
|
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
|
||||||
"reference": "5b3c9d704950d8f9637f5110c36c281ec47dc13c",
|
"reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1439,11 +1814,19 @@
|
|||||||
"php": ">=5.6.0"
|
"php": ">=5.6.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3",
|
"bamarni/composer-bin-plugin": "^1.4",
|
||||||
"squizlabs/php_codesniffer": "~2.5",
|
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4",
|
||||||
"twbs/bootstrap": "~4.3",
|
"sass/sass-spec": "*",
|
||||||
|
"squizlabs/php_codesniffer": "~3.5",
|
||||||
|
"symfony/phpunit-bridge": "^5.1",
|
||||||
|
"twbs/bootstrap": "~5.0",
|
||||||
|
"twbs/bootstrap4": "4.6.0",
|
||||||
"zurb/foundation": "~6.5"
|
"zurb/foundation": "~6.5"
|
||||||
},
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
|
||||||
|
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
|
||||||
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"bin/pscss"
|
"bin/pscss"
|
||||||
],
|
],
|
||||||
@@ -1478,24 +1861,28 @@
|
|||||||
"scss",
|
"scss",
|
||||||
"stylesheet"
|
"stylesheet"
|
||||||
],
|
],
|
||||||
"time": "2019-12-12T05:00:52+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/scssphp/scssphp/issues",
|
||||||
|
"source": "https://github.com/scssphp/scssphp/tree/v1.6.0"
|
||||||
|
},
|
||||||
|
"time": "2021-07-02T16:28:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sergeytsalkov/meekrodb",
|
"name": "sergeytsalkov/meekrodb",
|
||||||
"version": "v2.3",
|
"version": "v2.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/SergeyTsalkov/meekrodb.git",
|
"url": "https://github.com/SergeyTsalkov/meekrodb.git",
|
||||||
"reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1"
|
"reference": "e30c240d54bc81f58c58507a9ed768032eb494a5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/eb36858f1aff94ae1665900e681a1cfb78563ee1",
|
"url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/e30c240d54bc81f58c58507a9ed768032eb494a5",
|
||||||
"reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1",
|
"reference": "e30c240d54bc81f58c58507a9ed768032eb494a5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.2.0"
|
"php": ">=5.3.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1521,39 +1908,49 @@
|
|||||||
"mysqli",
|
"mysqli",
|
||||||
"pdo"
|
"pdo"
|
||||||
],
|
],
|
||||||
"time": "2014-06-16T22:40:22+00:00"
|
"support": {
|
||||||
|
"email": "support@meekro.com",
|
||||||
|
"issues": "https://github.com/SergeyTsalkov/meekrodb/issues",
|
||||||
|
"source": "https://github.com/SergeyTsalkov/meekrodb/tree/v2.4"
|
||||||
|
},
|
||||||
|
"time": "2021-06-29T04:31:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v5.0.8",
|
"version": "v5.3.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935"
|
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
|
"url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
|
||||||
"reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
|
"reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5",
|
"php": ">=7.2.5",
|
||||||
|
"symfony/deprecation-contracts": "^2.1",
|
||||||
"symfony/polyfill-mbstring": "~1.0",
|
"symfony/polyfill-mbstring": "~1.0",
|
||||||
"symfony/polyfill-php73": "^1.8",
|
"symfony/polyfill-php73": "^1.8",
|
||||||
"symfony/service-contracts": "^1.1|^2"
|
"symfony/polyfill-php80": "^1.16",
|
||||||
|
"symfony/service-contracts": "^1.1|^2",
|
||||||
|
"symfony/string": "^5.1"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
|
"psr/log": ">=3",
|
||||||
"symfony/dependency-injection": "<4.4",
|
"symfony/dependency-injection": "<4.4",
|
||||||
|
"symfony/dotenv": "<5.1",
|
||||||
"symfony/event-dispatcher": "<4.4",
|
"symfony/event-dispatcher": "<4.4",
|
||||||
"symfony/lock": "<4.4",
|
"symfony/lock": "<4.4",
|
||||||
"symfony/process": "<4.4"
|
"symfony/process": "<4.4"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"psr/log-implementation": "1.0"
|
"psr/log-implementation": "1.0|2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/log": "~1.0",
|
"psr/log": "^1|^2",
|
||||||
"symfony/config": "^4.4|^5.0",
|
"symfony/config": "^4.4|^5.0",
|
||||||
"symfony/dependency-injection": "^4.4|^5.0",
|
"symfony/dependency-injection": "^4.4|^5.0",
|
||||||
"symfony/event-dispatcher": "^4.4|^5.0",
|
"symfony/event-dispatcher": "^4.4|^5.0",
|
||||||
@@ -1568,11 +1965,6 @@
|
|||||||
"symfony/process": ""
|
"symfony/process": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "5.0-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Console\\": ""
|
"Symfony\\Component\\Console\\": ""
|
||||||
@@ -1595,42 +1987,127 @@
|
|||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony Console Component",
|
"description": "Eases the creation of beautiful and testable command line interfaces",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2020-03-30T11:42:42+00:00"
|
"keywords": [
|
||||||
|
"cli",
|
||||||
|
"command line",
|
||||||
|
"console",
|
||||||
|
"terminal"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/console/tree/v5.3.6"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-07-27T19:10:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/lock",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v4.4.3",
|
"version": "v2.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/lock.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3"
|
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/lock/zipball/6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||||
"reference": "6c4f5b620871cfef5b004fc57f2ca74572ae03b3",
|
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": ">=7.1"
|
||||||
"psr/log": "~1.0"
|
|
||||||
},
|
|
||||||
"conflict": {
|
|
||||||
"doctrine/dbal": "<2.5"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"doctrine/dbal": "~2.5",
|
|
||||||
"mongodb/mongodb": "~1.1",
|
|
||||||
"predis/predis": "~1.0"
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "4.4-dev"
|
"dev-main": "2.4-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/contracts",
|
||||||
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"function.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-03-23T23:28:01+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/lock",
|
||||||
|
"version": "v4.4.27",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/lock.git",
|
||||||
|
"reference": "6ca476d4ac992802f2a4043929f68f1818449486"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/lock/zipball/6ca476d4ac992802f2a4043929f68f1818449486",
|
||||||
|
"reference": "6ca476d4ac992802f2a4043929f68f1818449486",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"psr/log": "^1|^2|^3",
|
||||||
|
"symfony/polyfill-php80": "^1.16"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/dbal": "<2.6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/dbal": "^2.6|^3.0",
|
||||||
|
"predis/predis": "~1.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Lock\\": ""
|
"Symfony\\Component\\Lock\\": ""
|
||||||
@@ -1653,7 +2130,7 @@
|
|||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Symfony Lock Component",
|
"description": "Creates and manages locks, a mechanism to provide exclusive access to a shared resource",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cas",
|
"cas",
|
||||||
@@ -1663,24 +2140,41 @@
|
|||||||
"redlock",
|
"redlock",
|
||||||
"semaphore"
|
"semaphore"
|
||||||
],
|
],
|
||||||
"time": "2020-01-04T13:00:46+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/lock/tree/v4.4.27"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-07-23T15:41:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.15.0",
|
"version": "v1.23.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
|
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-ctype": "For best performance"
|
"ext-ctype": "For best performance"
|
||||||
@@ -1688,7 +2182,11 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.15-dev"
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1721,24 +2219,293 @@
|
|||||||
"polyfill",
|
"polyfill",
|
||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"time": "2020-02-27T09:26:54+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-02-19T12:13:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-intl-grapheme",
|
||||||
"version": "v1.15.0",
|
"version": "v1.23.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
|
||||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
|
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
|
||||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=7.1"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Grapheme\\": ""
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's grapheme_* functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"grapheme",
|
||||||
|
"intl",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-27T12:26:48+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-intl-idn",
|
||||||
|
"version": "v1.23.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
|
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
|
||||||
|
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1",
|
||||||
|
"symfony/polyfill-intl-normalizer": "^1.10",
|
||||||
|
"symfony/polyfill-php72": "^1.10"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Laurent Bassin",
|
||||||
|
"email": "laurent@bassin.info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Trevor Rowbotham",
|
||||||
|
"email": "trevor.rowbotham@pm.me"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"idn",
|
||||||
|
"intl",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-27T09:27:20+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-intl-normalizer",
|
||||||
|
"version": "v1.23.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||||
|
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
|
||||||
|
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"intl",
|
||||||
|
"normalizer",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-02-19T12:13:01+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-mbstring",
|
||||||
|
"version": "v1.23.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
|
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||||
|
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "For best performance"
|
"ext-mbstring": "For best performance"
|
||||||
@@ -1746,7 +2513,11 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.15-dev"
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1780,29 +2551,50 @@
|
|||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"time": "2020-03-09T19:04:49+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-27T12:26:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php72",
|
"name": "symfony/polyfill-php72",
|
||||||
"version": "v1.15.0",
|
"version": "v1.23.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
|
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
|
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
|
||||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
|
"reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.15-dev"
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1835,29 +2627,50 @@
|
|||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"time": "2020-02-27T09:26:54+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-27T09:17:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php73",
|
"name": "symfony/polyfill-php73",
|
||||||
"version": "v1.15.0",
|
"version": "v1.23.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php73.git",
|
"url": "https://github.com/symfony/polyfill-php73.git",
|
||||||
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7"
|
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
|
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
|
||||||
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
|
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.15-dev"
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1893,25 +2706,125 @@
|
|||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"time": "2020-02-27T09:26:54+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-02-19T12:13:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/service-contracts",
|
"name": "symfony/polyfill-php80",
|
||||||
"version": "v2.0.1",
|
"version": "v1.23.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/service-contracts.git",
|
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||||
"reference": "144c5e51266b281231e947b51223ba14acf1a749"
|
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
|
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||||
"reference": "144c5e51266b281231e947b51223ba14acf1a749",
|
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5",
|
"php": ">=7.1"
|
||||||
"psr/container": "^1.0"
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.23-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/polyfill",
|
||||||
|
"url": "https://github.com/symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Php80\\": ""
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Ion Bazan",
|
||||||
|
"email": "ion.bazan@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-07-28T13:41:28+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/service-contracts",
|
||||||
|
"version": "v2.4.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/service-contracts.git",
|
||||||
|
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||||
|
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"psr/container": "^1.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/service-implementation": ""
|
"symfony/service-implementation": ""
|
||||||
@@ -1919,7 +2832,11 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.0-dev"
|
"dev-main": "2.4-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/contracts",
|
||||||
|
"url": "https://github.com/symfony/contracts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1951,27 +2868,178 @@
|
|||||||
"interoperability",
|
"interoperability",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"time": "2019-11-18T17:27:11+00:00"
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-04-01T10:43:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/valitron",
|
"name": "symfony/string",
|
||||||
"version": "v1.4.7",
|
"version": "v5.3.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vlucas/valitron.git",
|
"url": "https://github.com/symfony/string.git",
|
||||||
"reference": "a03072bed1679660200766d134507a30193eaf6d"
|
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/a03072bed1679660200766d134507a30193eaf6d",
|
"url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||||
"reference": "a03072bed1679660200766d134507a30193eaf6d",
|
"reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"symfony/polyfill-ctype": "~1.8",
|
||||||
|
"symfony/polyfill-intl-grapheme": "~1.0",
|
||||||
|
"symfony/polyfill-intl-normalizer": "~1.0",
|
||||||
|
"symfony/polyfill-mbstring": "~1.0",
|
||||||
|
"symfony/polyfill-php80": "~1.15"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/error-handler": "^4.4|^5.0",
|
||||||
|
"symfony/http-client": "^4.4|^5.0",
|
||||||
|
"symfony/translation-contracts": "^1.1|^2",
|
||||||
|
"symfony/var-exporter": "^4.4|^5.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\String\\": ""
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"Resources/functions.php"
|
||||||
|
],
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"grapheme",
|
||||||
|
"i18n",
|
||||||
|
"string",
|
||||||
|
"unicode",
|
||||||
|
"utf-8",
|
||||||
|
"utf8"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/string/tree/v5.3.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-06-27T11:44:38+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tysonandre/var_representation_polyfill",
|
||||||
|
"version": "0.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/TysonAndre/var_representation_polyfill.git",
|
||||||
|
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/3f17999ee1f257319ddc6721dd26ebbc5d175f33",
|
||||||
|
"reference": "3f17999ee1f257319ddc6721dd26ebbc5d175f33",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"php": "^7.2.0|^8.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phan/phan": "^4.0",
|
||||||
|
"phpunit/phpunit": "^8.5.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"VarRepresentation\\": "src/VarRepresentation"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/var_representation.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Tyson Andre"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Polyfill for var_representation",
|
||||||
|
"keywords": [
|
||||||
|
"var_export",
|
||||||
|
"var_representation"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/TysonAndre/var_representation_polyfill/issues",
|
||||||
|
"source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.0.2"
|
||||||
|
},
|
||||||
|
"time": "2021-06-26T18:55:02+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vlucas/valitron",
|
||||||
|
"version": "v1.4.10",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/vlucas/valitron.git",
|
||||||
|
"reference": "5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/vlucas/valitron/zipball/5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb",
|
||||||
|
"reference": "5ebd5d7af82cc0a9d798e816a2ecad63f1b59ceb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": ">=5.3.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
|
"phpunit/phpunit": ">=4.8.35"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-mbstring": "It can support the multiple bytes string length."
|
"ext-mbstring": "It can support the multiple bytes string length."
|
||||||
@@ -1990,43 +3058,59 @@
|
|||||||
{
|
{
|
||||||
"name": "Vance Lucas",
|
"name": "Vance Lucas",
|
||||||
"email": "vance@vancelucas.com",
|
"email": "vance@vancelucas.com",
|
||||||
"homepage": "http://www.vancelucas.com"
|
"homepage": "https://www.vancelucas.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Simple, elegant, stand-alone validation library with NO dependencies",
|
"description": "Simple, elegant, stand-alone validation library with NO dependencies",
|
||||||
"homepage": "http://github.com/vlucas/valitron",
|
"homepage": "https://github.com/vlucas/valitron",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"valid",
|
"valid",
|
||||||
"validation",
|
"validation",
|
||||||
"validator"
|
"validator"
|
||||||
],
|
],
|
||||||
"time": "2019-08-29T19:49:43+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/vlucas/valitron/issues",
|
||||||
|
"source": "https://github.com/vlucas/valitron/tree/v1.4.10"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/vlucas/valitron",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-07-08T16:18:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webmozart/assert",
|
"name": "webmozart/assert",
|
||||||
"version": "1.8.0",
|
"version": "1.10.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/webmozart/assert.git",
|
"url": "https://github.com/webmozarts/assert.git",
|
||||||
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
|
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
|
"url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
|
||||||
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
|
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.3.3 || ^7.0",
|
"php": "^7.2 || ^8.0",
|
||||||
"symfony/polyfill-ctype": "^1.8"
|
"symfony/polyfill-ctype": "^1.8"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"vimeo/psalm": "<3.9.1"
|
"phpstan/phpstan": "<0.12.20",
|
||||||
|
"vimeo/psalm": "<4.6.1 || 4.6.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
"phpunit/phpunit": "^8.5.13"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.10-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Webmozart\\Assert\\": "src/"
|
"Webmozart\\Assert\\": "src/"
|
||||||
@@ -2048,7 +3132,11 @@
|
|||||||
"check",
|
"check",
|
||||||
"validate"
|
"validate"
|
||||||
],
|
],
|
||||||
"time": "2020-04-18T12:12:48+00:00"
|
"support": {
|
||||||
|
"issues": "https://github.com/webmozarts/assert/issues",
|
||||||
|
"source": "https://github.com/webmozarts/assert/tree/1.10.0"
|
||||||
|
},
|
||||||
|
"time": "2021-03-09T10:59:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "xemlock/htmlpurifier-html5",
|
"name": "xemlock/htmlpurifier-html5",
|
||||||
@@ -2099,6 +3187,10 @@
|
|||||||
"validator",
|
"validator",
|
||||||
"xss"
|
"xss"
|
||||||
],
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/xemlock/htmlpurifier-html5/issues",
|
||||||
|
"source": "https://github.com/xemlock/htmlpurifier-html5/tree/master"
|
||||||
|
},
|
||||||
"time": "2019-08-07T17:19:21+00:00"
|
"time": "2019-08-07T17:19:21+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -2112,5 +3204,6 @@
|
|||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"platform-overrides": {
|
"platform-overrides": {
|
||||||
"php": "7.3"
|
"php": "7.3"
|
||||||
}
|
},
|
||||||
|
"plugin-api-version": "2.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Regular → Executable
BIN
Binary file not shown.
+132
-73
@@ -1,19 +1,34 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
color:white; background-color:black; font-family: '맑은 고딕';
|
color: white;
|
||||||
|
background-color: black;
|
||||||
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
border: solid 1px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-top-color: gray;
|
||||||
|
border-left-color: gray;
|
||||||
|
border-right-color: black;
|
||||||
|
border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
th, td {
|
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
th,
|
||||||
|
td {
|
||||||
|
border: solid 1px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-top-color: gray;
|
||||||
|
border-left-color: gray;
|
||||||
|
border-right-color: black;
|
||||||
|
border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
@@ -25,8 +40,8 @@ a.just_link {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.with_border{
|
.with_border {
|
||||||
margin:0;
|
margin: 0;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
border-spacing: 0px;
|
border-spacing: 0px;
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
@@ -37,42 +52,52 @@ a.just_link {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.section_title {
|
.section_title {
|
||||||
height:50px;
|
height: 50px;
|
||||||
line-height:50px;
|
line-height: 50px;
|
||||||
font-size: 30px; font-weight: bold;
|
font-size: 30px;
|
||||||
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color:white;
|
color: white;
|
||||||
padding:0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legacy_layout div {
|
.legacy_layout div {
|
||||||
border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black;
|
border: solid 1px;
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-top-color: gray;
|
||||||
|
border-left-color: gray;
|
||||||
|
border-right-color: black;
|
||||||
|
border-bottom-color: black;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: '맑은 고딕';;
|
font-family: '맑은 고딕';
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
.obj_fill{
|
.obj_fill {
|
||||||
display:block;
|
display: block;
|
||||||
width:100%;
|
width: 100%;
|
||||||
height:100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.with_skin {
|
button.with_skin {
|
||||||
padding:0 4px;
|
padding: 0 4px;
|
||||||
background-color: black; color: white;
|
background-color: black;
|
||||||
|
color: white;
|
||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.with_skin:disabled {
|
button.with_skin:disabled {
|
||||||
background-color:#333333;
|
background-color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.with_skin {
|
input.with_skin {
|
||||||
background-color: black; color: white;
|
background-color: black;
|
||||||
|
color: white;
|
||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
@@ -81,25 +106,41 @@ input.with_skin:disabled {
|
|||||||
background-color: #333333;
|
background-color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font0 { font-size: 10px; }
|
.font0 {
|
||||||
.font1 { font-size: 13px; }
|
font-size: 10px;
|
||||||
.font2 { font-size: 15px; }
|
|
||||||
.font3 { font-size: 20px; }
|
|
||||||
.font4 { font-size: 30px; }
|
|
||||||
.font5 { font-size: 50px; }
|
|
||||||
|
|
||||||
caption.section_title {
|
|
||||||
caption-side:top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font1 {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
.samButton{
|
.font2 {
|
||||||
float:left;
|
font-size: 15px;
|
||||||
display:block;
|
}
|
||||||
padding:0;
|
|
||||||
margin:0;
|
.font3 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font4 {
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font5 {
|
||||||
|
font-size: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption.section_title {
|
||||||
|
caption-side: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.samButton {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
position:relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.samButton.disabled {
|
a.samButton.disabled {
|
||||||
@@ -107,24 +148,23 @@ a.samButton.disabled {
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samButtonOuter{
|
.samButtonOuter {
|
||||||
display: table;
|
display: table;
|
||||||
border: outset 2px white;
|
border: outset 2px white;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-weight:bold;
|
font-weight: bold;
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
width:125px;
|
width: 125px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
background-color:#000000;
|
background-color: #000000;
|
||||||
color:#ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samButtonOuter:active{
|
.samButtonOuter:active {
|
||||||
border: inset 2px white;
|
border: inset 2px white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.samButtonInner {
|
||||||
.samButtonInner{
|
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -133,42 +173,42 @@ a.samButton.disabled {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samToolbarButton > .samButtonOuter{
|
.samToolbarButton>.samButtonOuter {
|
||||||
width:125px;
|
width: 125px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
background-color:#225500;
|
background-color: #225500;
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samToolbarButton2 > .samButtonOuter{
|
.samToolbarButton2>.samButtonOuter {
|
||||||
width:125px;
|
width: 125px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
background-color:#225500;
|
background-color: #225500;
|
||||||
color:magenta;
|
color: magenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton > .samButtonOuter{
|
.samCommandButton>.samButtonOuter {
|
||||||
width:111px;
|
width: 111px;
|
||||||
height:30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton.disabled > .samButtonOuter{
|
.samCommandButton.disabled>.samButtonOuter {
|
||||||
background-color:transparent !important;
|
background-color: transparent !important;
|
||||||
color:gray !important;
|
color: gray !important;
|
||||||
border-color:transparent !important;
|
border-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::before{
|
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::before {
|
||||||
content:'【'
|
content: '【'
|
||||||
}
|
}
|
||||||
|
|
||||||
.samCommandButton.disabled > .samButtonOuter > .samButtonInner::after{
|
.samCommandButton.disabled>.samButtonOuter>.samButtonInner::after {
|
||||||
content:'】'
|
content: '】'
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip_copyable_info .tooltiptext{
|
.tooltip_copyable_info .tooltiptext {
|
||||||
display: inline;
|
display: inline;
|
||||||
color: rgba(0,0,0,0);
|
color: rgba(0, 0, 0, 0);
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +216,26 @@ a.samButton.disabled {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden_but_copyable{
|
.hidden_but_copyable {
|
||||||
color: rgba(0,0,0,0);
|
color: rgba(0, 0, 0, 0);
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vertical_flex {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical_flex .item {
|
||||||
|
display: block;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fill_box {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
+68
-53
@@ -1,141 +1,156 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
body {
|
||||||
body{
|
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_notice {
|
#server_notice {
|
||||||
margin:10px 0;
|
margin: 10px 0;
|
||||||
border: none;
|
border: none;
|
||||||
text-align:center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list_container{
|
#server_list_container {
|
||||||
width:800px;
|
width: 800px;
|
||||||
position:absolute;
|
position: absolute;
|
||||||
left:50%;
|
left: 50%;
|
||||||
margin-left:-400px;
|
margin-left: -400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list_table{
|
#server_list_table {
|
||||||
width:100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list tr{
|
#server_list tr {
|
||||||
height:66px;
|
height: 66px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#server_list .server_create_and_select .general_create,
|
.ignore_border {
|
||||||
#server_list .server_create_and_select .general_select {
|
border: 0;
|
||||||
width: 120px; height: 33px;
|
margin: 0;
|
||||||
float: left;
|
padding: 0;
|
||||||
}
|
|
||||||
|
|
||||||
#server_list .general_create,
|
|
||||||
#server_list .general_login {
|
|
||||||
width: 120px; height: 66px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ignore_border{
|
|
||||||
border:0;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#user_info {
|
#user_info {
|
||||||
margin-top:20px;
|
margin-top: 20px;
|
||||||
width: 800px; height: 130px;
|
width: 800px;
|
||||||
|
height: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#user_info button {
|
||||||
#user_info button{
|
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin: 10px 50px;
|
margin: 10px 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.center_ordered_items{
|
.center_ordered_items {
|
||||||
text-align:center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerList {
|
.Entrance_ServerList {
|
||||||
width: 800px; height: 64px;
|
width: 800px;
|
||||||
|
height: 64px;
|
||||||
border: none;
|
border: none;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListServer {
|
.Entrance_ServerListServer {
|
||||||
width: 98px; height: 64px;
|
width: 98px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListDown {
|
.Entrance_ServerListDown {
|
||||||
width: 698px; height: 64px;
|
width: 698px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListInfo {
|
.Entrance_ServerListInfo {
|
||||||
width: 398px; height: 64px;
|
width: 398px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListBlock {
|
.Entrance_ServerListBlock {
|
||||||
width: 298px; height: 64px;
|
width: 298px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
line-height: 64px;
|
line-height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListCharacter {
|
.Entrance_ServerListCharacter {
|
||||||
width: 64px; height: 64px;
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_ServerListName {
|
.Entrance_ServerListName {
|
||||||
width: 112px; height: 64px;
|
width: 112px;
|
||||||
|
height: 64px;
|
||||||
float: left;
|
float: left;
|
||||||
line-height: 64px;
|
line-height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.Entrance_ServerListSelect {
|
.Entrance_ServerListSelect {
|
||||||
width: 120px; height: 32px;
|
width: 120px;
|
||||||
|
height: 32px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Entrance_000003 {
|
#Entrance_000003 {
|
||||||
width: 798px; height: 155px;
|
width: 798px;
|
||||||
|
height: 155px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Alert {
|
.Entrance_Alert {
|
||||||
color: red; font-size: 15px; font-weight: bold;
|
color: red;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Che {
|
.Entrance_Che {
|
||||||
color: white; font-size: 15px; font-weight: bold;
|
color: white;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Kwe {
|
.Entrance_Kwe {
|
||||||
color: yellow; font-size: 15px; font-weight: bold;
|
color: yellow;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Pwe {
|
.Entrance_Pwe {
|
||||||
color: orange; font-size: 15px; font-weight: bold;
|
color: orange;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Twe {
|
.Entrance_Twe {
|
||||||
color: magenta; font-size: 15px; font-weight: bold;
|
color: magenta;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Nya {
|
.Entrance_Nya {
|
||||||
color: #e67e22; font-size: 15px; font-weight: bold;
|
color: #e67e22;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Pya {
|
.Entrance_Pya {
|
||||||
color: #9b59b6; font-size: 15px; font-weight: bold;
|
color: #9b59b6;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Entrance_Hwe {
|
.Entrance_Hwe {
|
||||||
color: red; font-size: 15px; font-weight: bold;
|
color: red;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BtnPlate {
|
||||||
|
height: inherit;
|
||||||
}
|
}
|
||||||
+75
-74
@@ -1,131 +1,132 @@
|
|||||||
body, html{
|
body,
|
||||||
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main{
|
.main {
|
||||||
margin-top: 70px;
|
margin-top: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1.title {
|
h1.title {
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
font-family: 'Passion One', cursive;
|
font-family: 'Passion One', cursive;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr{
|
hr {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
/*color: #fff;*/
|
/*color: #fff;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group{
|
.form-group {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label{
|
label {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input,
|
input,
|
||||||
input::-webkit-input-placeholder {
|
input::-webkit-input-placeholder {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-login{
|
.main-login {
|
||||||
/*background-color: #fff;*/
|
/*background-color: #fff;*/
|
||||||
/* shadows and rounded borders */
|
/* shadows and rounded borders */
|
||||||
-moz-border-radius: 2px;
|
-moz-border-radius: 2px;
|
||||||
-webkit-border-radius: 2px;
|
-webkit-border-radius: 2px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
||||||
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
||||||
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-center{
|
.main-center {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 330px;
|
max-width: 330px;
|
||||||
padding: 40px 40px;
|
padding: 40px 40px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login_btn_group{
|
.login_btn_group {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-register{
|
.login-register {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col-form-label {
|
||||||
.col-form-label{
|
text-align: center;
|
||||||
text-align:center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.terms{
|
.terms {
|
||||||
max-height: 200px; overflow-y: auto;
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terms pre{
|
.terms pre {
|
||||||
width:100%;
|
width: 100%;
|
||||||
white-space: pre-wrap; /* Since CSS 2.1 */
|
white-space: pre-wrap;
|
||||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
/* Since CSS 2.1 */
|
||||||
white-space: -pre-wrap; /* Opera 4-6 */
|
white-space: -moz-pre-wrap;
|
||||||
white-space: -o-pre-wrap; /* Opera 7 */
|
/* Mozilla, since 1999 */
|
||||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
white-space: -pre-wrap;
|
||||||
|
/* Opera 4-6 */
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
/* Opera 7 */
|
||||||
|
word-wrap: break-word;
|
||||||
|
/* Internet Explorer 5.5+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
.vertical-center {
|
.vertical-center {
|
||||||
min-height: 100%; /* Fallback for browsers do NOT support vh unit */
|
min-height: 100%;
|
||||||
min-height: 100vh; /* These two lines are counted as one :-) */
|
/* Fallback for browsers do NOT support vh unit */
|
||||||
|
min-height: 100vh;
|
||||||
|
/* These two lines are counted as one :-) */
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-content {
|
#login_card {
|
||||||
position:fixed;
|
z-index: 801;
|
||||||
left:0;
|
|
||||||
top:0;
|
|
||||||
width:100%;
|
|
||||||
height:100%;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
z-index:800;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#login_card{
|
#btn_kakao_login {
|
||||||
z-index:801;
|
|
||||||
}
|
|
||||||
|
|
||||||
#btn_kakao_login{
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height:46px;
|
height: 46px;
|
||||||
width:116px;
|
width: 116px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color:transparent;
|
color: transparent;
|
||||||
border:0;
|
border: 0;
|
||||||
background-size: 100%; /* To fill the dimensions of container (button), or */
|
background-size: 100%;
|
||||||
|
/* To fill the dimensions of container (button), or */
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: bottom center;
|
background-position: bottom center;
|
||||||
margin-top:5px;
|
margin-top: 5px;
|
||||||
background-image:url('../oauth_kakao/kakao_login_join.png');
|
background-image: url('../oauth_kakao/kakao_login_join.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
#btn_kakao_login:hover {
|
#btn_kakao_login:hover {
|
||||||
background-image:url('../oauth_kakao/kakao_login_join_ov.png');
|
background-image: url('../oauth_kakao/kakao_login_join_ov.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
#bottom_box{
|
#bottom_box .container {
|
||||||
position:fixed;
|
text-align: center;
|
||||||
bottom:0;
|
|
||||||
width:100%;
|
|
||||||
left:0;
|
|
||||||
}
|
}
|
||||||
#bottom_box .container{
|
|
||||||
text-align:center;
|
.btn-group-xs>.btn,
|
||||||
|
.btn-xs {
|
||||||
|
padding: .25rem .4rem;
|
||||||
|
font-size: .875rem;
|
||||||
|
line-height: .5;
|
||||||
|
border-radius: .2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#running_map {
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
+1
-1
@@ -117,7 +117,7 @@ function logError(string $err, string $errstr, string $errpath, array $trace)
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext)
|
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext=null)
|
||||||
{
|
{
|
||||||
if (!(error_reporting() & $errno)) {
|
if (!(error_reporting() & $errno)) {
|
||||||
// This error code is not included in error_reporting, so let it fall
|
// This error code is not included in error_reporting, so let it fall
|
||||||
|
|||||||
@@ -204,7 +204,15 @@ $result = Util::generateFileUsingSimpleTemplate(
|
|||||||
'sharedIconPath' => $sharedIconPath,
|
'sharedIconPath' => $sharedIconPath,
|
||||||
'gameImagePath' => $gameImagePath,
|
'gameImagePath' => $gameImagePath,
|
||||||
'imageRequestPath' => $imageRequestPath,
|
'imageRequestPath' => $imageRequestPath,
|
||||||
'imageRequestKey' => $imageRequestKey
|
'imageRequestKey' => $imageRequestKey,
|
||||||
|
'serverList' => [
|
||||||
|
['che', '체', 'white'],
|
||||||
|
['kwe', '퀘', 'yellow'],
|
||||||
|
['pwe', '풰', 'orange'],
|
||||||
|
['twe', '퉤', 'magenta'],
|
||||||
|
['nya', '냐', '#e67e22'],
|
||||||
|
['pya', '퍄', '#9b59b6']
|
||||||
|
]
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class ServConfig
|
|||||||
public static $gameImagePath = "_tK_gameImagePath_";
|
public static $gameImagePath = "_tK_gameImagePath_";
|
||||||
public static $imageRequestPath = "_tK_imageRequestPath_";
|
public static $imageRequestPath = "_tK_imageRequestPath_";
|
||||||
public static $imageRequestKey = '_tK_imageRequestKey_';
|
public static $imageRequestKey = '_tK_imageRequestKey_';
|
||||||
|
private static $serverList = null;
|
||||||
|
|
||||||
public static function getSharedIconPath(string $filepath = ''): string
|
public static function getSharedIconPath(string $filepath = ''): string
|
||||||
{
|
{
|
||||||
@@ -42,6 +43,24 @@ class ServConfig
|
|||||||
return static::$imageRequestPath . "?req={$req_hash}&time={$now}";
|
return static::$imageRequestPath . "?req={$req_hash}&time={$now}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 서버 설정 반환
|
||||||
|
*
|
||||||
|
* @return \sammo\Setting[]
|
||||||
|
*/
|
||||||
|
public static function getServerList(): array{
|
||||||
|
$servKeyList = [/*_tK_serverList_*/];
|
||||||
|
$servKeyList[] = ['hwe', '훼', 'red'];
|
||||||
|
|
||||||
|
if (self::$serverList === null) {
|
||||||
|
self::$serverList = [];
|
||||||
|
foreach($servKeyList as [$servKey, $servNick, $servColor]){
|
||||||
|
self::$serverList[$servKey] = new Setting(ROOT.'/'.$servKey, $servNick, $servColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return self::$serverList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
* 서버 주소 반환. 서버의 경로가 하부 디렉토리인 경우에 하부 디렉토리까지 포함
|
||||||
|
|||||||
@@ -24,3 +24,7 @@ foreach ($db->queryFirstColumn(
|
|||||||
) as $generalNo) {
|
) as $generalNo) {
|
||||||
CheckHall($generalNo);
|
CheckHall($generalNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
|
||||||
|
$genObj->mergeTotalInheritancePoint();
|
||||||
|
}
|
||||||
+6
-1
@@ -59,8 +59,13 @@ foreach (getAllNationStaticInfo() as $nation) {
|
|||||||
$nationName[$nation['nation']] = $nation['name'];
|
$nationName[$nation['nation']] = $nation['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
|
$generalList = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general where npc=1');
|
||||||
|
$generalListFromPool = $db->query('SELECT npc,nation,name,owner_name,special,special2,personal,leadership,strength,intel,leadership+strength+intel as sum,explevel,experience,dedication from general JOIN select_pool on general.no = select_pool.general_id where npc=0');
|
||||||
|
|
||||||
|
if($generalListFromPool){
|
||||||
|
$generalList = array_merge($generalListFromPool, $generalList);
|
||||||
|
}
|
||||||
|
|
||||||
$sortType = [
|
$sortType = [
|
||||||
1 => ['name', true],
|
1 => ['name', true],
|
||||||
2 => ['nation', true],
|
2 => ['nation', true],
|
||||||
|
|||||||
+65
-11
@@ -148,8 +148,31 @@ echo "
|
|||||||
unset($city);
|
unset($city);
|
||||||
|
|
||||||
// 첩보된 도시까지만 허용
|
// 첩보된 도시까지만 허용
|
||||||
if($valid == 0 && $userGrade < 5) {
|
|
||||||
|
$showDetailedInfo = false;
|
||||||
|
if($valid){
|
||||||
|
$showDetailedInfo = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!key_exists($citylist, CityConst::all())){
|
||||||
$citylist = $me['city'];
|
$citylist = $me['city'];
|
||||||
|
$showDetailedInfo = true;
|
||||||
|
$valid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($userGrade >= 5){
|
||||||
|
$valid = true;
|
||||||
|
$showDetailedInfo = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$valid) {
|
||||||
|
$ownCities = Util::convertArrayToSetLike($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i AND nation != 0', $me['nation']));
|
||||||
|
foreach(array_keys(CityConst::byID($citylist)->path) as $pathID){
|
||||||
|
if(key_exists($pathID, $ownCities)){
|
||||||
|
$showDetailedInfo = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -172,11 +195,35 @@ if($city['trade'] === null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
|
$dbColumns = General::mergeQueryColumn(['npc', 'defence_train', 'no', 'picture', 'imgsvr', 'name', 'injury', 'leadership', 'strength', 'intel', 'officer_level', 'nation', 'crewtype', 'crew', 'train', 'atmos'], 2)[0];
|
||||||
$generals = $db->query(
|
if($showDetailedInfo){
|
||||||
'SELECT %l from general where city=%i order by name',
|
$generals = $db->query(
|
||||||
Util::formatListOfBackticks($dbColumns),
|
'SELECT %l from general where city=%i order by turntime',
|
||||||
$city['city']
|
Util::formatListOfBackticks($dbColumns),
|
||||||
);
|
$city['city']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$generals = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($valid){
|
||||||
|
$city['trustText'] = round($city['trust'], 1);
|
||||||
|
$city['popRateText'] = round($city['pop']/$city['pop_max']*100, 2);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$city['agri'] = '?';
|
||||||
|
$city['comm'] = '?';
|
||||||
|
$city['pop'] = '?';
|
||||||
|
$city['secu'] = '?';
|
||||||
|
$city['trustText'] = '?';
|
||||||
|
$city['popRateText'] = '?';
|
||||||
|
|
||||||
|
if($city['nation'] != 0){
|
||||||
|
$city['def'] = '?';
|
||||||
|
$city['wall'] = '?';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$generalTurnList = [];
|
$generalTurnList = [];
|
||||||
|
|
||||||
@@ -257,6 +304,10 @@ foreach($generals as $general){
|
|||||||
$crew = $general['crew'];
|
$crew = $general['crew'];
|
||||||
$train = -1;
|
$train = -1;
|
||||||
$atmos = -1;
|
$atmos = -1;
|
||||||
|
|
||||||
|
if(!$valid){
|
||||||
|
$crew = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$nation = $general['nation'];
|
$nation = $general['nation'];
|
||||||
@@ -331,7 +382,9 @@ foreach($generalsFormat as $general){
|
|||||||
}
|
}
|
||||||
if($general['nation'] != $myNation['nation']){
|
if($general['nation'] != $myNation['nation']){
|
||||||
$enemyCnt += 1;
|
$enemyCnt += 1;
|
||||||
$enemyCrew += $general['crew'];
|
if($general['crew'] >= 0){
|
||||||
|
$enemyCrew += $general['crew'];
|
||||||
|
}
|
||||||
if($general['crew'] > 0){
|
if($general['crew'] > 0){
|
||||||
$enemyArmedCnt += 1;
|
$enemyArmedCnt += 1;
|
||||||
}
|
}
|
||||||
@@ -402,11 +455,11 @@ foreach($generalsFormat as $general){
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center class=bg1>민심</td>
|
<td align=center class=bg1>민심</td>
|
||||||
<td align=center><?=round($city['trust'], 1)?></td>
|
<td align=center><?=$city['trustText']?></td>
|
||||||
<td align=center class=bg1>시세</td>
|
<td align=center class=bg1>시세</td>
|
||||||
<td align=center><?=$city['trade']?>%</td>
|
<td align=center><?=$city['trade']?>%</td>
|
||||||
<td align=center class=bg1>인구</td>
|
<td align=center class=bg1>인구</td>
|
||||||
<td align=center><?=round($city['pop']/$city['pop_max']*100, 2)?>%</td>
|
<td align=center><?=$city['popRateText']?>%</td>
|
||||||
<td align=center class=bg1>태수</td>
|
<td align=center class=bg1>태수</td>
|
||||||
<td align=center><?=$officer[4]['name']?></td>
|
<td align=center><?=$officer[4]['name']?></td>
|
||||||
<td align=center class=bg1>군사</td>
|
<td align=center class=bg1>군사</td>
|
||||||
@@ -430,11 +483,12 @@ foreach($generalsFormat as $general){
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center class=bg1>장수</td>
|
<td align=center class=bg1>장수</td>
|
||||||
<td colspan=11><?=join(', ', $generalsName)?></td>
|
<td colspan=11><?=$showDetailedInfo?join(', ', $generalsName):'<span style="color:gray">알 수 없음</span>'?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
<?php if($showDetailedInfo): ?>
|
||||||
<table align=center class='tb_layout bg0'>
|
<table align=center class='tb_layout bg0'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -459,7 +513,7 @@ foreach($generalsFormat as $general){
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
<table align=center width=1000 class='tb_layout bg0'>
|
<table align=center width=1000 class='tb_layout bg0'>
|
||||||
<tr><td><?=backButton()?></td></tr>
|
<tr><td><?=backButton()?></td></tr>
|
||||||
<tr><td><?=banner()?> </td></tr>
|
<tr><td><?=banner()?> </td></tr>
|
||||||
|
|||||||
@@ -0,0 +1,131 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
//로그인 검사
|
||||||
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
$userID = Session::getUserID();
|
||||||
|
$generalID = $session->generalID;
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
|
$me = General::createGeneralObjFromDB($generalID);
|
||||||
|
|
||||||
|
|
||||||
|
$pointHelpText = [
|
||||||
|
'sum' => '다음 플레이에서 사용할 수 있는 총 포인트입니다.',
|
||||||
|
'new' => '이번 플레이에서 얻은 총 포인트입니다.',
|
||||||
|
'previous' => '이전에 물려받은 포인트입니다.',
|
||||||
|
'lived_month' => '살아남은 기간입니다. (1개월 단위)',
|
||||||
|
'max_belong' => '가장 오래 임관했던 국가의 연도입니다.',
|
||||||
|
'max_domestic_critical' => '성공한 내정 중 최대 연속값입니다.',
|
||||||
|
'snipe_combat' => '유리한 상성을 가지고 전투했습니다.',
|
||||||
|
'combat' => '전투 횟수입니다.',
|
||||||
|
'sabotage' => '계략 성공 횟수입니다.',
|
||||||
|
'unifier' => '천통에 기여한 포인트입니다. <br>각 국의 군주, 천통 수뇌, 천통 군주가 받습니다.',
|
||||||
|
'dex' => '총 숙련도합입니다.',
|
||||||
|
'tournament' => '토너먼트 입상 포인트입니다.',
|
||||||
|
'betting' => '성공적인 베팅을 했습니다. <br>수익율과 베팅 성공 횟수를 따릅니다.',
|
||||||
|
];
|
||||||
|
$items = [];
|
||||||
|
foreach(array_keys(General::INHERITANCE_KEY) as $key){
|
||||||
|
$items[$key] = $me->getInheritancePoint($key)??0;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title><?= UniqueConst::$serverName ?>: 유산 관리</title>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=1024" />
|
||||||
|
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
|
||||||
|
<?= WebUtil::printCSS('../d_shared/common.css') ?>
|
||||||
|
<?= WebUtil::printCSS('../css/config.css') ?>
|
||||||
|
<?= WebUtil::printCSS('css/common.css') ?>
|
||||||
|
<?= WebUtil::printCSS('css/inheritPoint.css') ?>
|
||||||
|
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
|
||||||
|
<?= WebUtil::printJS('../e_lib/jquery-3.3.1.min.js') ?>
|
||||||
|
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
|
||||||
|
<?= WebUtil::printJS('js/common.js') ?>
|
||||||
|
<?= WebUtil::printJS('js/inheritPoint.js') ?>
|
||||||
|
<script>
|
||||||
|
var items = <?=Json::encode($items)?>;
|
||||||
|
var helpText = <?=Json::encode($pointHelpText)?>;
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body onload="formStart()">
|
||||||
|
|
||||||
|
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
|
||||||
|
<tr>
|
||||||
|
<td style='text-align:left;'>유산 관리<br><?= backButton() ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div id="container" class="tb_layout bg0" style="width:1000px;margin:auto;border:solid 1px #888888;">
|
||||||
|
<div id='inheritance_list'>
|
||||||
|
<div id="inherit_sum" class='inherit_item'>
|
||||||
|
<div class="row">
|
||||||
|
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>총 포인트</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" class="form-control inherit_value" readonly id="inherit_sum_value" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align:right">
|
||||||
|
<small class="form-text text-muted"></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="inherit_previous" class='inherit_item'>
|
||||||
|
<div class="row">
|
||||||
|
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>기존 포인트</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" class="form-control inherit_value" readonly id="inherit_previous_value" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align:right">
|
||||||
|
<small class="form-text text-muted"></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="inherit_new" class='inherit_item'>
|
||||||
|
<div class="row">
|
||||||
|
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>신규 포인트</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" class="form-control inherit_value" readonly id="inherit_new_value" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align:right">
|
||||||
|
<small class="form-text text-muted"></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%; padding:0 10px"><hr style="border-top:1px solid #888888;"></div>
|
||||||
|
<?php foreach (General::INHERITANCE_KEY as $key => [$type, $multiplier, $name]) : ?>
|
||||||
|
<?php if ($key == 'previous') {
|
||||||
|
continue;
|
||||||
|
} ?>
|
||||||
|
<div id="inherit_<?= $key ?>" class='inherit_item inherit_template_item'>
|
||||||
|
<div class="row">
|
||||||
|
<label id="inherit_<?= $key ?>_head" class='inherit_head col-sm-6 col-form-label'><?= $name ?></label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input type="text" class="form-control inherit_value" readonly id="inherit_<?= $key ?>_value" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align:right">
|
||||||
|
<small class="form-text text-muted"></small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
+23
-12
@@ -14,6 +14,7 @@ $generalID = $session->generalID;
|
|||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$gameStor->cacheValues(['turntime', 'opentime', 'autorun_user', 'npcmode']);
|
||||||
|
|
||||||
increaseRefresh("내정보", 1);
|
increaseRefresh("내정보", 1);
|
||||||
|
|
||||||
@@ -38,7 +39,7 @@ if($gameStor->turntime <= $gameStor->opentime){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$use_treatment = $me->getAuxVar('use_treatment')??10;
|
$use_treatment = $me->getAuxVar('use_treatment')??10;
|
||||||
|
$use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn')??1;
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@@ -77,20 +78,25 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
|||||||
∞<span style='color:orange'>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</span><br><br>
|
∞<span style='color:orange'>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</span><br><br>
|
||||||
|
|
||||||
환약 사용 【<select id='use_treatment' name='use_treatment'>
|
환약 사용 【<select id='use_treatment' name='use_treatment'>
|
||||||
<option value=10 <?=$use_treatment==10?"selected":""; ?>>경상</option>
|
<option value=10 <?=($use_treatment==10)?"selected":""; ?>>경상</option>
|
||||||
<option value=20 <?=$use_treatment==21?"selected":""; ?>>중상</option>
|
<option value=21 <?=($use_treatment==21)?"selected":""; ?>>중상</option>
|
||||||
<option value=40 <?=$use_treatment==41?"selected":""; ?>>심각</option>
|
<option value=41 <?=($use_treatment==41)?"selected":""; ?>>심각</option>
|
||||||
<option value=60 <?=$use_treatment==61?"selected":""; ?>>위독</option>
|
<option value=61 <?=($use_treatment==61)?"selected":""; ?>>위독</option>
|
||||||
<option value=100 <?=$use_treatment==100?"selected":""; ?>>사용안함</option>
|
<option value=100 <?=($use_treatment==100)?"selected":""; ?>>사용안함</option>
|
||||||
</select>】<br>
|
</select>】<br>
|
||||||
∞<span style='color:orange'>부상을 입었을 때 환약을 사용하는 기준입니다.</span><br><br>
|
∞<span style='color:orange'>부상을 입었을 때 환약을 사용하는 기준입니다.</span><br><br>
|
||||||
|
<?php if(($gameStor->autorun_user['options']['chief'])??false) : ?>
|
||||||
|
자동 사령턴 허용 【<select id='use_auto_nation_turn' name='use_auto_nation_turn'>
|
||||||
|
<option value=1 <?=$use_auto_nation_turn?"selected":""; ?>>허용</option>
|
||||||
|
<option value=0 <?=(!$use_auto_nation_turn)?"selected":""; ?>>허용 안함</option>
|
||||||
|
</select>】<br>
|
||||||
|
∞<span style='color:orange'>수뇌가 되었을 때 휴식 턴이어도 적당한 턴을 알아서 넣는 것을 허용합니다.</span><br><br>
|
||||||
|
<?php endif; ?>
|
||||||
수비 【<select id='defence_train' name='defence_train'>
|
수비 【<select id='defence_train' name='defence_train'>
|
||||||
<option value=90 <?=$me->getVar('defence_train')==90?"selected":""; ?>>☆(훈사90)</option>
|
<?php foreach([90, 80, 60, 40] as $targetDefenceTrain): ?>
|
||||||
<option value=80 <?=$me->getVar('defence_train')==80?"selected":""; ?>>◎(훈사80)</option>
|
<option value='<?=$targetDefenceTrain?>' <?=$me->getVar('defence_train')==$targetDefenceTrain?"selected":""; ?>><?=formatDefenceTrain($targetDefenceTrain)?>(훈사<?=$targetDefenceTrain?>)</option>
|
||||||
<option value=60 <?=$me->getVar('defence_train')==60?"selected":""; ?>>○(훈사60)</option>
|
<?php endforeach; ?>
|
||||||
<option value=40 <?=$me->getVar('defence_train')==40?"selected":""; ?>>△(훈사40)</option>
|
<option value=999 <?=$me->getVar('defence_train')==999?"selected":""; ?>><?=formatDefenceTrain(999)?>[훈련, 사기 -3]</option>
|
||||||
<option value=999 <?=$me->getVar('defence_train')==999?"selected":""; ?>>×[훈련, 사기 -3]</option>
|
|
||||||
</select>
|
</select>
|
||||||
】<br><br>
|
】<br><br>
|
||||||
<input type=<?=$submit?> id='set_my_setting' name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
|
<input type=<?=$submit?> id='set_my_setting' name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
|
||||||
@@ -107,6 +113,11 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
|||||||
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>장수 삭제</button></a><br><br>
|
<a href="c_die_immediately.php" id='die_immediately'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>장수 삭제</button></a><br><br>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if($gameStor->npcmode==2 && $me->getNPCType()==0): ?>
|
||||||
|
다른 장수 선택 (<?=substr($me->getAuxVar('next_change')??TimeUtil::now(), 0, 19)?> 부터)<br>
|
||||||
|
<a href="select_general_from_pool.php" id='select_general_from_pool'><button type="button" style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>다른 장수 선택</button></a><br><br>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
개인용 CSS<br>
|
개인용 CSS<br>
|
||||||
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
|
<textarea id='custom_css' style='color:white;background-color:black;width:420px;height:150px;'></textarea>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ $zeroPolicy = new AutorunNationPolicy($general, ($gameStor->autorun_user)['optio
|
|||||||
var availableGeneralActionPriorityItems = <?= Json::encode(AutorunGeneralPolicy::$default_priority) ?>;
|
var availableGeneralActionPriorityItems = <?= Json::encode(AutorunGeneralPolicy::$default_priority) ?>;
|
||||||
|
|
||||||
var btnHelpMessage = {
|
var btnHelpMessage = {
|
||||||
|
'불가침제의': '군주가 NPC이고, 타국에서 원조를 받았을 때,<br>세입(금/쌀) 대비 원조량에 따라 불가침제의를 합니다.',
|
||||||
'선전포고': '군주가 NPC이고, 전쟁중이 아닐 때,<br>주변국중 하나를 골라 선포합니다.<br><br>선포 시점은 다음을 참고합니다.<br>- 인구율<br>- 도시내정률<br>- NPC전투장권장 금 충족률<br>- NPC전투장권장 쌀 충족률<br><br>국력이 낮은 국가를 조금 더 선호합니다.',
|
'선전포고': '군주가 NPC이고, 전쟁중이 아닐 때,<br>주변국중 하나를 골라 선포합니다.<br><br>선포 시점은 다음을 참고합니다.<br>- 인구율<br>- 도시내정률<br>- NPC전투장권장 금 충족률<br>- NPC전투장권장 쌀 충족률<br><br>국력이 낮은 국가를 조금 더 선호합니다.',
|
||||||
'천도': '인구가 많은 곳을 찾아 천도를 시도합니다.<br>영토의 가운데를 선호합니다.<br><br>도시 인구가 충분하다면, 굳이 천도하지는 않습니다.',
|
'천도': '인구가 많은 곳을 찾아 천도를 시도합니다.<br>영토의 가운데를 선호합니다.<br><br>도시 인구가 충분하다면, 굳이 천도하지는 않습니다.',
|
||||||
'유저장긴급포상': '금/쌀이 부족한 유저전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 적어지더라도 시도합니다.',
|
'유저장긴급포상': '금/쌀이 부족한 유저전투장에게 긴급하게 포상합니다.<br>국고가 권장량보다 적어지더라도 시도합니다.',
|
||||||
|
|||||||
@@ -8,7 +8,34 @@ $session = Session::requireLogin()->setReadOnly();
|
|||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$startYear = $gameStor->getValue('startyear');
|
$gameStor->cacheValues(['startyear', 'year']);
|
||||||
|
$startYear = $gameStor->startyear;
|
||||||
|
$year = $gameStor->year;
|
||||||
|
|
||||||
|
$me = $db->queryFirstRow('SELECT no, nation, city FROM general WHERE owner =%i', Session::getUserID());
|
||||||
|
|
||||||
|
if($me){
|
||||||
|
$generalID = $me['no'];
|
||||||
|
$nationID = $me['nation'];
|
||||||
|
$city = $db->queryFirstRow('SELECT city, level, def, wall FROM city WHERE city = %i', $me['city']);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$generalID = 0;
|
||||||
|
$nationID = 0;
|
||||||
|
$city = [
|
||||||
|
'city'=>0,
|
||||||
|
'level'=>5,
|
||||||
|
'def'=>1000,
|
||||||
|
'wall'=>1000,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($nationID){
|
||||||
|
$nation = $db->queryFirstRow('SELECT level, type, tech, capital FROM nation WHERE nation = %i', $nationID);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$nation = null;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -30,6 +57,8 @@ $startYear = $gameStor->getValue('startyear');
|
|||||||
<?=WebUtil::printJS('js/common.js')?>
|
<?=WebUtil::printJS('js/common.js')?>
|
||||||
<script>
|
<script>
|
||||||
var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
||||||
|
var city = <?=Json::encode($city)?>;
|
||||||
|
var nation = <?=Json::encode($nation)?>;
|
||||||
</script>
|
</script>
|
||||||
<?=WebUtil::printJS('js/battle_simulator.js')?>
|
<?=WebUtil::printJS('js/battle_simulator.js')?>
|
||||||
</head>
|
</head>
|
||||||
@@ -47,7 +76,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="input-group-text">년 시작</span>
|
<span class="input-group-text">년 시작</span>
|
||||||
</div>
|
</div>
|
||||||
<input type="number" class="form-control" id="year" value="<?=$startYear+3?>" min="<?=$startYear?>">
|
<input type="number" class="form-control" id="year" value="<?=$year?>" min="<?=$startYear?>">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<span class="input-group-text">년</span>
|
<span class="input-group-text">년</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +160,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-secondary active">
|
<label class="btn btn-secondary active">
|
||||||
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="2" autocomplete="off" checked>N
|
<input type="radio" name="is_attacker_capital" class="form_is_capital" value="0" autocomplete="off">N
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -145,6 +174,9 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="float-sm-left" style="line-height:25px;">출병자 설정</div>
|
<div class="float-sm-left" style="line-height:25px;">출병자 설정</div>
|
||||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||||
|
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||||
|
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
|
||||||
|
</div>
|
||||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||||
@@ -203,7 +235,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
<input type="radio" name="is_defender_capital" class="form_is_capital" value="1" autocomplete="off">Y
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-secondary active">
|
<label class="btn btn-secondary active">
|
||||||
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off" checked>N
|
<input type="radio" name="is_defender_capital" class="form_is_capital" value="0" autocomplete="off">N
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -236,6 +268,9 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
|
<div class="float-sm-left" style="line-height:25px;">수비자 설정</div>
|
||||||
<div class="float-sm-right btn-toolbar" role="toolbar">
|
<div class="float-sm-right btn-toolbar" role="toolbar">
|
||||||
|
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||||
|
<button type="button" class="btn btn-success btn-general-import-server">서버에서 가져오기</button>
|
||||||
|
</div>
|
||||||
<div class="btn-group btn-group-sm mr-2" role="group">
|
<div class="btn-group btn-group-sm mr-2" role="group">
|
||||||
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
<button type="button" class="btn btn-info btn-general-save">저장</button>
|
||||||
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
<input type="file" class="form_load_general_file" accept=".json" style="display: none;" />
|
||||||
@@ -404,7 +439,7 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group mb-1">
|
<div class="input-group mb-3">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text">귀병숙련</span>
|
<span class="input-group-text">귀병숙련</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -425,11 +460,27 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
<span class="input-group-text">수비여부</span>
|
<span class="input-group-text">수비여부</span>
|
||||||
</div>
|
</div>
|
||||||
<select class="custom-select form_defence_train only_defender">
|
<select class="custom-select form_defence_train only_defender">
|
||||||
|
<option value="90">훈사 90</option>
|
||||||
<option value="80">훈사 80</option>
|
<option value="80">훈사 80</option>
|
||||||
<option value="60">훈사 60</option>
|
<option value="60">훈사 60</option>
|
||||||
|
<option value="40">훈사 40</option>
|
||||||
<option value="999">안함</option>
|
<option value="999">안함</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="input-group mb-1">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">전투 수</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="form-control form_warnum" value="0" step="1">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">승리 수</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="form-control form_killnum" value="0" step="1">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">사살 수</span>
|
||||||
|
</div>
|
||||||
|
<input type="number" class="form-control form_killcrew" value="0" step="1">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -477,5 +528,25 @@ var defaultSpecialDomestic = '<?=GameConst::$defaultSpecialDomestic?>';
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="importModal" class="modal" tabindex="-1" role="dialog">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">장수 목록</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<select id="modalSelector"></select>
|
||||||
|
<p>타국 장수를 선택한 경우 숙련과 아이템은 0으로 초기화됩니다.</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-primary" id='importFromDB'>가져오기</button>
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">닫기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+154
-134
@@ -1,40 +1,56 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
/* font-boostring Block */
|
/* font-boostring Block */
|
||||||
html * {max-height:1000000px;}
|
|
||||||
|
|
||||||
|
html * {
|
||||||
html, body{
|
max-height: 1000000px;
|
||||||
background-color:black;
|
|
||||||
color:white;
|
|
||||||
line-height:1.3;
|
|
||||||
font-family:'맑은 고딕';
|
|
||||||
font-size:13px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
table { font-family:'맑은 고딕'; }
|
html,
|
||||||
font { font-family:'맑은 고딕'; }
|
body {
|
||||||
input { font-family:'맑은 고딕'; font-size:13px; }
|
background-color: black;
|
||||||
select { font-family:'굴림'; line-height:100%; }
|
color: white;
|
||||||
|
line-height: 1.3;
|
||||||
.center{
|
font-family: '맑은 고딕';
|
||||||
text-align:center;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.mimic_flex{
|
table {
|
||||||
|
font-family: '맑은 고딕';
|
||||||
|
}
|
||||||
|
|
||||||
|
font {
|
||||||
|
font-family: '맑은 고딕';
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
font-family: '맑은 고딕';
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
font-family: '굴림';
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.mimic_flex {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border:none;
|
border: none;
|
||||||
padding:0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mimic_flex td, .mimic_flex th {
|
.mimic_flex td,
|
||||||
border:none !important;
|
.mimic_flex th {
|
||||||
|
border: none !important;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.tb_layout {
|
||||||
table.tb_layout {
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -42,159 +58,161 @@ table.tb_layout {
|
|||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
|
|
||||||
.tb_layout td, .tb_layout th {
|
.tb_layout td,
|
||||||
border:solid 1px gray;
|
.tb_layout th {
|
||||||
|
border: solid 1px gray;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
font-family: '맑은 고딕';;
|
font-family: '맑은 고딕';
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.bar_out{
|
div.bar_out {
|
||||||
position:relative;
|
position: relative;
|
||||||
border-top:solid 1px #888888;
|
border-top: solid 1px #888888;
|
||||||
border-bottom:solid 1px #333333;
|
border-bottom: solid 1px #333333;
|
||||||
padding:0;
|
padding: 0;
|
||||||
margin:0;
|
margin: 0;
|
||||||
width:100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.bar_out div{
|
div.bar_out div {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
left:0;
|
left: 0;
|
||||||
top:0;
|
top: 0;
|
||||||
height:100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.bar_out div.bar_in{
|
div.bar_out div.bar_in {
|
||||||
width:100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
.ev_warning{
|
.ev_warning {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ev_notice{
|
.ev_notice {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ev_succes{
|
.ev_succes {
|
||||||
color:lightgreen;
|
color: lightgreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ev_sell{
|
.ev_sell {
|
||||||
color:orange;
|
color: orange;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ev_failed{
|
.ev_failed {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ev_highlight{
|
.ev_highlight {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TODO: 색상값이 아니라 의미에 따라 클래스 지정 */
|
/* TODO: 색상값이 아니라 의미에 따라 클래스 지정 */
|
||||||
|
|
||||||
.o_bullet::before{
|
.o_bullet::before {
|
||||||
color:cyan;
|
color: cyan;
|
||||||
content:"●";
|
content: "●";
|
||||||
}
|
}
|
||||||
|
|
||||||
.o_diamond::before{
|
.o_diamond::before {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
content:"◆";
|
content: "◆";
|
||||||
}
|
}
|
||||||
|
|
||||||
.small_war_log{
|
.small_war_log {
|
||||||
display:inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small_war_log .war_type_attack{
|
.small_war_log .war_type_attack {
|
||||||
color:cyan;
|
color: cyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small_war_log .war_type_defense{
|
.small_war_log .war_type_defense {
|
||||||
color:magenta;
|
color: magenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small_war_log .war_type_siege{
|
.small_war_log .war_type_siege {
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.small_war_log .name_plate {
|
||||||
|
|
||||||
.small_war_log .name_plate{
|
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small_war_log .name_plate_cover{
|
.small_war_log .name_plate_cover {
|
||||||
color:yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small_war_log .crew_plate{
|
.small_war_log .crew_plate {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
font-size:90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_date{
|
.t_date {
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_red{
|
.t_red {
|
||||||
color:red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_blue{
|
.t_blue {
|
||||||
color:blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_green{
|
.t_green {
|
||||||
color:green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_magenta{
|
.t_magenta {
|
||||||
color:magenta;
|
color: magenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_cyan{
|
.t_cyan {
|
||||||
color:cyan;
|
color: cyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_limegreen{
|
.t_limegreen {
|
||||||
color:limegreen;
|
color: limegreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_skyblue{
|
.t_skyblue {
|
||||||
color:skyblue;
|
color: skyblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_orangered{
|
.t_orangered {
|
||||||
color:orangered;
|
color: orangered;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_yellow{
|
.t_yellow {
|
||||||
color:yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
.t_white{
|
.t_white {
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float_left{
|
.float_left {
|
||||||
float:left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip{
|
.tooltip {
|
||||||
font-size:12px;
|
font-size: 12px;
|
||||||
font-family: '맑은 고딕';
|
font-family: '맑은 고딕';
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip_copyable_info .tooltiptext{
|
.tooltip_copyable_info .tooltiptext {
|
||||||
display: inline;
|
display: inline;
|
||||||
color: rgba(0,0,0,0);
|
color: rgba(0, 0, 0, 0);
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,67 +220,69 @@ div.bar_out div.bar_in{
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden_but_copyable{
|
.hidden_but_copyable {
|
||||||
color: rgba(0,0,0,0);
|
color: rgba(0, 0, 0, 0);
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-group-xs > .btn, .btn-xs {
|
.btn-group-xs>.btn,
|
||||||
padding : .25rem .4rem;
|
.btn-xs {
|
||||||
font-size : .875rem;
|
padding: .25rem .4rem;
|
||||||
line-height : .5;
|
font-size: .875rem;
|
||||||
border-radius : .2rem;
|
line-height: .5;
|
||||||
|
border-radius: .2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit_form.viewer{
|
.edit_form.viewer {
|
||||||
max-height:200px;
|
max-height: 200px;
|
||||||
overflow-y:auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trumbowyg-box{
|
.trumbowyg-box {
|
||||||
margin:0;
|
margin: 0;
|
||||||
border-left:none;
|
border-left: none;
|
||||||
border-right:none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit_form.trumbowyg-editor{
|
.edit_form.trumbowyg-editor {
|
||||||
margin:0;
|
margin: 0;
|
||||||
padding:0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commandBasic{
|
.commandBasic {
|
||||||
background-color:black;
|
background-color: black;
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.compensatePositive{
|
.compensatePositive {
|
||||||
color:skyblue;
|
color: skyblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.compensateNegative{
|
.compensateNegative {
|
||||||
color:orange;
|
color: orange;
|
||||||
}
|
}
|
||||||
|
|
||||||
.compensateNeutral{
|
.compensateNeutral {
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commandBasic.commandImpossible{
|
.commandBasic.commandImpossible {
|
||||||
background-color:red;
|
background-color: red;
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-selection--single.simple-select2-align-center .select2-selection__rendered {
|
.select2-selection--single.simple-select2-align-center .select2-selection__rendered {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-dropdown.simple-select2-align-center li.select2-results__option{
|
.select2-dropdown.simple-select2-align-center li.select2-results__option {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .select2-selection--single.text-secondary .select2-selection__rendered{
|
.select2-container--bootstrap4 .select2-selection--single.text-secondary .select2-selection__rendered {
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-container--bootstrap4 .text-secondary .select2-results__option[aria-selected=false]{
|
.select2-container--bootstrap4 .text-secondary .select2-results__option[aria-selected=false] {
|
||||||
color:white;
|
color: white;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#inheritance_list{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inherit_padding{
|
||||||
|
width: 33%;
|
||||||
|
padding: 10px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inherit_item{
|
||||||
|
width: 33%;
|
||||||
|
padding: 10px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-form-label{
|
||||||
|
text-align:right;
|
||||||
|
padding-right:2ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inherit_value{
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
.container {
|
||||||
|
width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card_holder {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card {
|
||||||
|
width: 125px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card h4 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card .select_btn {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card label {
|
||||||
|
display: block;
|
||||||
|
padding-left: 15px;
|
||||||
|
text-indent: -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.general_card input {
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
vertical-align: bottom;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
*overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#outdate_token {
|
||||||
|
color: red;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#left_pad button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom_picture {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom_personality {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom_stat {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
+83
-17
@@ -185,7 +185,8 @@ function myNationInfo(General $generalObj)
|
|||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
$admin = $gameStor->getValues(['startyear', 'year']);
|
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||||
|
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
|
||||||
|
|
||||||
$nationID = $generalObj->getNationID();
|
$nationID = $generalObj->getNationID();
|
||||||
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation = %i', $nationID)??getNationStaticInfo(0);
|
$nation = $db->queryFirstRow('SELECT * FROM nation WHERE nation = %i', $nationID)??getNationStaticInfo(0);
|
||||||
@@ -200,6 +201,17 @@ function myNationInfo(General $generalObj)
|
|||||||
$level12Name = key_exists(12, $topChiefs)?getColoredName($topChiefs[12]['name'], $topChiefs[12]['npc']):'-';
|
$level12Name = key_exists(12, $topChiefs)?getColoredName($topChiefs[12]['name'], $topChiefs[12]['npc']):'-';
|
||||||
$level11Name = key_exists(11, $topChiefs)?getColoredName($topChiefs[11]['name'], $topChiefs[11]['npc']):'-';
|
$level11Name = key_exists(11, $topChiefs)?getColoredName($topChiefs[11]['name'], $topChiefs[11]['npc']):'-';
|
||||||
|
|
||||||
|
$impossibleStrategicCommandLists = [];
|
||||||
|
$strategicCommandLists = GameConst::$availableChiefCommand['전략'];
|
||||||
|
$yearMonth = Util::joinYearMonth($admin['year'], $admin['month']);
|
||||||
|
foreach($strategicCommandLists as $command){
|
||||||
|
$cmd = buildNationCommandClass($command, $generalObj, $admin, new LastTurn());
|
||||||
|
$nextAvailableTurn = $cmd->getNextAvailableTurn();
|
||||||
|
if($nextAvailableTurn > $yearMonth){
|
||||||
|
$impossibleStrategicCommandLists[] = [$cmd->getName(), $nextAvailableTurn - $yearMonth];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "<table width=498 class='tb_layout bg2 nation_info'>
|
echo "<table width=498 class='tb_layout bg2 nation_info'>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4 ";
|
<td colspan=4 ";
|
||||||
@@ -282,10 +294,23 @@ function myNationInfo(General $generalObj)
|
|||||||
} else {
|
} else {
|
||||||
if ($nation['strategic_cmd_limit'] != 0) {
|
if ($nation['strategic_cmd_limit'] != 0) {
|
||||||
$nation['strategic_cmd_limit'] = "<font color=red>{$nation['strategic_cmd_limit']}턴</font>";
|
$nation['strategic_cmd_limit'] = "<font color=red>{$nation['strategic_cmd_limit']}턴</font>";
|
||||||
} else {
|
} else if($impossibleStrategicCommandLists) {
|
||||||
|
$nation['strategic_cmd_limit'] = "<font color=yellow>가 능</font>";
|
||||||
|
} else{
|
||||||
$nation['strategic_cmd_limit'] = "<font color=limegreen>가 능</font>";
|
$nation['strategic_cmd_limit'] = "<font color=limegreen>가 능</font>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($impossibleStrategicCommandLists){
|
||||||
|
$text = [];
|
||||||
|
foreach($impossibleStrategicCommandLists as [$cmdName, $remainTurn]){
|
||||||
|
$text[] = "{$cmdName}: {$remainTurn}턴 뒤";
|
||||||
|
}
|
||||||
|
$nation['strategic_cmd_limit'] = $templates->render('tooltip', [
|
||||||
|
'text'=>'<span style="text-decoration:underline dashed;">'.$nation['strategic_cmd_limit'].'</span>',
|
||||||
|
'info'=>'<span class="text-left d-inline-block">'.join('<br>', $text).'</span>',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($nation['surlimit'] != 0) {
|
if ($nation['surlimit'] != 0) {
|
||||||
$nation['surlimit'] = "<font color=red>{$nation['surlimit']}턴</font>";
|
$nation['surlimit'] = "<font color=red>{$nation['surlimit']}턴</font>";
|
||||||
} else {
|
} else {
|
||||||
@@ -1199,7 +1224,7 @@ function updateOnline()
|
|||||||
|
|
||||||
//동접수
|
//동접수
|
||||||
$before5Min = TimeUtil::nowAddMinutes(-5);
|
$before5Min = TimeUtil::nowAddMinutes(-5);
|
||||||
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s', $before5Min);
|
$onlineUser = $db->query('SELECT no,name,nation FROM general WHERE lastrefresh > %s AND npc < 2', $before5Min);
|
||||||
$onlineNum = count($onlineUser);
|
$onlineNum = count($onlineUser);
|
||||||
$onlineNationUsers = Util::arrayGroupBy($onlineUser, 'nation');
|
$onlineNationUsers = Util::arrayGroupBy($onlineUser, 'nation');
|
||||||
|
|
||||||
@@ -1512,7 +1537,18 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
|||||||
//일단은 '획득' 시에만 동작하므로 이대로 사용하기로...
|
//일단은 '획득' 시에만 동작하므로 이대로 사용하기로...
|
||||||
$occupiedUnique = [];
|
$occupiedUnique = [];
|
||||||
|
|
||||||
|
$invalidItemType = [];
|
||||||
|
foreach(array_keys(GameConst::$allItems) as $itemType){
|
||||||
|
$ownItem = $general->getItems()[$itemType]??null;
|
||||||
|
if($ownItem !== null && !$ownItem->isBuyable()){
|
||||||
|
$invalidItemType[$itemType] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (array_keys(GameConst::$allItems) as $itemType) {
|
foreach (array_keys(GameConst::$allItems) as $itemType) {
|
||||||
|
if(key_exists($itemType, $invalidItemType)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
foreach ($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]) {
|
foreach ($db->queryAllLists('SELECT %b, count(*) as cnt FROM general GROUP BY %b', $itemType, $itemType) as [$itemCode, $cnt]) {
|
||||||
$itemClass = buildItemClass($itemCode);
|
$itemClass = buildItemClass($itemCode);
|
||||||
if (!$itemClass) {
|
if (!$itemClass) {
|
||||||
@@ -1526,7 +1562,13 @@ function giveRandomUniqueItem(General $general, string $acquireType): bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (GameConst::$allItems as $itemType => $itemCategories) {
|
foreach (GameConst::$allItems as $itemType => $itemCategories) {
|
||||||
|
if(key_exists($itemType, $invalidItemType)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
foreach ($itemCategories as $itemCode => $cnt) {
|
foreach ($itemCategories as $itemCode => $cnt) {
|
||||||
|
if($cnt == 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!key_exists($itemCode, $occupiedUnique)) {
|
if (!key_exists($itemCode, $occupiedUnique)) {
|
||||||
$availableUnique[] = [[$itemType, $itemCode], $cnt];
|
$availableUnique[] = [[$itemType, $itemCode], $cnt];
|
||||||
continue;
|
continue;
|
||||||
@@ -1579,37 +1621,55 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$itemTypeCnt = count(GameConst::$allItems);
|
||||||
|
$trialCnt = $itemTypeCnt;
|
||||||
|
|
||||||
foreach ($general->getItems() as $item) {
|
foreach ($general->getItems() as $item) {
|
||||||
if (!$item) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!$item->isBuyable()) {
|
if (!$item->isBuyable()) {
|
||||||
return false;
|
$trialCnt -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($trialCnt <= 0){
|
||||||
|
LogText("{$general->getName()}, {$general->getID()} 모든 아이템", $trialCnt);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scenario = $gameStor->scenario;
|
$scenario = $gameStor->scenario;
|
||||||
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
|
$genCount = $db->queryFirstField('SELECT count(*) FROM general WHERE npc<2');
|
||||||
|
|
||||||
if ($scenario < 100) {
|
if ($scenario < 100) {
|
||||||
$prob = 1 / ($genCount * 5); // 5~6개월에 하나씩 등장
|
$prob = 1 / ($genCount * 3 * $itemTypeCnt); // 3~4개월에 하나씩 등장
|
||||||
} else {
|
} else {
|
||||||
$prob = 1 / $genCount; // 1~2개월에 하나씩 등장
|
$prob = 1 / ($genCount * $itemTypeCnt); // 1~2개월에 하나씩 등장
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($acquireType == '설문조사') {
|
if ($acquireType == '설문조사') {
|
||||||
$prob = 1 / ($genCount * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
|
$prob = 1 / ($genCount * $itemTypeCnt * 0.7 / 3); // 투표율 70%, 설문조사 한번에 2~3개 등장
|
||||||
} else if ($acquireType == '랜덤 임관') {
|
} else if ($acquireType == '랜덤 임관') {
|
||||||
$prob = 1 / ($genCount / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
|
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 2); // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?)
|
||||||
} else if ($acquireType == '건국') {
|
} else if ($acquireType == '건국') {
|
||||||
$prob = 1 / ($genCount / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
|
$prob = 1 / ($genCount * $itemTypeCnt / 10 / 4); // 건국시 4개(20%) 등장(200명시 20국 정도 됨)
|
||||||
}
|
}
|
||||||
|
|
||||||
$prob = Util::valueFit($prob, null, 1 / 3);
|
$prob = Util::valueFit($prob, null, 1 / 4);//최대치 감소
|
||||||
|
$result = false;
|
||||||
|
|
||||||
if (!Util::randBool($prob)) {
|
|
||||||
|
|
||||||
|
foreach(Util::range($trialCnt) as $_idx){
|
||||||
|
if (Util::randBool($prob)) {
|
||||||
|
$result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!$result){
|
||||||
|
LogText("{$general->getName()}, {$general->getID()} 유니크 실패 {$trialCnt}", $prob);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
LogText("{$general->getName()}, {$general->getID()} 유니크 성공 {$trialCnt}", $prob);
|
||||||
|
|
||||||
return giveRandomUniqueItem($general, $acquireType);
|
return giveRandomUniqueItem($general, $acquireType);
|
||||||
}
|
}
|
||||||
@@ -1647,7 +1707,7 @@ function deleteNation(General $lord, bool $applyDB):array
|
|||||||
$nationID,
|
$nationID,
|
||||||
$lordID
|
$lordID
|
||||||
),
|
),
|
||||||
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'aux'], 1
|
['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'belong', 'aux'], 1
|
||||||
);
|
);
|
||||||
$nationGeneralList[$lordID] = $lord;
|
$nationGeneralList[$lordID] = $lord;
|
||||||
|
|
||||||
@@ -1664,6 +1724,12 @@ function deleteNation(General $lord, bool $applyDB):array
|
|||||||
|
|
||||||
// 전 장수 재야로
|
// 전 장수 재야로
|
||||||
foreach($nationGeneralList as $general){
|
foreach($nationGeneralList as $general){
|
||||||
|
$general->setAuxVar('max_belong',
|
||||||
|
max(
|
||||||
|
$general->getVar('belong'),
|
||||||
|
$general->getAuxVar('max_belong')??0
|
||||||
|
)
|
||||||
|
);
|
||||||
$general->setVar('belong', 0);
|
$general->setVar('belong', 0);
|
||||||
$general->setVar('troop', 0);
|
$general->setVar('troop', 0);
|
||||||
$general->setVar('officer_level', 0);
|
$general->setVar('officer_level', 0);
|
||||||
@@ -1711,7 +1777,7 @@ function nextRuler(General $general)
|
|||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
[$year, $month] = $gameStor->getValuesAsArray(['year', 'month']);
|
[$year, $month, $fiction] = $gameStor->getValuesAsArray(['year', 'month', 'fiction']);
|
||||||
$nation = $general->getStaticNation();
|
$nation = $general->getStaticNation();
|
||||||
$nationName = $nation['name'];
|
$nationName = $nation['name'];
|
||||||
$nationID = $nation['nation'];
|
$nationID = $nation['nation'];
|
||||||
@@ -1719,7 +1785,7 @@ function nextRuler(General $general)
|
|||||||
$candidate = null;
|
$candidate = null;
|
||||||
|
|
||||||
//npc or npc유저인 경우 후계 찾기
|
//npc or npc유저인 경우 후계 찾기
|
||||||
if ($general->getNPCType() > 0) {
|
if (!$fiction && $general->getNPCType() > 0) {
|
||||||
$candidate = $db->queryFirstRow(
|
$candidate = $db->queryFirstRow(
|
||||||
'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1',
|
'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1',
|
||||||
$general->getVar('affinity'),
|
$general->getVar('affinity'),
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ function checkCommandArg(?array $arg):?string{
|
|||||||
}
|
}
|
||||||
$defaultCheck = [
|
$defaultCheck = [
|
||||||
/*'string'=>[
|
/*'string'=>[
|
||||||
'nationName', 'optionText', 'itemType', 'nationType'
|
'nationName', 'optionText', 'itemType', 'nationType', 'commandType',
|
||||||
],*/
|
],*/
|
||||||
'integer'=>[
|
'integer'=>[
|
||||||
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
|
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
|
||||||
@@ -284,14 +284,14 @@ function setGeneralCommand(int $generalID, array $rawTurnList, string $command,
|
|||||||
$turnList[$turnIdx] = true;
|
$turnList[$turnIdx] = true;
|
||||||
}
|
}
|
||||||
else if($turnIdx == -1){
|
else if($turnIdx == -1){
|
||||||
//홀수
|
//홀수, 0부터 맞다.
|
||||||
foreach(Util::range(1, GameConst::$maxTurn, 2) as $subIdx){
|
foreach(Util::range(0, GameConst::$maxTurn, 2) as $subIdx){
|
||||||
$turnList[$subIdx] = true;
|
$turnList[$subIdx] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($turnIdx == -2){
|
else if($turnIdx == -2){
|
||||||
//짝수
|
//짝수, 1부터 맞다.
|
||||||
foreach(Util::range(0, GameConst::$maxTurn, 2) as $subIdx){
|
foreach(Util::range(1, GameConst::$maxTurn, 2) as $subIdx){
|
||||||
$turnList[$subIdx] = true;
|
$turnList[$subIdx] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -378,6 +378,30 @@ function buildWarUnitTriggerClass(?string $type, WarUnit $unit, ?array $args = n
|
|||||||
return $class->newInstanceArgs(array_merge([$unit], $args));
|
return $class->newInstanceArgs(array_merge([$unit], $args));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getGeneralPoolClass(string $type){
|
||||||
|
static $basePath = __NAMESPACE__.'\\GeneralPool\\';
|
||||||
|
$classPath = ($basePath.$type);
|
||||||
|
|
||||||
|
if(class_exists($classPath)){
|
||||||
|
return $classPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \InvalidArgumentException("{$type}은 GeneralPool이 아님");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \MeekroDB $db
|
||||||
|
* @param int $owner
|
||||||
|
* @param int $pickCnt
|
||||||
|
* @param null|string $prefix
|
||||||
|
* @return AbsGeneralPool[]
|
||||||
|
*/
|
||||||
|
function pickGeneralFromPool(\MeekroDB $db, int $owner, int $pickCnt, ?string $prefix=null):array{
|
||||||
|
/** @var AbsGeneralPool */
|
||||||
|
$class = getGeneralPoolClass(GameConst::$targetGeneralPool);
|
||||||
|
return $class::pickGeneralFromPool($db, $owner, $pickCnt, $prefix);
|
||||||
|
}
|
||||||
|
|
||||||
function countPureGeneralFromRawList(?array $rawGeneralList=null):int{
|
function countPureGeneralFromRawList(?array $rawGeneralList=null):int{
|
||||||
if(!$rawGeneralList){
|
if(!$rawGeneralList){
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+60
-25
@@ -516,6 +516,7 @@ function checkWander()
|
|||||||
$logger = $wanderer->getLogger();
|
$logger = $wanderer->getLogger();
|
||||||
$logger->pushGeneralActionLog('초반 제한후 방랑군은 자동 해산됩니다.', ActionLogger::PLAIN);
|
$logger->pushGeneralActionLog('초반 제한후 방랑군은 자동 해산됩니다.', ActionLogger::PLAIN);
|
||||||
$wanderCmd->run();
|
$wanderCmd->run();
|
||||||
|
$wanderCmd->setNextAvailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -622,30 +623,38 @@ function updateNationState()
|
|||||||
$nation['nation'],
|
$nation['nation'],
|
||||||
$targetKillTurn
|
$targetKillTurn
|
||||||
);
|
);
|
||||||
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong'], 2);
|
$nationGenList = General::createGeneralObjListFromDB($nationGenIDList, ['belong', 'npc'], 2);
|
||||||
|
$chiefObj = null;
|
||||||
|
|
||||||
$uniqueLotteryWeightList = [];
|
$uniqueLotteryWeightList = [];
|
||||||
foreach ($nationGenList as $nationGen) {
|
foreach ($nationGenList as $nationGen) {
|
||||||
$hasUnique = false;
|
if ($nationGen->getVar('officer_level') == 12) {
|
||||||
|
$chiefObj = $nationGen;
|
||||||
|
}
|
||||||
|
$trialCnt = count(GameConst::$allItems);
|
||||||
|
|
||||||
foreach ($nationGen->getItems() as $item) {
|
foreach ($nationGen->getItems() as $item) {
|
||||||
if (!$item->isBuyable()) {
|
if (!$item->isBuyable()) {
|
||||||
$hasUnique = true;
|
$trialCnt -= 1;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($hasUnique) {
|
|
||||||
|
if ($trialCnt <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$score = $nationGen->getVar('belong') + 5;
|
$score = $nationGen->getVar('belong') + 5;
|
||||||
|
|
||||||
if ($nationGen->getVar('officer_level') == 12) {
|
if ($nationGen->getVar('officer_level') == 12) {
|
||||||
$score += 200; //NOTE: 꼬우면 군주하세요.
|
$score += 100; //NOTE: 꼬우면 군주하세요.
|
||||||
} else if ($nationGen->getVar('officer_level') == 11) {
|
} else if ($nationGen->getVar('officer_level') == 11) {
|
||||||
$score += 70;
|
$score += 50;
|
||||||
} else if ($nationGen->getVar('officer_level') > 4) {
|
} else if ($nationGen->getVar('officer_level') > 4) {
|
||||||
$score += 35;
|
$score += 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$score *= $trialCnt;
|
||||||
|
|
||||||
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
|
$uniqueLotteryWeightList[$nationGen->getID()] = [$nationGen, $score];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -660,6 +669,10 @@ function updateNationState()
|
|||||||
giveRandomUniqueItem($winnerObj, '작위보상');
|
giveRandomUniqueItem($winnerObj, '작위보상');
|
||||||
$winnerObj->applyDB($db);
|
$winnerObj->applyDB($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($chiefObj){
|
||||||
|
$chiefObj->increaseInheritancePoint('unifier', 250 * $levelDiff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -679,31 +692,22 @@ function updateNationState()
|
|||||||
|
|
||||||
while ($assemblerCnt < $maxAssemblerCnt) {
|
while ($assemblerCnt < $maxAssemblerCnt) {
|
||||||
$lastAssemblerID += 1;
|
$lastAssemblerID += 1;
|
||||||
$npcObj = new Scenario\NPC(
|
$npcObj = new Scenario\GeneralBuilder(
|
||||||
999,
|
|
||||||
sprintf('부대장%4d', $lastAssemblerID),
|
sprintf('부대장%4d', $lastAssemblerID),
|
||||||
|
0,
|
||||||
null,
|
null,
|
||||||
$nation['nation'],
|
$nation['nation']
|
||||||
null,
|
|
||||||
10,
|
|
||||||
10,
|
|
||||||
10,
|
|
||||||
1,
|
|
||||||
$admin['year'] - 15,
|
|
||||||
$admin['year'] + 15,
|
|
||||||
'은둔',
|
|
||||||
'척사'
|
|
||||||
);
|
);
|
||||||
$npcObj->killturn = 70;
|
$npcObj->setAffinity(999)->setStat(10, 10, 10)
|
||||||
$npcObj->gold = 0;
|
->setSpecialSingle('척사')->setEgo('che_은둔')
|
||||||
$npcObj->rice = 0;
|
->setKillturn(70)->setGoldRice(0, 0)
|
||||||
$npcObj->npc = 5;
|
->setNPCType(5)->fillRemainSpecAsZero($admin);
|
||||||
$npcObj->build($admin);
|
$npcObj->build($admin);
|
||||||
$npcID = $npcObj->generalID;
|
$npcID = $npcObj->getGeneralID();
|
||||||
|
|
||||||
$db->insert('troop', [
|
$db->insert('troop', [
|
||||||
'troop_leader' => $npcID,
|
'troop_leader' => $npcID,
|
||||||
'name' => $npcObj->realName,
|
'name' => $npcObj->getGeneralName(),
|
||||||
'nation' => $nation['nation'],
|
'nation' => $nation['nation'],
|
||||||
]);
|
]);
|
||||||
$db->update('general', [
|
$db->update('general', [
|
||||||
@@ -986,6 +990,15 @@ function checkEmperior()
|
|||||||
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
|
$nationLogger = new ActionLogger(0, $nationID, $admin['year'], $admin['month']);
|
||||||
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
|
$nationLogger->pushNationalHistoryLog("<D><b>{$nationName}</b></>{$josaYi} 전토를 통일");
|
||||||
|
|
||||||
|
foreach(General::createGeneralObjListFromDB($db->queryFirstColumn('SELECT `no` FROM general WHERE npc = 0')) as $genObj){
|
||||||
|
if($genObj->getNationID() == $nationID){
|
||||||
|
if($genObj->getVar('officer_level') > 4){
|
||||||
|
$genObj->increaseInheritancePoint('unifier', 2000);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$genObj->mergeTotalInheritancePoint();
|
||||||
|
}
|
||||||
|
|
||||||
$gameStor->isunited = 2;
|
$gameStor->isunited = 2;
|
||||||
$gameStor->conlimit = $gameStor->conlimit * 100;
|
$gameStor->conlimit = $gameStor->conlimit * 100;
|
||||||
|
|
||||||
@@ -1136,3 +1149,25 @@ function checkEmperior()
|
|||||||
//연감 월결산
|
//연감 월결산
|
||||||
LogHistory();
|
LogHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetInheritanceUser(int $userID){
|
||||||
|
$inheritStor = KVStorage::getStorage(DB::db(), "inheritance_{$userID}");
|
||||||
|
$totalPoint = 0;
|
||||||
|
foreach($inheritStor->getAll() as [$value,]){
|
||||||
|
$totalPoint += $value;
|
||||||
|
}
|
||||||
|
$totalPoint = Util::toInt($totalPoint);
|
||||||
|
$inheritStor->resetValues();
|
||||||
|
$inheritStor->setValue('previous', [$totalPoint, null]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateMaxDomesticCritical(General $general, $score){
|
||||||
|
$maxDomesticCritical = $general->getAuxVar('max_domestic_critical')??0;
|
||||||
|
$maxDomesticCritical += $score / 2;
|
||||||
|
$general->setAuxVar('max_domestic_critical', $maxDomesticCritical);
|
||||||
|
|
||||||
|
$oldMaxDomesticCritical = $general->getInheritancePoint('max_domestic_critical');
|
||||||
|
if($maxDomesticCritical > $oldMaxDomesticCritical){
|
||||||
|
$general->setInheritancePoint('max_domestic_critical', $maxDomesticCritical);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -217,10 +217,14 @@ function formatDefenceTrain(int $value): string
|
|||||||
{
|
{
|
||||||
if ($value === 999) {
|
if ($value === 999) {
|
||||||
return "×";
|
return "×";
|
||||||
|
} else if ($value >= 90){
|
||||||
|
return "☆";
|
||||||
} else if ($value >= 80) {
|
} else if ($value >= 80) {
|
||||||
return "◎";
|
return "◎";
|
||||||
} else {
|
} else if ($value >= 60) {
|
||||||
return "○";
|
return "○";
|
||||||
|
} else{
|
||||||
|
return "△";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-6
@@ -523,7 +523,7 @@ function selection($tnmt_type, $tnmt, $phase) {
|
|||||||
if($phase < 31) {
|
if($phase < 31) {
|
||||||
$gameStor->phase+=1;
|
$gameStor->phase+=1;
|
||||||
} else {
|
} else {
|
||||||
$gameStor->tournamemt = 4;
|
$gameStor->tournament = 4;
|
||||||
$gameStor->phase=0;
|
$gameStor->phase=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -689,7 +689,8 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
|||||||
'grp_no'=>$general['grp_no'],
|
'grp_no'=>$general['grp_no'],
|
||||||
'reward'=>$cost,
|
'reward'=>$cost,
|
||||||
'msg'=>"<span class='ev_highlight'>16강 진출</span>",
|
'msg'=>"<span class='ev_highlight'>16강 진출</span>",
|
||||||
'logger'=>$logger
|
'logger'=>$logger,
|
||||||
|
'inheritance_point'=>10,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
//8강자 명성 돈
|
//8강자 명성 돈
|
||||||
@@ -723,6 +724,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
|||||||
//포상 장수 이름, 금액
|
//포상 장수 이름, 금액
|
||||||
$resultHelper[$generalID]['reward'] += $cost;
|
$resultHelper[$generalID]['reward'] += $cost;
|
||||||
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>4강 진출</span>";
|
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>4강 진출</span>";
|
||||||
|
General::createGeneralObjFromDB($generalID)->increaseInheritancePoint('tournament', 10);
|
||||||
}
|
}
|
||||||
//결승자 명성 돈
|
//결승자 명성 돈
|
||||||
$cost = $admin['develcost'] * 6;
|
$cost = $admin['develcost'] * 6;
|
||||||
@@ -739,6 +741,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
|||||||
//포상 장수 이름, 금액
|
//포상 장수 이름, 금액
|
||||||
$resultHelper[$generalID]['reward'] += $cost;
|
$resultHelper[$generalID]['reward'] += $cost;
|
||||||
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>준우승</span>으";
|
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>준우승</span>으";
|
||||||
|
$resultHelper[$generalID]['inheritance_point'] = 50;
|
||||||
if($general['lose'] > 0){
|
if($general['lose'] > 0){
|
||||||
$runnerUp = $general;
|
$runnerUp = $general;
|
||||||
}
|
}
|
||||||
@@ -761,6 +764,7 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
|||||||
//포상 장수 이름, 금액
|
//포상 장수 이름, 금액
|
||||||
$resultHelper[$generalID]['reward'] += $cost;
|
$resultHelper[$generalID]['reward'] += $cost;
|
||||||
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>우승</span>으";
|
$resultHelper[$generalID]['msg'] = "<span class='ev_highlight'>우승</span>으";
|
||||||
|
$resultHelper[$generalID]['inheritance_point'] = 100;
|
||||||
$winner = $general;
|
$winner = $general;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,9 +779,6 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
|||||||
$runnerUpLogger = $resultHelper[$runnerUp['no']]['logger'];
|
$runnerUpLogger = $resultHelper[$runnerUp['no']]['logger'];
|
||||||
$runnerUpLogger->pushGeneralHistoryLog("<C>{$tp}</> 대회에서 준우승");
|
$runnerUpLogger->pushGeneralHistoryLog("<C>{$tp}</> 대회에서 준우승");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$winnerRewardText = number_format($resultHelper[$winner['no']]['reward']);
|
$winnerRewardText = number_format($resultHelper[$winner['no']]['reward']);
|
||||||
$runnerUpRewardText = number_format($resultHelper[$runnerUp['no']]['reward']);
|
$runnerUpRewardText = number_format($resultHelper[$runnerUp['no']]['reward']);
|
||||||
|
|
||||||
@@ -787,11 +788,15 @@ function setGift($tnmt_type, $tnmt, $phase) {
|
|||||||
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
|
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회에서 <Y>{$winner['name']}</>{$josaYiWinner} <C>우승</>, <Y>{$runnerUp['name']}</>{$josaYiRunnerUp} <C>준우승</>을 차지하여 천하에 이름을 떨칩니다!", ActionLogger::EVENT_YEAR_MONTH);
|
||||||
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
|
$winnerLogger->pushGlobalHistoryLog("<C>{$tp}</> 대회의 <S>우승자</>에게는 <C>{$winnerRewardText}</>, <S>준우승자</>에겐 <C>{$runnerUpRewardText}</>의 <S>상금</>과 약간의 <S>명성</>이 주어집니다!", ActionLogger::EVENT_YEAR_MONTH);
|
||||||
|
|
||||||
foreach($resultHelper as $general){
|
$generalObjList = General::createGeneralObjListFromDB(array_keys($resultHelper));
|
||||||
|
|
||||||
|
foreach($resultHelper as $generalID=>$general){
|
||||||
$rewardText = number_format($general['reward']);
|
$rewardText = number_format($general['reward']);
|
||||||
/** @var ActionLogger */
|
/** @var ActionLogger */
|
||||||
$logger = $general['logger'];
|
$logger = $general['logger'];
|
||||||
$logger->pushGeneralActionLog("<C>{$tp}</> 대회의 {$general['msg']}로 <C>{$rewardText}</>의 <S>상금</>, 약간의 <S>명성</> 획득!", ActionLogger::EVENT_PLAIN);
|
$logger->pushGeneralActionLog("<C>{$tp}</> 대회의 {$general['msg']}로 <C>{$rewardText}</>의 <S>상금</>, 약간의 <S>명성</> 획득!", ActionLogger::EVENT_PLAIN);
|
||||||
|
//TODO: 토너먼트의 다른 값이 모두 sql에 직접 입력하므로 기반을 바꿔야함.
|
||||||
|
$generalObjList[$generalID]->increaseInheritancePoint('tournament', $general['inheritance_point']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//우승자 번호
|
//우승자 번호
|
||||||
|
|||||||
+7
-5
@@ -61,7 +61,7 @@ $scenario = $gameStor->scenario_text;
|
|||||||
$nationID = $generalObj->getNationID();
|
$nationID = $generalObj->getNationID();
|
||||||
if($nationID){
|
if($nationID){
|
||||||
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
|
||||||
$nationStor->cacheValues(['notice', 'online_genenerals']);
|
$nationStor->cacheAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
$valid = 0;
|
$valid = 0;
|
||||||
@@ -79,9 +79,11 @@ if ($gameStor->fiction == 0) {
|
|||||||
}
|
}
|
||||||
if ($gameStor->npcmode == 0) {
|
if ($gameStor->npcmode == 0) {
|
||||||
$npcmode = "불가능";
|
$npcmode = "불가능";
|
||||||
} else {
|
} else if($gameStor->npcmode == 1){
|
||||||
$npcmode = "가능";
|
$npcmode = "가능";
|
||||||
$valid = 1;
|
$valid = 1;
|
||||||
|
} else {
|
||||||
|
$npcmode = "선택 생성";
|
||||||
}
|
}
|
||||||
$color = "cyan";
|
$color = "cyan";
|
||||||
$mapTheme = $gameStor->map_theme;
|
$mapTheme = $gameStor->map_theme;
|
||||||
@@ -134,7 +136,7 @@ $(function(){
|
|||||||
<body class="img_back">
|
<body class="img_back">
|
||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div><?=allButton($gameStor->npcmode!=0)?></div>
|
<div><?=allButton($gameStor->npcmode==1)?></div>
|
||||||
<table class="tb_layout bg0" style="width:1000px;">
|
<table class="tb_layout bg0" style="width:1000px;">
|
||||||
<tr height=50>
|
<tr height=50>
|
||||||
<td colspan=5 id="server_title" align=center><font size=4>삼국지 모의전투 HiDCHe <?=$serverName.$serverCnt?>기 (<font color=cyan><?=$scenario?></font>)</font></td>
|
<td colspan=5 id="server_title" align=center><font size=4>삼국지 모의전투 HiDCHe <?=$serverName.$serverCnt?>기 (<font color=cyan><?=$scenario?></font>)</font></td>
|
||||||
@@ -341,7 +343,7 @@ else if($session->userGrade == 4){
|
|||||||
<button id="msg_submit">서신전달&갱신</button><br>
|
<button id="msg_submit">서신전달&갱신</button><br>
|
||||||
내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다.
|
내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다.
|
||||||
</div>
|
</div>
|
||||||
<div><?=allButton($gameStor->npcmode!=0)?></div>
|
<div><?=allButton($gameStor->npcmode==1)?></div>
|
||||||
<div id="message_board"><div style="left:0;" class="board_side bg0">
|
<div id="message_board"><div style="left:0;" class="board_side bg0">
|
||||||
<div class="board_header bg0" id='public_talk_position'>전체 메시지(최고99자)</div>
|
<div class="board_header bg0" id='public_talk_position'>전체 메시지(최고99자)</div>
|
||||||
<section class="public_message">
|
<section class="public_message">
|
||||||
@@ -361,7 +363,7 @@ else if($session->userGrade == 4){
|
|||||||
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="diplomacy">이전 메시지 불러오기</button>
|
<button type="button" class="load_old_message btn btn-secondary btn-block" data-msg_type="diplomacy">이전 메시지 불러오기</button>
|
||||||
</section>
|
</section>
|
||||||
</div></div>
|
</div></div>
|
||||||
<div style="clear:left;"><?=allButton($gameStor->npcmode!=0)?><?=banner()?></div>
|
<div style="clear:left;"><?=allButton($gameStor->npcmode==1)?><?=banner()?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($con == 1) {
|
if ($con == 1) {
|
||||||
|
|||||||
+18
-1
@@ -102,7 +102,7 @@ if($session->userGrade < 5 && !$allowReset){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="confirm_password" class="col-sm-3 col-form-label">시나리오 선택</label>
|
<label for="scenario_sel" class="col-sm-3 col-form-label">시나리오 선택</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select class="form-control" name="scenario" size="1" id="scenario_sel">
|
<select class="form-control" name="scenario" size="1" id="scenario_sel">
|
||||||
</select>
|
</select>
|
||||||
@@ -138,6 +138,20 @@ if($session->userGrade < 5 && !$allowReset){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label for="block_general_create" class="col-sm-3 col-form-label">장수 임의 생성</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<div id="block_general_create" class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||||
|
<label class="btn btn-secondary">
|
||||||
|
<input type="radio" name="block_general_create" value="0" checked>가능
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-secondary active">
|
||||||
|
<input type="radio" name="block_general_create" value="1">불가
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
|
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@@ -148,6 +162,9 @@ if($session->userGrade < 5 && !$allowReset){
|
|||||||
<label class="btn btn-secondary active">
|
<label class="btn btn-secondary active">
|
||||||
<input type="radio" name="npcmode" value="0" checked>불가
|
<input type="radio" name="npcmode" value="0" checked>불가
|
||||||
</label>
|
</label>
|
||||||
|
<label class="btn btn-secondary">
|
||||||
|
<input type="radio" name="npcmode" value="2">선택 생성 가능
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+5
-4
@@ -52,7 +52,7 @@ else if(
|
|||||||
$now->getTimestamp() - $lastTurn->getTimestamp() > $reservedDate->getTimestamp() - $now->getTimestamp()
|
$now->getTimestamp() - $lastTurn->getTimestamp() > $reservedDate->getTimestamp() - $now->getTimestamp()
|
||||||
){
|
){
|
||||||
//정지 상태 & 중간 넘음
|
//정지 상태 & 중간 넘음
|
||||||
AppConf::getList()[DB::prefix()]->closeServer();
|
ServConfig::getServerList()[DB::prefix()]->closeServer();
|
||||||
$status = 'closed';
|
$status = 'closed';
|
||||||
}
|
}
|
||||||
else if(
|
else if(
|
||||||
@@ -60,12 +60,12 @@ else if(
|
|||||||
$now->getTimestamp() - $lastTurn->getTimestamp() > ($reservedDate->getTimestamp() - $now->getTimestamp()) * 2
|
$now->getTimestamp() - $lastTurn->getTimestamp() > ($reservedDate->getTimestamp() - $now->getTimestamp()) * 2
|
||||||
){
|
){
|
||||||
//천통 & 비정지 상태 & 2/3 넘음
|
//천통 & 비정지 상태 & 2/3 넘음
|
||||||
AppConf::getList()[DB::prefix()]->closeServer();
|
ServConfig::getServerList()[DB::prefix()]->closeServer();
|
||||||
$status = 'closed';
|
$status = 'closed';
|
||||||
}
|
}
|
||||||
else if($reservedDate->getTimestamp() - $now->getTimestamp() <= 60*10){
|
else if($reservedDate->getTimestamp() - $now->getTimestamp() <= 60*10){
|
||||||
//어쨌든 간에 10분 남았다면.
|
//어쨌든 간에 10분 남았다면.
|
||||||
AppConf::getList()[DB::prefix()]->closeServer();
|
ServConfig::getServerList()[DB::prefix()]->closeServer();
|
||||||
$status = 'closed';
|
$status = 'closed';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +85,7 @@ $result = ResetHelper::buildScenario(
|
|||||||
$options['scenario'],
|
$options['scenario'],
|
||||||
$options['fiction'],
|
$options['fiction'],
|
||||||
$options['extend'],
|
$options['extend'],
|
||||||
|
$options['block_general_create'],
|
||||||
$options['npcmode'],
|
$options['npcmode'],
|
||||||
$options['show_img_level'],
|
$options['show_img_level'],
|
||||||
$options['tournament_trig'],
|
$options['tournament_trig'],
|
||||||
@@ -96,6 +97,6 @@ $result = ResetHelper::buildScenario(
|
|||||||
$result['affected']=1;
|
$result['affected']=1;
|
||||||
|
|
||||||
$prefix = DB::prefix();
|
$prefix = DB::prefix();
|
||||||
AppConf::getList()[$prefix]->openServer();
|
ServConfig::getServerList()[$prefix]->openServer();
|
||||||
|
|
||||||
Json::die($result);
|
Json::die($result);
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
WebUtil::requireAJAX();
|
||||||
|
|
||||||
|
$destGeneralID = Util::getPost('destGeneralID', 'int', 0);
|
||||||
|
|
||||||
|
if(!$destGeneralID || $destGeneralID <= 0){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'올바르지 않은 장수 코드입니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$session = Session::requireGameLogin([])->setReadOnly();
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
|
||||||
|
increaseRefresh("시뮬레이터 추출", 1);
|
||||||
|
|
||||||
|
$userID = Session::getUserID();
|
||||||
|
$me = $db->queryFirstRow('SELECT no,nation from general where owner=%i', $userID);
|
||||||
|
$nationID = $me['nation'];
|
||||||
|
|
||||||
|
$reqColumns = [
|
||||||
|
'nation',
|
||||||
|
'name', 'officer_level', 'explevel', 'injury',
|
||||||
|
'leadership', 'horse', 'strength', 'weapon', 'intel', 'book', 'item',
|
||||||
|
'rice', 'personal', 'special2',
|
||||||
|
'crew', 'crewtype',
|
||||||
|
'atmos', 'train', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5', 'defence_train',
|
||||||
|
];
|
||||||
|
|
||||||
|
$reqRankColumns = [
|
||||||
|
'warnum', 'killnum', 'killcrew'
|
||||||
|
];
|
||||||
|
|
||||||
|
$dummyItems = [
|
||||||
|
'officer_level'=>1,
|
||||||
|
'horse'=>'None',
|
||||||
|
'weapon'=>'None',
|
||||||
|
'book'=>'None',
|
||||||
|
'item'=>'None',
|
||||||
|
'crew'=>0,
|
||||||
|
'crewtype'=>GameUnitConst::DEFAULT_CREWTYPE,
|
||||||
|
'rice'=>10000,
|
||||||
|
'train'=>GameConst::$maxTrainByCommand,
|
||||||
|
'atmos'=>GameConst::$maxTrainByCommand,
|
||||||
|
'dex1'=>0,
|
||||||
|
'dex2'=>0,
|
||||||
|
'dex3'=>0,
|
||||||
|
'dex4'=>0,
|
||||||
|
'dex5'=>0,
|
||||||
|
'defence_train'=>80,
|
||||||
|
'warnum'=>0,
|
||||||
|
'killnum'=>0,
|
||||||
|
'killcrew'=>0,
|
||||||
|
];
|
||||||
|
|
||||||
|
$rawDestGeneral = $db->queryFirstRow('SELECT %l FROM general WHERE no=%i', Util::formatListOfBackticks($reqColumns), $destGeneralID);
|
||||||
|
|
||||||
|
if($nationID == 0 || $rawDestGeneral['nation'] != $nationID){
|
||||||
|
foreach($dummyItems as $key=>$val){
|
||||||
|
$rawDestGeneral[$key] = $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$rawRankValue = $db->queryAllLists('SELECT `type`, `value` FROM rank_data WHERE general_id = %i AND `type` IN %ls', $destGeneralID, $reqRankColumns);
|
||||||
|
foreach($rawRankValue as [$rankType, $rankValue]){
|
||||||
|
$rawDestGeneral[$rankType] = $rankValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(['dex1', 'dex2', 'dex3', 'dex4', 'dex5'] as $dexKey){
|
||||||
|
$dex = $rawDestGeneral[$dexKey];
|
||||||
|
$rawDestGeneral[$dexKey] = getDexLevelList()[getDexLevel($dex)][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
Json::die([
|
||||||
|
'result'=>true,
|
||||||
|
'reason'=>'success',
|
||||||
|
'general'=>$rawDestGeneral,
|
||||||
|
]);
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
//로그인 검사
|
||||||
|
$session = Session::requireGameLogin([]);
|
||||||
|
$generalID = Session::getGeneralID();
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
|
||||||
|
$rawList = Util::convertArrayToDict($db->query('SELECT no, name, npc, nation FROM general'), 'no');
|
||||||
|
$nationID = $rawList[$generalID]['nation'];
|
||||||
|
|
||||||
|
|
||||||
|
$result = [
|
||||||
|
'result'=>true,
|
||||||
|
'reason'=>'success',
|
||||||
|
'nationID'=>$nationID,
|
||||||
|
'generalID'=>$generalID,
|
||||||
|
'column'=>['no', 'name', 'npc']
|
||||||
|
];
|
||||||
|
|
||||||
|
$resultItem = [];
|
||||||
|
foreach(Util::arrayGroupBy($rawList, 'nation') as $subNationID=>$generals){
|
||||||
|
$subNation = [];
|
||||||
|
foreach($generals as $general){
|
||||||
|
$subNation[] = [$general['no'], $general['name'], $general['npc']];
|
||||||
|
}
|
||||||
|
$resultItem[$subNationID] = $subNation;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result['list'] = $resultItem;
|
||||||
|
$result['nation'] = Util::convertArrayToDict($db->query('SELECT nation, name, color FROM nation'), 'nation');
|
||||||
|
Json::die($result);
|
||||||
@@ -6,7 +6,7 @@ include "func.php";
|
|||||||
|
|
||||||
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireLogin();
|
$session = Session::requireLogin([]);
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ list(
|
|||||||
$npcmode
|
$npcmode
|
||||||
) = $gameStor->getValuesAsArray(['maxgeneral', 'turnterm', 'npcmode']);
|
) = $gameStor->getValuesAsArray(['maxgeneral', 'turnterm', 'npcmode']);
|
||||||
|
|
||||||
if(!$npcmode){
|
if($npcmode!=1){
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result'=>false,
|
||||||
'reason'=>'빙의 가능한 서버가 아닙니다'
|
'reason'=>'빙의 가능한 서버가 아닙니다'
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
function sortTokens(&$tokens){
|
||||||
|
usort($tokens, function($lhs, $rhs){
|
||||||
|
return array_sum($lhs['dex'])<=>array_sum($rhs['dex']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function putInfoText(&$info){
|
||||||
|
if(key_exists('specialDomestic', $info)){
|
||||||
|
$class = buildGeneralSpecialDomesticClass($info['specialDomestic']);
|
||||||
|
$info['specialDomesticName'] = $class->getName();
|
||||||
|
$info['specialDomesticInfo'] = $class->getInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(key_exists('specialWar', $info)){
|
||||||
|
$class = buildGeneralSpecialDomesticClass($info['specialWar']);
|
||||||
|
$info['specialWarName'] = $class->getName();
|
||||||
|
$info['specialWarInfo'] = $class->getInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$session = Session::requireLogin([])->setReadOnly();
|
||||||
|
$userID = Session::getUserID();
|
||||||
|
|
||||||
|
$oNow = new \DateTimeImmutable();
|
||||||
|
|
||||||
|
$now = $oNow->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
|
$npcmode = $gameStor->getValue('npcmode');
|
||||||
|
if($npcmode!=2){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'선택 가능한 서버가 아닙니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rawGeneral = $db->queryFirstRow('SELECT no, aux FROM general WHERE `owner` = %i', $userID);
|
||||||
|
if($rawGeneral){
|
||||||
|
$generalAux = Json::decode($rawGeneral['aux']);
|
||||||
|
if(key_exists('next_change', $generalAux)&& $generalAux['next_change'] > $now){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'아직 다시 고를 수 없습니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tokens = $db->query('SELECT unique_name, reserved_until, info FROM `select_pool` WHERE `owner`=%i AND `reserved_until`>=%s', $userID, $now);
|
||||||
|
|
||||||
|
if($tokens){
|
||||||
|
$pick = [];
|
||||||
|
$valid_until = null;
|
||||||
|
$specialInfo = [];
|
||||||
|
foreach($tokens as $token){
|
||||||
|
$valid_until = $token['reserved_until'];
|
||||||
|
$info = Json::decode($token['info']);
|
||||||
|
putInfoText($info);
|
||||||
|
$info['uniqueName'] = $token['unique_name'];
|
||||||
|
$pick[] = $info;
|
||||||
|
}
|
||||||
|
sortTokens($pick);//좀 무식하지만..
|
||||||
|
Json::die([
|
||||||
|
'result'=>true,
|
||||||
|
'pick'=>$pick,
|
||||||
|
'validUntil'=>$valid_until
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pick = [];
|
||||||
|
$valid_until = null;
|
||||||
|
foreach(pickGeneralFromPool($db, $userID, 14) as $pickObj){
|
||||||
|
$valid_until = $pickObj->getValidUntil();
|
||||||
|
$info = $pickObj->getInfo();
|
||||||
|
putInfoText($info);
|
||||||
|
$pick[] = $info;
|
||||||
|
}
|
||||||
|
sortTokens($pick);//좀 무식하지만..
|
||||||
|
Json::die([
|
||||||
|
'result'=>true,
|
||||||
|
'pick'=>$pick,
|
||||||
|
'validUntil'=>$valid_until
|
||||||
|
]);
|
||||||
+7
-1
@@ -57,6 +57,7 @@ $v->rule('required', [
|
|||||||
'scenario',
|
'scenario',
|
||||||
'fiction',
|
'fiction',
|
||||||
'extend',
|
'extend',
|
||||||
|
'block_general_create',
|
||||||
'join_mode',
|
'join_mode',
|
||||||
'npcmode',
|
'npcmode',
|
||||||
'show_img_level',
|
'show_img_level',
|
||||||
@@ -67,6 +68,7 @@ $v->rule('required', [
|
|||||||
'scenario',
|
'scenario',
|
||||||
'fiction',
|
'fiction',
|
||||||
'extend',
|
'extend',
|
||||||
|
'block_general_create',
|
||||||
'npcmode',
|
'npcmode',
|
||||||
'show_img_level',
|
'show_img_level',
|
||||||
'tournament_trig',
|
'tournament_trig',
|
||||||
@@ -109,11 +111,13 @@ $scenario = (int)$_POST['scenario'];
|
|||||||
$fiction = (int)$_POST['fiction'];
|
$fiction = (int)$_POST['fiction'];
|
||||||
$extend = (int)$_POST['extend'];
|
$extend = (int)$_POST['extend'];
|
||||||
$npcmode = (int)$_POST['npcmode'];
|
$npcmode = (int)$_POST['npcmode'];
|
||||||
|
$block_general_create = (bool)$_POST['block_general_create'];
|
||||||
$show_img_level = (int)$_POST['show_img_level'];
|
$show_img_level = (int)$_POST['show_img_level'];
|
||||||
$tournament_trig = (int)$_POST['tournament_trig'];
|
$tournament_trig = (int)$_POST['tournament_trig'];
|
||||||
$join_mode = $_POST['join_mode'];
|
$join_mode = $_POST['join_mode'];
|
||||||
$autorun_user_minutes = (int)$_POST['autorun_user_minutes'];
|
$autorun_user_minutes = (int)$_POST['autorun_user_minutes'];
|
||||||
$autorun_user_options = [];
|
$autorun_user_options = [];
|
||||||
|
|
||||||
foreach(Util::getPost('autorun_user', 'array_string', []) as $autorun_option){
|
foreach(Util::getPost('autorun_user', 'array_string', []) as $autorun_option){
|
||||||
$autorun_user_options[$autorun_option] = 1;
|
$autorun_user_options[$autorun_option] = 1;
|
||||||
}
|
}
|
||||||
@@ -165,6 +169,7 @@ if($reserve_open){
|
|||||||
'scenarioName'=>$scenarioObj->getTitle(),
|
'scenarioName'=>$scenarioObj->getTitle(),
|
||||||
'fiction'=>$fiction,
|
'fiction'=>$fiction,
|
||||||
'extend'=>$extend,
|
'extend'=>$extend,
|
||||||
|
'block_general_create'=>$block_general_create,
|
||||||
'npcmode'=>$npcmode,
|
'npcmode'=>$npcmode,
|
||||||
'show_img_level'=>$show_img_level,
|
'show_img_level'=>$show_img_level,
|
||||||
'tournament_trig'=>$tournament_trig,
|
'tournament_trig'=>$tournament_trig,
|
||||||
@@ -187,7 +192,7 @@ if($reserve_open){
|
|||||||
'options'=>Json::encode($reserveInfo),
|
'options'=>Json::encode($reserveInfo),
|
||||||
'date'=>$open_date
|
'date'=>$open_date
|
||||||
]);
|
]);
|
||||||
AppConf::getList()[DB::prefix()]->closeServer();
|
ServConfig::getServerList()[DB::prefix()]->closeServer();
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>true,
|
'result'=>true,
|
||||||
'reason'=>'예약'
|
'reason'=>'예약'
|
||||||
@@ -200,6 +205,7 @@ Json::die(ResetHelper::buildScenario(
|
|||||||
$scenario,
|
$scenario,
|
||||||
$fiction,
|
$fiction,
|
||||||
$extend,
|
$extend,
|
||||||
|
$block_general_create,
|
||||||
$npcmode,
|
$npcmode,
|
||||||
$show_img_level,
|
$show_img_level,
|
||||||
$tournament_trig,
|
$tournament_trig,
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ if($result !== true){
|
|||||||
|
|
||||||
ResetHelper::clearDB();
|
ResetHelper::clearDB();
|
||||||
|
|
||||||
AppConf::getList()[$prefix]->closeServer();
|
ServConfig::getServerList()[$prefix]->closeServer();
|
||||||
|
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>true,
|
'result'=>true,
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
use Nette\Caching\Cache;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
if(!class_exists('\\sammo\\UniqueConst')){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'서버 초기화되지 않음'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!prepareDir('data/file_cache')){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'cache 불가'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$storage = new \Nette\Caching\Storages\FileStorage('data/file_cache');
|
||||||
|
$cache = new Cache($storage);
|
||||||
|
$serverID = UniqueConst::$serverID;
|
||||||
|
|
||||||
|
$mapInfo = $cache->load("recent_map");
|
||||||
|
//로그인 검사
|
||||||
|
|
||||||
|
$now = time();
|
||||||
|
|
||||||
|
if($mapInfo && ($now - $mapInfo['timestamp'] < 600)){
|
||||||
|
$mapEtag = $mapInfo['etag'];
|
||||||
|
$mapModified = $mapInfo['timestamp'];
|
||||||
|
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $mapModified)." GMT");
|
||||||
|
header("Etag: $mapEtag");
|
||||||
|
|
||||||
|
if (
|
||||||
|
strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']??'2000-01-01') === $mapModified ||
|
||||||
|
trim($_SERVER['HTTP_IF_NONE_MATCH']??'') === $mapEtag
|
||||||
|
) {
|
||||||
|
header("HTTP/1.1 304 Not Modified");
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
Json::die($mapInfo['data'], 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$defaultPost = [
|
||||||
|
'year' => null,
|
||||||
|
'month' => null,
|
||||||
|
'aux' => null,
|
||||||
|
'neutralView' => true,
|
||||||
|
'showMe' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
$history = formatHistoryToHTML(getGlobalHistoryLogRecent(10));
|
||||||
|
$rawMap = getWorldMap([
|
||||||
|
'year' => null,
|
||||||
|
'month' => null,
|
||||||
|
'aux' => null,
|
||||||
|
'neutralView' => true,
|
||||||
|
'showMe' => false,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$mapTheme = $gameStor->map_theme ?? 'che';
|
||||||
|
|
||||||
|
$rawMap['history'] = $history;
|
||||||
|
$rawMap['theme'] = $mapTheme;
|
||||||
|
|
||||||
|
$etag = hash('sha256', $serverID.$now);
|
||||||
|
$map = [
|
||||||
|
'etag'=>$etag,
|
||||||
|
'timestamp'=>$now,
|
||||||
|
'data'=>$rawMap,
|
||||||
|
];
|
||||||
|
$cache->save("recent_map", $map);
|
||||||
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $now)." GMT");
|
||||||
|
header("Etag: $etag");
|
||||||
|
|
||||||
|
Json::die($map['data'], 0);
|
||||||
@@ -40,6 +40,7 @@ if($action === '추방' && $destGeneralID==0){
|
|||||||
|
|
||||||
if($destGeneralID==0){
|
if($destGeneralID==0){
|
||||||
$general = new DummyGeneral(true);
|
$general = new DummyGeneral(true);
|
||||||
|
$general->setVar('nation', $nationID);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$general = General::createGeneralObjFromDB($destGeneralID, [
|
$general = General::createGeneralObjFromDB($destGeneralID, [
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ list(
|
|||||||
$npcmode
|
$npcmode
|
||||||
) = $gameStor->getValuesAsArray(['year', 'month', 'maxgeneral', 'npcmode']);
|
) = $gameStor->getValuesAsArray(['year', 'month', 'maxgeneral', 'npcmode']);
|
||||||
|
|
||||||
if(!$npcmode){
|
if($npcmode!=1){
|
||||||
Json::die([
|
Json::die([
|
||||||
'result'=>false,
|
'result'=>false,
|
||||||
'reason'=>'빙의 가능한 서버가 아닙니다'
|
'reason'=>'빙의 가능한 서버가 아닙니다'
|
||||||
|
|||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
WebUtil::requireAJAX();
|
||||||
|
|
||||||
|
$pick = Util::getPost('pick');
|
||||||
|
$leadership = Util::getPost('leadership', 'int', GameConst::$defaultStatMin);
|
||||||
|
$strength = Util::getPost('leadership', 'int', GameConst::$defaultStatMin);
|
||||||
|
$intel = Util::getPost('leadership', 'int', GameConst::$defaultStatMin);
|
||||||
|
$personal = Util::getPost('personal', 'string', null);
|
||||||
|
$use_own_picture = Util::getPost('use_own_picture', 'bool', false);
|
||||||
|
|
||||||
|
|
||||||
|
if(!$pick){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'장수를 선택하지 않았습니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$session = Session::requireLogin([])->setReadOnly();
|
||||||
|
$userID = Session::getUserID();
|
||||||
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
|
$rootDB = RootDB::db();
|
||||||
|
$oNow = new \DateTimeImmutable();
|
||||||
|
$now = $oNow->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$hasGeneralID = $db->queryFirstField('SELECT no FROM general WHERE owner = %i', $userID);
|
||||||
|
if($hasGeneralID){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'이미 장수를 생성했습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$env = $gameStor->getValues(['startyear', 'year', 'month', 'maxgeneral', 'npcmode', 'show_img_level', 'icon_path', 'turnterm', 'turntime']);
|
||||||
|
$env['fiction'] = false;
|
||||||
|
|
||||||
|
$npcmode = $env['npcmode'];
|
||||||
|
$maxgeneral = $env['maxgeneral'];
|
||||||
|
|
||||||
|
if($npcmode!=2){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'선택 가능한 서버가 아닙니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$selectInfo = $db->queryFirstField('SELECT info FROM select_pool WHERE `owner` = %i AND `reserved_until`>=%s AND `unique_name`=%s', $userID, $now, $pick);
|
||||||
|
if(!$selectInfo){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'유효한 장수 목록이 없습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$selectInfo = Json::decode($selectInfo);
|
||||||
|
|
||||||
|
$ownerInfo = RootDB::db()->queryFirstRow('SELECT `name`,`picture`,`imgsvr` FROM member WHERE `NO`=%i',$userID);
|
||||||
|
if(!$ownerInfo){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'멤버 정보를 가져오지 못했습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$gencount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2');
|
||||||
|
|
||||||
|
if ($gencount >= $maxgeneral) {
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'더 이상 등록 할 수 없습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$poolClass = getGeneralPoolClass(GameConst::$targetGeneralPool);
|
||||||
|
/** @var AbsGeneralPool */
|
||||||
|
$pickedGeneral = new $poolClass($db, $selectInfo, $now);
|
||||||
|
|
||||||
|
$builder = $pickedGeneral->getGeneralBuilder();
|
||||||
|
|
||||||
|
foreach(GameConst::$generalPoolAllowOption as $allowOption){
|
||||||
|
if($allowOption == 'stat'){
|
||||||
|
$leadership = Util::valueFit($leadership, GameConst::$defaultStatMin, GameConst::$defaultStatMax);
|
||||||
|
$strength = Util::valueFit($strength, GameConst::$defaultStatMin, GameConst::$defaultStatMax);
|
||||||
|
$intel = Util::valueFit($intel, GameConst::$defaultStatMin, GameConst::$defaultStatMax);
|
||||||
|
|
||||||
|
if($leadership + $strength + $intel > GameConst::$defaultStatTotal){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'스탯의 총 합이 올바르지 않습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$builder->setStat($leadership, $strength, $intel);
|
||||||
|
}
|
||||||
|
else if($allowOption == 'picture' && $use_own_picture){
|
||||||
|
$builder->setPicture($ownerInfo['imgsvr'], $ownerInfo['picture']);
|
||||||
|
}
|
||||||
|
else if($allowOption == 'ego'){
|
||||||
|
if(!$personal || $personal == 'Random'){
|
||||||
|
$personal = Util::choiceRandom(GameConst::$availablePersonality);
|
||||||
|
}
|
||||||
|
if(!array_search($personal, GameConst::$availablePersonality)){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'올바르지 않은 성격입니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$builder->setEgo($personal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$userNick = $ownerInfo['name'];
|
||||||
|
|
||||||
|
$builder->setOwner($userID);
|
||||||
|
$builder->setOwnerName($userNick);
|
||||||
|
$builder->setKillturn(5);
|
||||||
|
$builder->setNPCType(0);
|
||||||
|
$builder->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $env['turnterm']));
|
||||||
|
$builder->fillRemainSpecAsZero($env);
|
||||||
|
$builder->build($env);
|
||||||
|
$generalID = $builder->getGeneralID();
|
||||||
|
if(!$generalID){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'장수 등록에 실패했습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$pickedGeneral->occupyGeneralName();
|
||||||
|
|
||||||
|
$db->update('select_pool',[
|
||||||
|
'owner'=>null,
|
||||||
|
'reserved_until'=>null,
|
||||||
|
], '(owner=%i or reserved_until < %s) AND general_id is NULL', $userID, $now);
|
||||||
|
|
||||||
|
|
||||||
|
$josaYi = JosaUtil::pick($userNick, '이');
|
||||||
|
$generalName = $builder->getGeneralName();
|
||||||
|
$josaRo = JosaUtil::pick($generalName, '로');
|
||||||
|
|
||||||
|
$cityName = CityConst::byID($builder->getCityID())->name;
|
||||||
|
|
||||||
|
$logger = new ActionLogger($generalID, 0, $env['year'], $env['month']);
|
||||||
|
$logger->pushGeneralHistoryLog("<Y>{$generalName}</>, <G>{$cityName}</>에서 등장");
|
||||||
|
$logger->pushGlobalActionLog("<G><b>{$cityName}</b></>에서 <Y>{$userNick}</>{$josaYi} <Y>{$generalName}</>{$josaRo} 등장합니다.");
|
||||||
|
$logger->flush();
|
||||||
|
|
||||||
|
pushAdminLog(["가입 : {$userID} // {$session->userName} // {$pick} // ".getenv("REMOTE_ADDR")]);
|
||||||
|
|
||||||
|
$rootDB->insert('member_log', [
|
||||||
|
'member_no' => $userID,
|
||||||
|
'date'=>TimeUtil::now(),
|
||||||
|
'action_type'=>'make_general',
|
||||||
|
'action'=>Json::encode([
|
||||||
|
'server'=>DB::prefix(),
|
||||||
|
'type'=>'select',
|
||||||
|
'generalID'=>$generalID,
|
||||||
|
'generalName'=>$generalName
|
||||||
|
])
|
||||||
|
]);
|
||||||
|
|
||||||
|
Json::die([
|
||||||
|
'result'=>true,
|
||||||
|
'reason'=>'success'
|
||||||
|
]);
|
||||||
@@ -43,7 +43,7 @@ $session = Session::requireLogin([
|
|||||||
'game'=>null,
|
'game'=>null,
|
||||||
'me'=>null
|
'me'=>null
|
||||||
])->setReadOnly();
|
])->setReadOnly();
|
||||||
$userID = Session::getUserID();
|
$userID = $session->userID;
|
||||||
|
|
||||||
if(!class_exists('\\sammo\\DB')){
|
if(!class_exists('\\sammo\\DB')){
|
||||||
Json::die([
|
Json::die([
|
||||||
@@ -91,7 +91,8 @@ if(file_exists(__DIR__.'/.htaccess')){
|
|||||||
'scenarioName'=>$options['scenarioName'],
|
'scenarioName'=>$options['scenarioName'],
|
||||||
'turnterm'=>$options['turnterm'],
|
'turnterm'=>$options['turnterm'],
|
||||||
'fictionMode'=>($options['fiction']?'가상':'사실'),
|
'fictionMode'=>($options['fiction']?'가상':'사실'),
|
||||||
'npcMode'=>($options['npcmode']?'가능':'불가'),
|
'block_general_create'=>(!!$options['block_general_create']),
|
||||||
|
'npcMode'=>([0=>'불가',1=>'가능',2=>'선택 생성'][$options['npcmode']]),
|
||||||
'openDatetime'=>$reserved['date'],
|
'openDatetime'=>$reserved['date'],
|
||||||
'starttime'=>$options['starttime'],
|
'starttime'=>$options['starttime'],
|
||||||
'gameConf'=>$options['gameConf'],
|
'gameConf'=>$options['gameConf'],
|
||||||
@@ -104,7 +105,7 @@ if(file_exists(__DIR__.'/.htaccess')){
|
|||||||
|
|
||||||
//TODO: 천통시에도 예약 오픈 알림이 필요..?
|
//TODO: 천통시에도 예약 오픈 알림이 필요..?
|
||||||
|
|
||||||
$admin = $gameStor->getValues(['isunited', 'npcmode', 'year', 'month', 'scenario', 'scenario_text', 'maxgeneral', 'turnterm', 'opentime', 'turntime', 'join_mode', 'fiction', 'autorun_user']);
|
$admin = $gameStor->getValues(['isunited', 'npcmode', 'year', 'month', 'scenario', 'scenario_text', 'maxgeneral', 'turnterm', 'opentime', 'turntime', 'join_mode', 'fiction', 'block_general_create', 'autorun_user']);
|
||||||
$admin['maxUserCnt'] = $admin['maxgeneral'];
|
$admin['maxUserCnt'] = $admin['maxgeneral'];
|
||||||
$admin['npcMode'] = $admin['npcmode'];
|
$admin['npcMode'] = $admin['npcmode'];
|
||||||
$admin['turnTerm'] = $admin['turnterm'];
|
$admin['turnTerm'] = $admin['turnterm'];
|
||||||
@@ -124,8 +125,8 @@ $admin['scenario'] = $admin['scenario_text'];
|
|||||||
$admin['userCnt'] = $genCnt;
|
$admin['userCnt'] = $genCnt;
|
||||||
$admin['npcCnt'] = $npcCnt;
|
$admin['npcCnt'] = $npcCnt;
|
||||||
$admin['nationCnt'] = $nationCnt;
|
$admin['nationCnt'] = $nationCnt;
|
||||||
|
$admin['block_general_create'] = !!$admin['block_general_create'];
|
||||||
$admin['npcMode'] = $admin['npcMode']?'가능':'불가';
|
$admin['npcMode'] = [0=>'불가',1=>'가능',2=>'선택 생성'][$admin['npcMode']];
|
||||||
$admin['fictionMode'] = $admin['fiction']?'가상':'사실';
|
$admin['fictionMode'] = $admin['fiction']?'가상':'사실';
|
||||||
|
|
||||||
$otherTextInfo = [];
|
$otherTextInfo = [];
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ $action = Util::getPost('action');
|
|||||||
$tnmt = Util::getPost('tnmt', 'int', 1);
|
$tnmt = Util::getPost('tnmt', 'int', 1);
|
||||||
$defence_train = Util::getPost('defence_train', 'int', 80);
|
$defence_train = Util::getPost('defence_train', 'int', 80);
|
||||||
$use_treatment = Util::getPost('use_treatment', 'int', 10);
|
$use_treatment = Util::getPost('use_treatment', 'int', 10);
|
||||||
|
$use_auto_nation_turn = Util::getPost('use_auto_nation_turn', 'int', 1);
|
||||||
//$detachNPC = Util::getPost('detachNPC', 'bool');
|
//$detachNPC = Util::getPost('detachNPC', 'bool');
|
||||||
$detachNPC = false;
|
$detachNPC = false;
|
||||||
|
|
||||||
@@ -42,8 +43,8 @@ if($defence_train != $me->getVar('defence_train')){
|
|||||||
if($defence_train == 999){
|
if($defence_train == 999){
|
||||||
$me->increaseVar('myset', -1);
|
$me->increaseVar('myset', -1);
|
||||||
$me->setVar('defence_train', $defence_train);
|
$me->setVar('defence_train', $defence_train);
|
||||||
$me->increaseVar('train', -3);
|
$me->increaseVarWithLimit('train', -3, 20);
|
||||||
$me->increaseVar('atmos', -3);
|
$me->increaseVarWithLimit('atmos', -3, 20);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$me->increaseVar('myset', -1);
|
$me->increaseVar('myset', -1);
|
||||||
@@ -53,6 +54,10 @@ if($defence_train != $me->getVar('defence_train')){
|
|||||||
|
|
||||||
$me->setAuxVar('use_treatment', Util::valueFit($use_treatment, 10, 100));
|
$me->setAuxVar('use_treatment', Util::valueFit($use_treatment, 10, 100));
|
||||||
|
|
||||||
|
if($use_auto_nation_turn != $me->getAuxVar('use_auto_nation_turn')){
|
||||||
|
$me->setAuxVar('use_auto_nation_turn', $use_auto_nation_turn);
|
||||||
|
}
|
||||||
|
|
||||||
if($me->getVar('tnmt') != $tnmt){
|
if($me->getVar('tnmt') != $tnmt){
|
||||||
$me->setVar('tnmt', $tnmt);
|
$me->setVar('tnmt', $tnmt);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,12 +87,13 @@ $generalCheck = [
|
|||||||
'no', 'name', 'nation', 'turntime', 'personal', 'special2', 'crew', 'crewtype', 'atmos', 'train',
|
'no', 'name', 'nation', 'turntime', 'personal', 'special2', 'crew', 'crewtype', 'atmos', 'train',
|
||||||
'intel', 'intel_exp', 'book', 'strength', 'strength_exp', 'weapon', 'injury', 'leadership', 'leadership_exp', 'horse', 'item',
|
'intel', 'intel_exp', 'book', 'strength', 'strength_exp', 'weapon', 'injury', 'leadership', 'leadership_exp', 'horse', 'item',
|
||||||
'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5',
|
'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5',
|
||||||
'recent_war'
|
'recent_war', 'warnum', 'killnum', 'killcrew',
|
||||||
],
|
],
|
||||||
'integer'=>[
|
'integer'=>[
|
||||||
'no', 'nation', 'crew', 'crewtype', 'atmos', 'train',
|
'no', 'nation', 'crew', 'crewtype', 'atmos', 'train',
|
||||||
'intel', 'intel_exp', 'strength', 'strength_exp', 'injury', 'leadership', 'leadership_exp',
|
'intel', 'intel_exp', 'strength', 'strength_exp', 'injury', 'leadership', 'leadership_exp',
|
||||||
'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5',
|
'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5',
|
||||||
|
'warnum', 'killnum', 'killcrew',
|
||||||
],
|
],
|
||||||
'min'=>[
|
'min'=>[
|
||||||
['no', 1],
|
['no', 1],
|
||||||
@@ -109,6 +110,9 @@ $generalCheck = [
|
|||||||
['dex3', 0],
|
['dex3', 0],
|
||||||
['dex4', 0],
|
['dex4', 0],
|
||||||
['dex5', 0],
|
['dex5', 0],
|
||||||
|
['warnum', 0],
|
||||||
|
['killnum', 0],
|
||||||
|
['killcrew', 0],
|
||||||
],
|
],
|
||||||
'between'=>[
|
'between'=>[
|
||||||
['train', [40, GameConst::$maxTrainByWar]],
|
['train', [40, GameConst::$maxTrainByWar]],
|
||||||
@@ -136,6 +140,7 @@ if(!$v->validate()){
|
|||||||
'reason'=>'[출병자]'.$v->errorStr()
|
'reason'=>'[출병자]'.$v->errorStr()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
$rawAttacker['owner'] = 0;
|
||||||
|
|
||||||
$defenderList = [];
|
$defenderList = [];
|
||||||
foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
|
foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
|
||||||
@@ -148,7 +153,9 @@ foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
|
|||||||
'reason'=>"[수비자{$idx}]".$v->errorStr()
|
'reason'=>"[수비자{$idx}]".$v->errorStr()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$defenderList[] = new General($rawDefenderGeneral, null, $rawDefenderCity, $rawAttackerNation, $year, $month, true);
|
$rawDefenderGeneral['owner'] = 0;
|
||||||
|
|
||||||
|
$defenderList[] = new General($rawDefenderGeneral, extractRankVar($rawDefenderGeneral), $rawDefenderCity, $rawAttackerNation, $year, $month, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -273,6 +280,15 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
|||||||
$startYear = $gameStor->startyear;
|
$startYear = $gameStor->startyear;
|
||||||
$cityRate = Util::round(($year - $startYear) / 1.5) + 60;
|
$cityRate = Util::round(($year - $startYear) / 1.5) + 60;
|
||||||
|
|
||||||
|
function extractRankVar(array $rawVal):array{
|
||||||
|
$rankVars = [];
|
||||||
|
foreach($rawVal as $rawKey=>$rawVal){
|
||||||
|
if(key_exists($rawKey, General::RANK_COLUMN)){
|
||||||
|
$rankVars[$rawKey] = $rawVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $rankVars;
|
||||||
|
}
|
||||||
|
|
||||||
function simulateBattle(
|
function simulateBattle(
|
||||||
$rawAttacker, $rawAttackerCity, $rawAttackerNation,
|
$rawAttacker, $rawAttackerCity, $rawAttackerNation,
|
||||||
@@ -280,7 +296,7 @@ function simulateBattle(
|
|||||||
$startYear, $year, $month, $cityRate
|
$startYear, $year, $month, $cityRate
|
||||||
){
|
){
|
||||||
$attacker = new WarUnitGeneral(
|
$attacker = new WarUnitGeneral(
|
||||||
new General($rawAttacker, null, $rawAttackerCity, $rawAttackerNation, $year, $month),
|
new General($rawAttacker, extractRankVar($rawAttacker), $rawAttackerCity, $rawAttackerNation, $year, $month),
|
||||||
$rawAttackerNation,
|
$rawAttackerNation,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@@ -312,7 +328,7 @@ function simulateBattle(
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$defenderObj = new General($iterDefender->current(), null, $rawDefenderCity, $rawDefenderNation, $year, $month);
|
$defenderObj = new General($iterDefender->current(), extractRankVar($iterDefender->current()), $rawDefenderCity, $rawDefenderNation, $year, $month);
|
||||||
if(extractBattleOrder($defenderObj) <= 0){
|
if(extractBattleOrder($defenderObj) <= 0){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
include "lib.php";
|
||||||
|
include "func.php";
|
||||||
|
|
||||||
|
WebUtil::requireAJAX();
|
||||||
|
|
||||||
|
$pick = Util::getPost('pick');
|
||||||
|
|
||||||
|
if(!$pick){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'장수를 선택하지 않았습니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$session = Session::requireLogin([])->setReadOnly();
|
||||||
|
$userID = Session::getUserID();
|
||||||
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
|
$rootDB = RootDB::db();
|
||||||
|
$oNow = new \DateTimeImmutable();
|
||||||
|
$now = $oNow->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$generalID = $db->queryFirstField('SELECT no FROM general WHERE owner = %i', $userID);
|
||||||
|
if(!$generalID){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'장수가 생성하지 않았습니다. 이미 사망하지 않았는지 확인해보세요.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
list(
|
||||||
|
$year,
|
||||||
|
$month,
|
||||||
|
$maxgeneral,
|
||||||
|
$npcmode,
|
||||||
|
$turnterm
|
||||||
|
) = $gameStor->getValuesAsArray(['year', 'month', 'maxgeneral', 'npcmode', 'turnterm']);
|
||||||
|
|
||||||
|
if($npcmode!=2){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'선택 가능한 서버가 아닙니다'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$info = $db->queryFirstField('SELECT info FROM select_pool WHERE `owner` = %i AND `reserved_until`>=%s AND `unique_name`=%s', $userID, $now, $pick);
|
||||||
|
if(!$info){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'유효한 장수 목록이 없습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ownerInfo = RootDB::db()->queryFirstRow('SELECT `name`,`picture`,`imgsvr` FROM member WHERE `NO`=%i',$userID);
|
||||||
|
if(!$ownerInfo){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'멤버 정보를 가져오지 못했습니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$info = Json::decode($info);
|
||||||
|
|
||||||
|
|
||||||
|
$generalObj = General::createGeneralObjFromDB($generalID);
|
||||||
|
$oldGeneralName = $generalObj->getName();
|
||||||
|
$db->update('select_pool', [
|
||||||
|
'general_id'=>-$generalID,
|
||||||
|
'owner'=>null,
|
||||||
|
'reserved_until'=>null
|
||||||
|
], 'unique_name=%s AND `reserved_until` IS NOT NULL AND owner = %i', $info['uniqueName'], $userID);
|
||||||
|
|
||||||
|
if($db->affectedRows()==0){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'동시성 제어에 문제가 발생했습니다. 버그 제보를 부탁드립니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->update('select_pool', [
|
||||||
|
'general_id'=>null,
|
||||||
|
'owner'=>null,
|
||||||
|
'reserved_until'=>null,
|
||||||
|
], 'unique_name != %s AND general_id = %i', $info['uniqueName'], $generalID);
|
||||||
|
|
||||||
|
$db->update('select_pool', [
|
||||||
|
'general_id'=>$generalID,
|
||||||
|
], 'general_id=%i', -$generalID);
|
||||||
|
if($db->affectedRows()==0){
|
||||||
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'장수 선택 과정에 문제가 발생했습니다.. 버그 제보를 부탁드립니다.'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$db->update('select_pool',[
|
||||||
|
'owner'=>null,
|
||||||
|
'reserved_until'=>null,
|
||||||
|
], '(owner=%i or reserved_until < %s) AND general_id is NULL', $userID, $now);
|
||||||
|
|
||||||
|
if(key_exists('leadership', $info)){
|
||||||
|
$generalObj->updateVar('leadership', $info['leadership']);
|
||||||
|
$generalObj->updateVar('strength', $info['strength']);
|
||||||
|
$generalObj->updateVar('intel', $info['intel']);
|
||||||
|
}
|
||||||
|
if(key_exists('picture', $info)){
|
||||||
|
$generalObj->updateVar('imgsvr', $info['imgsvr']);
|
||||||
|
$generalObj->updateVar('picture', $info['picture']);
|
||||||
|
}
|
||||||
|
if(key_exists('generalName', $info)){
|
||||||
|
$generalObj->updateVar('name', $info['generalName']);
|
||||||
|
}
|
||||||
|
if(key_exists('dex', $info)){
|
||||||
|
$generalObj->updateVar('dex1', $info['dex'][0]);
|
||||||
|
$generalObj->updateVar('dex2', $info['dex'][1]);
|
||||||
|
$generalObj->updateVar('dex3', $info['dex'][2]);
|
||||||
|
$generalObj->updateVar('dex4', $info['dex'][3]);
|
||||||
|
$generalObj->updateVar('dex5', $info['dex'][4]);
|
||||||
|
}
|
||||||
|
if(key_exists('ego', $info)){
|
||||||
|
$generalObj->updateVar('personal', $info['ego']);
|
||||||
|
}
|
||||||
|
if(key_exists('specialDomestic', $info)){
|
||||||
|
$generalObj->updateVar('special', $info['specialDomestic']);
|
||||||
|
}
|
||||||
|
if(key_exists('specialWar', $info)){
|
||||||
|
$generalObj->updateVar('special2', $info['specialWar']);
|
||||||
|
}
|
||||||
|
$generalObj->setAuxVar('next_change', TimeUtil::nowAddMinutes(12 * $turnterm));
|
||||||
|
|
||||||
|
$userNick = $ownerInfo['name'];
|
||||||
|
$generalObj->setVar('owner_name', $userNick);
|
||||||
|
$josaYi = JosaUtil::pick($userNick, '이');
|
||||||
|
|
||||||
|
$generalName = $info['generalName'];
|
||||||
|
$josaRo = JosaUtil::pick($generalName, '로');
|
||||||
|
|
||||||
|
|
||||||
|
$logger = $generalObj->getLogger();
|
||||||
|
$logger->pushGeneralHistoryLog("장수를 <Y>{$oldGeneralName}</>에서 <Y>{$generalName}</>{$josaRo} 변경");
|
||||||
|
$logger->pushGlobalActionLog("<Y>{$userNick}</>{$josaYi} 장수를 <Y>{$oldGeneralName}</>에서 <Y>{$generalName}</>{$josaRo} 변경합니다.");
|
||||||
|
$generalObj->applyDB($db);
|
||||||
|
|
||||||
|
|
||||||
|
Json::die([
|
||||||
|
'result'=>true,
|
||||||
|
'reason'=>'success'
|
||||||
|
]);
|
||||||
+6
-2
@@ -24,7 +24,12 @@ if (!$member) {
|
|||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$admin = $gameStor->getValues(['block_general_create','show_img_level','maxgeneral']);
|
||||||
|
if($admin['block_general_create']){
|
||||||
|
MessageBox("잘못된 접근입니다!!!");
|
||||||
|
echo "<script>history.go(-1);</script>";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@@ -66,7 +71,6 @@ echo Json::encode((object)$charInfoText);
|
|||||||
<tr><td align=center><?=info(0)?></td></tr>
|
<tr><td align=center><?=info(0)?></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
$admin = $gameStor->getValues(['show_img_level','maxgeneral']);
|
|
||||||
|
|
||||||
$gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
|
$gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc<2');
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -185,10 +185,10 @@ if($relYear < 3){
|
|||||||
$experience = 0;
|
$experience = 0;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 5');
|
$expGenCount = $db->queryFirstField('SELECT count(*) FROM general WHERE nation != 0 AND npc < 4');
|
||||||
$targetGenOrder = Util::round($expGenCount * 0.2);
|
$targetGenOrder = Util::round($expGenCount * 0.2);
|
||||||
$experience = $db->queryFirstField(
|
$experience = $db->queryFirstField(
|
||||||
'SELECT experience FROM general WHERE nation != 0 AND npc < 5 ORDER BY experience ASC LIMIT %i, 1',
|
'SELECT experience FROM general WHERE nation != 0 AND npc < 4 ORDER BY experience ASC LIMIT %i, 1',
|
||||||
$targetGenOrder - 1
|
$targetGenOrder - 1
|
||||||
);
|
);
|
||||||
$experience *= 0.8;
|
$experience *= 0.8;
|
||||||
@@ -266,6 +266,8 @@ foreach(Util::range(GameConst::$maxTurn) as $turnIdx){
|
|||||||
}
|
}
|
||||||
$db->insert('general_turn', $turnRows);
|
$db->insert('general_turn', $turnRows);
|
||||||
|
|
||||||
|
resetInheritanceUser($userID);
|
||||||
|
|
||||||
$rank_data = [];
|
$rank_data = [];
|
||||||
foreach(array_keys(General::RANK_COLUMN) as $rankColumn){
|
foreach(array_keys(General::RANK_COLUMN) as $rankColumn){
|
||||||
$rank_data[] = [
|
$rank_data[] = [
|
||||||
|
|||||||
+361
-229
@@ -1,4 +1,4 @@
|
|||||||
jQuery(function($){
|
jQuery(function($) {
|
||||||
|
|
||||||
|
|
||||||
var $generalForm = $('.form_sample .general_detail');
|
var $generalForm = $('.form_sample .general_detail');
|
||||||
@@ -9,9 +9,28 @@ jQuery(function($){
|
|||||||
|
|
||||||
var $attackerCard = $('.attacker_form');
|
var $attackerCard = $('.attacker_form');
|
||||||
|
|
||||||
var initBasicEvent = function(){
|
var initBasicEvent = function() {
|
||||||
|
|
||||||
$('.form_injury').change(function(){
|
if (window.nation) {
|
||||||
|
$('.form_city_level').val(window.city.level);
|
||||||
|
$('.form_def').val(parseInt(window.city.def));
|
||||||
|
$('.form_wall').val(parseInt(window.city.wall));
|
||||||
|
$('.form_nation_type').val(window.nation.type);
|
||||||
|
$('.form_nation_level').val(window.nation.level);
|
||||||
|
$('.form_tech').val(parseInt(window.nation.tech / 1000));
|
||||||
|
if (window.nation.capital == window.city.city) {
|
||||||
|
$('.attacker_nation .form_is_capital:first').click();
|
||||||
|
$('.defender_nation .form_is_capital:first').click();
|
||||||
|
} else {
|
||||||
|
$('.attacker_nation .form_is_capital:last').click();
|
||||||
|
$('.defender_nation .form_is_capital:last').click();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$('.attacker_nation .form_is_capital:last').click();
|
||||||
|
$('.defender_nation .form_is_capital:last').click();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.form_injury').change(function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var $general = getGeneralDetail($this);
|
var $general = getGeneralDetail($this);
|
||||||
var $helptext = $general.find('.injury_helptext');
|
var $helptext = $general.find('.injury_helptext');
|
||||||
@@ -20,51 +39,48 @@ jQuery(function($){
|
|||||||
//FIXME: PHP 코드와 항상 일치하도록 변경
|
//FIXME: PHP 코드와 항상 일치하도록 변경
|
||||||
var text = '건강';
|
var text = '건강';
|
||||||
var color = 'white';
|
var color = 'white';
|
||||||
if(injury > 60){
|
if (injury > 60) {
|
||||||
text = '위독';
|
text = '위독';
|
||||||
color = 'red';
|
color = 'red';
|
||||||
}
|
} else if (injury > 40) {
|
||||||
else if(injury > 40){
|
|
||||||
text = '심각';
|
text = '심각';
|
||||||
color = 'magenta';
|
color = 'magenta';
|
||||||
}
|
} else if (injury > 20) {
|
||||||
else if(injury > 20){
|
|
||||||
text = '중상';
|
text = '중상';
|
||||||
color = 'orange';
|
color = 'orange';
|
||||||
}
|
} else if (injury > 0) {
|
||||||
else if(injury > 0){
|
|
||||||
text = '경상';
|
text = '경상';
|
||||||
color = 'yellow';
|
color = 'yellow';
|
||||||
}
|
}
|
||||||
$helptext.html(text).css('color', color);
|
$helptext.html(text).css('color', color);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.export_general').click(function(){
|
$('.export_general').click(function() {
|
||||||
var $btn = $(this);
|
var $btn = $(this);
|
||||||
var $general = getGeneralDetail($btn);
|
var $general = getGeneralDetail($btn);
|
||||||
|
|
||||||
var values = exportGeneralInfo($general);
|
var values = exportGeneralInfo($general);
|
||||||
console.log(values);
|
console.log(values);
|
||||||
});
|
});
|
||||||
$('.delete-defender').click(function(){
|
$('.delete-defender').click(function() {
|
||||||
var $card = getGeneralFrame($(this));
|
var $card = getGeneralFrame($(this));
|
||||||
deleteDefender($card);
|
deleteDefender($card);
|
||||||
});
|
});
|
||||||
$('.copy-defender').click(function(){
|
$('.copy-defender').click(function() {
|
||||||
var $card = getGeneralFrame($(this));
|
var $card = getGeneralFrame($(this));
|
||||||
copyDefender($card);
|
copyDefender($card);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.add-defender').click(function(){
|
$('.add-defender').click(function() {
|
||||||
addDefender();
|
addDefender();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btn-general-load').click(function(){
|
$('.btn-general-load').click(function() {
|
||||||
var $file = $(this).prev();
|
var $file = $(this).prev();
|
||||||
$file[0].click();
|
$file[0].click();
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.form_load_general_file').on('change', function(e){
|
$('.form_load_general_file').on('change', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var $card = getGeneralFrame($this);
|
var $card = getGeneralFrame($this);
|
||||||
@@ -75,26 +91,35 @@ jQuery(function($){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btn-general-save').click(function(){
|
$('.btn-general-import-server').click(function() {
|
||||||
|
var $this = $(this);
|
||||||
|
var $card = getGeneralFrame($this);
|
||||||
|
|
||||||
|
var $modal = $('#importModal');
|
||||||
|
$modal.data('target', $card);
|
||||||
|
$modal.modal('show');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btn-general-save').click(function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var $general = getGeneralDetail($this);
|
var $general = getGeneralDetail($this);
|
||||||
var generalData = exportGeneralInfo($general);
|
var generalData = exportGeneralInfo($general);
|
||||||
|
|
||||||
var filename = "general_{0}.json".format(generalData.name);
|
var filename = "general_{0}.json".format(generalData.name);
|
||||||
var saveData = JSON.stringify({
|
var saveData = JSON.stringify({
|
||||||
objType:'general',
|
objType: 'general',
|
||||||
data:generalData
|
data: generalData
|
||||||
}, null, 4);
|
}, null, 4);
|
||||||
|
|
||||||
download(saveData, filename, 'application/json');
|
download(saveData, filename, 'application/json');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btn-battle-load').click(function(){
|
$('.btn-battle-load').click(function() {
|
||||||
var $file = $(this).prev();
|
var $file = $(this).prev();
|
||||||
$file[0].click();
|
$file[0].click();
|
||||||
})
|
})
|
||||||
|
|
||||||
$('.form_load_battle_file').on('change', function(e){
|
$('.form_load_battle_file').on('change', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var files = e.target.files;
|
var files = e.target.files;
|
||||||
@@ -103,12 +128,12 @@ jQuery(function($){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btn-battle-save').click(function(){
|
$('.btn-battle-save').click(function() {
|
||||||
var battleData = exportAllData();
|
var battleData = exportAllData();
|
||||||
var filename = "battle_{0}.json".format(moment().format('YYYYMMDD_hhmmss'));
|
var filename = "battle_{0}.json".format(moment().format('YYYYMMDD_hhmmss'));
|
||||||
var saveData = JSON.stringify({
|
var saveData = JSON.stringify({
|
||||||
objType:'battle',
|
objType: 'battle',
|
||||||
data:battleData
|
data: battleData
|
||||||
}, null, 4);
|
}, null, 4);
|
||||||
|
|
||||||
download(saveData, filename, 'application/json');
|
download(saveData, filename, 'application/json');
|
||||||
@@ -119,7 +144,7 @@ jQuery(function($){
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
})
|
})
|
||||||
$generals.bind('drop', function(e){
|
$generals.bind('drop', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var $card = getGeneralFrame($this);
|
var $card = getGeneralFrame($this);
|
||||||
@@ -135,7 +160,7 @@ jQuery(function($){
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
})
|
})
|
||||||
$battlePad.bind('drop', function(e){
|
$battlePad.bind('drop', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var files = e.originalEvent.dataTransfer.files;
|
var files = e.originalEvent.dataTransfer.files;
|
||||||
@@ -145,8 +170,8 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var importGeneralInfo = function($general, data){
|
var importGeneralInfo = function($general, data) {
|
||||||
var setVal = function(query, val){
|
var setVal = function(query, val) {
|
||||||
$general.find(query).val(val).change();
|
$general.find(query).val(val).change();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +179,6 @@ jQuery(function($){
|
|||||||
|
|
||||||
setVal('.form_officer_level', data.officer_level);
|
setVal('.form_officer_level', data.officer_level);
|
||||||
setVal('.form_exp_level', data.explevel);
|
setVal('.form_exp_level', data.explevel);
|
||||||
setVal('.form_injury', data.injury);
|
|
||||||
|
|
||||||
setVal('.form_leadership', data.leadership);
|
setVal('.form_leadership', data.leadership);
|
||||||
setVal('.form_general_horse', data.horse);
|
setVal('.form_general_horse', data.horse);
|
||||||
@@ -183,93 +207,103 @@ jQuery(function($){
|
|||||||
setVal('.form_dex5', data.dex5);
|
setVal('.form_dex5', data.dex5);
|
||||||
setVal('.form_defence_train', data.defence_train);
|
setVal('.form_defence_train', data.defence_train);
|
||||||
|
|
||||||
if(!setGeneralNo($general, data.no)){
|
setVal('.form_warnum', data.warnum);
|
||||||
|
setVal('.form_killnum', data.killnum);
|
||||||
|
setVal('.form_killcrew', data.killcrew);
|
||||||
|
|
||||||
|
if (!setGeneralNo($general, data.no)) {
|
||||||
setGeneralNo($general, generateNewGeneralNo());
|
setGeneralNo($general, generateNewGeneralNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var exportGeneralInfo = function($general){
|
var exportGeneralInfo = function($general) {
|
||||||
var getInt = function(query){
|
var getInt = function(query) {
|
||||||
return parseInt($general.find(query).val());
|
return parseInt($general.find(query).val());
|
||||||
}
|
}
|
||||||
|
|
||||||
var getVal = function(query){
|
var getVal = function(query) {
|
||||||
return $general.find(query).val();
|
return $general.find(query).val();
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
no:getGeneralNo($general),
|
no: getGeneralNo($general),
|
||||||
name:getVal('.form_general_name'),
|
name: getVal('.form_general_name'),
|
||||||
officer_level:getInt('.form_officer_level'),
|
officer_level: getInt('.form_officer_level'),
|
||||||
explevel:getInt('.form_exp_level'),
|
explevel: getInt('.form_exp_level'),
|
||||||
|
|
||||||
leadership:getInt('.form_leadership'),
|
leadership: getInt('.form_leadership'),
|
||||||
horse:getVal('.form_general_horse'),
|
horse: getVal('.form_general_horse'),
|
||||||
strength:getInt('.form_strength'),
|
strength: getInt('.form_strength'),
|
||||||
weapon:getVal('.form_general_weap'),
|
weapon: getVal('.form_general_weap'),
|
||||||
intel:getInt('.form_intel'),
|
intel: getInt('.form_intel'),
|
||||||
book:getVal('.form_general_book'),
|
book: getVal('.form_general_book'),
|
||||||
item:getVal('.form_general_item'),
|
item: getVal('.form_general_item'),
|
||||||
|
|
||||||
injury:getInt('.form_injury'),
|
injury: getInt('.form_injury'),
|
||||||
|
|
||||||
rice:getInt('.form_rice'),
|
rice: getInt('.form_rice'),
|
||||||
|
|
||||||
personal:getVal('.form_general_character'),
|
personal: getVal('.form_general_character'),
|
||||||
special2:getVal('.form_general_special_war'),
|
special2: getVal('.form_general_special_war'),
|
||||||
|
|
||||||
crew:getInt('.form_crew'),
|
crew: getInt('.form_crew'),
|
||||||
crewtype:getInt('.form_crewtype'),
|
crewtype: getInt('.form_crewtype'),
|
||||||
atmos:getInt('.form_atmos'),
|
atmos: getInt('.form_atmos'),
|
||||||
train:getInt('.form_train'),
|
train: getInt('.form_train'),
|
||||||
|
|
||||||
|
dex1: getInt('.form_dex1'),
|
||||||
|
dex2: getInt('.form_dex2'),
|
||||||
|
dex3: getInt('.form_dex3'),
|
||||||
|
dex4: getInt('.form_dex4'),
|
||||||
|
dex5: getInt('.form_dex5'),
|
||||||
|
|
||||||
|
defence_train: getInt('.form_defence_train'),
|
||||||
|
|
||||||
|
warnum: getInt('.form_warnum'),
|
||||||
|
killnum: getInt('.form_killnum'),
|
||||||
|
killcrew: getInt('.form_killcrew'),
|
||||||
|
|
||||||
dex1:getInt('.form_dex1'),
|
|
||||||
dex2:getInt('.form_dex2'),
|
|
||||||
dex3:getInt('.form_dex3'),
|
|
||||||
dex4:getInt('.form_dex4'),
|
|
||||||
dex5:getInt('.form_dex5'),
|
|
||||||
defence_train:getInt('.form_defence_train'),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var importBattleInfoByFile = function(files){
|
var importBattleInfoByFile = function(files) {
|
||||||
if(files === null){
|
if (files === null) {
|
||||||
alert('파일 에러!');
|
alert('파일 에러!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(files.length < 1){
|
if (files.length < 1) {
|
||||||
alert("파일 에러!");
|
alert("파일 에러!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var file = files[0];
|
var file = files[0];
|
||||||
if(file.size > 1024*1024){
|
if (file.size > 1024 * 1024) {
|
||||||
alert('파일이 너무 큽니다!');
|
alert('파일이 너무 큽니다!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(file.type === ''){
|
if (file.type === '') {
|
||||||
alert('폴더를 업로드할 수 없습니다!');
|
alert('폴더를 업로드할 수 없습니다!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
reader.onload = function(){
|
reader.onload = function() {
|
||||||
var battleData = {};
|
var battleData = {};
|
||||||
try {
|
try {
|
||||||
battleData = JSON.parse(reader.result);
|
battleData = JSON.parse(reader.result);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
alert('올바르지 않은 파일 형식입니다');
|
alert('올바르지 않은 파일 형식입니다');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!('objType' in battleData)){
|
if (!('objType' in battleData)) {
|
||||||
alert('파일 형식을 확인할 수 없습니다');
|
alert('파일 형식을 확인할 수 없습니다');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(battleData.objType != 'battle'){
|
if (battleData.objType != 'battle') {
|
||||||
alert('전투 데이터가 아닙니다');
|
alert('전투 데이터가 아닙니다');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -281,8 +315,7 @@ jQuery(function($){
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
}
|
} catch (e) {
|
||||||
catch(e) {
|
|
||||||
alert('파일을 읽는데 실패했습니다.');
|
alert('파일을 읽는데 실패했습니다.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -290,52 +323,52 @@ jQuery(function($){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var importGeneralInfoByFile = function(files, $card){
|
var importGeneralInfoByFile = function(files, $card) {
|
||||||
if($card === undefined){
|
if ($card === undefined) {
|
||||||
$card = addDefender();
|
$card = addDefender();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(files === null){
|
if (files === null) {
|
||||||
alert('파일 에러!');
|
alert('파일 에러!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(files.length < 1){
|
if (files.length < 1) {
|
||||||
alert("파일 에러!");
|
alert("파일 에러!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var file = files[0];
|
var file = files[0];
|
||||||
if(file.size > 1024*1024){
|
if (file.size > 1024 * 1024) {
|
||||||
alert('파일이 너무 큽니다!');
|
alert('파일이 너무 큽니다!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(file.type === ''){
|
if (file.type === '') {
|
||||||
alert('폴더를 업로드할 수 없습니다!');
|
alert('폴더를 업로드할 수 없습니다!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
reader.onload = function(){
|
reader.onload = function() {
|
||||||
var generalData = {};
|
var generalData = {};
|
||||||
try {
|
try {
|
||||||
generalData = JSON.parse(reader.result);
|
generalData = JSON.parse(reader.result);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
alert('올바르지 않은 파일 형식입니다');
|
alert('올바르지 않은 파일 형식입니다');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!('objType' in generalData)){
|
if (!('objType' in generalData)) {
|
||||||
alert('파일 형식을 확인할 수 없습니다');
|
alert('파일 형식을 확인할 수 없습니다');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(generalData.objType == 'battle'){
|
if (generalData.objType == 'battle') {
|
||||||
importBattleInfo(generalData.data);
|
importBattleInfo(generalData.data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(generalData.objType != 'general'){
|
if (generalData.objType != 'general') {
|
||||||
alert('장수 데이터가 아닙니다');
|
alert('장수 데이터가 아닙니다');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -349,8 +382,7 @@ jQuery(function($){
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
}
|
} catch (e) {
|
||||||
catch(e) {
|
|
||||||
alert('파일을 읽는데 실패했습니다.');
|
alert('파일을 읽는데 실패했습니다.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -358,49 +390,49 @@ jQuery(function($){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var extendGeneralInfoForDB = function(generalData){
|
var extendGeneralInfoForDB = function(generalData) {
|
||||||
|
|
||||||
var dbVal = {
|
var dbVal = {
|
||||||
nation: (generalData.no)<=1 ? 1 : 2,
|
nation: (generalData.no) <= 1 ? 1 : 2,
|
||||||
city: (generalData.no)<=1 ? 1 : 3,
|
city: (generalData.no) <= 1 ? 1 : 3,
|
||||||
turntime:'2018-08-26 12:00',
|
turntime: '2018-08-26 12:00',
|
||||||
special:defaultSpecialDomestic,
|
special: defaultSpecialDomestic,
|
||||||
leadership_exp:0,
|
leadership_exp: 0,
|
||||||
strength_exp:0,
|
strength_exp: 0,
|
||||||
intel_exp:0,
|
intel_exp: 0,
|
||||||
|
|
||||||
gold:10000,
|
gold: 10000,
|
||||||
|
|
||||||
dedication:0,
|
dedication: 0,
|
||||||
|
|
||||||
recent_war:'2018-08-26 12:00',
|
recent_war: '2018-08-26 12:00',
|
||||||
experience:Math.pow(generalData.explevel, 2),
|
experience: Math.pow(generalData.explevel, 2),
|
||||||
};
|
};
|
||||||
|
|
||||||
return $.extend({}, generalData, dbVal);
|
return $.extend({}, generalData, dbVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
var getGeneralFrame = function($btn){
|
var getGeneralFrame = function($btn) {
|
||||||
var $card = $btn.closest('.general_form');
|
var $card = $btn.closest('.general_form');
|
||||||
return $card;
|
return $card;
|
||||||
}
|
}
|
||||||
|
|
||||||
var getGeneralDetail = function($btn){
|
var getGeneralDetail = function($btn) {
|
||||||
var $card = getGeneralFrame($btn);
|
var $card = getGeneralFrame($btn);
|
||||||
var $general = $card.find('.general_detail');
|
var $general = $card.find('.general_detail');
|
||||||
return $general;
|
return $general;
|
||||||
}
|
}
|
||||||
|
|
||||||
var getGeneralNo = function($btn){
|
var getGeneralNo = function($btn) {
|
||||||
return parseInt(getGeneralFrame($btn).data('general_no'));
|
return parseInt(getGeneralFrame($btn).data('general_no'));
|
||||||
}
|
}
|
||||||
|
|
||||||
var setGeneralNo = function($btn, value){
|
var setGeneralNo = function($btn, value) {
|
||||||
if(value == 1){
|
if (value == 1) {
|
||||||
//1번은 무조건 공격자임
|
//1번은 무조건 공격자임
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(value in defenderNoList){
|
if (value in defenderNoList) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var $card = getGeneralFrame($btn);
|
var $card = getGeneralFrame($btn);
|
||||||
@@ -409,35 +441,34 @@ jQuery(function($){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var generateNewGeneralNo = function(){
|
var generateNewGeneralNo = function() {
|
||||||
while(true){
|
while (true) {
|
||||||
var newGeneralNo = parseInt(Math.random()*(1<<24))+2;
|
var newGeneralNo = parseInt(Math.random() * (1 << 24)) + 2;
|
||||||
if(newGeneralNo in defenderNoList){
|
if (newGeneralNo in defenderNoList) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return newGeneralNo;
|
return newGeneralNo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var deleteGeneralNo = function($btn){
|
var deleteGeneralNo = function($btn) {
|
||||||
var $card = getGeneralFrame($btn);
|
var $card = getGeneralFrame($btn);
|
||||||
$card.removeData('general_no');
|
$card.removeData('general_no');
|
||||||
var generalNo = getGeneralNo($card);
|
var generalNo = getGeneralNo($card);
|
||||||
delete defenderNoList[generalNo];
|
delete defenderNoList[generalNo];
|
||||||
}
|
}
|
||||||
|
|
||||||
var addDefender = function($cardAfter){
|
var addDefender = function($cardAfter) {
|
||||||
var $newCard = $('<div class="card mb-2 defender_form general_form"></div>');
|
var $newCard = $('<div class="card mb-2 defender_form general_form"></div>');
|
||||||
|
|
||||||
if($cardAfter === undefined){
|
if ($cardAfter === undefined) {
|
||||||
$defenderColumn.append($newCard);
|
$defenderColumn.append($newCard);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$cardAfter.after($newCard);
|
$cardAfter.after($newCard);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newCard.append($defenderHeaderForm.clone(true,true));
|
$newCard.append($defenderHeaderForm.clone(true, true));
|
||||||
$newCard.append($generalForm.clone(true,true));
|
$newCard.append($generalForm.clone(true, true));
|
||||||
|
|
||||||
$newGeneral = getGeneralDetail($newCard);
|
$newGeneral = getGeneralDetail($newCard);
|
||||||
setGeneralNo($newCard, generateNewGeneralNo());
|
setGeneralNo($newCard, generateNewGeneralNo());
|
||||||
@@ -445,12 +476,12 @@ jQuery(function($){
|
|||||||
return $newCard;
|
return $newCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
var deleteDefender = function($card){
|
var deleteDefender = function($card) {
|
||||||
deleteGeneralNo($card);
|
deleteGeneralNo($card);
|
||||||
$card.detach();
|
$card.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
var copyDefender = function($card){
|
var copyDefender = function($card) {
|
||||||
var $general = getGeneralDetail($card);
|
var $general = getGeneralDetail($card);
|
||||||
|
|
||||||
var generalData = exportGeneralInfo($general);
|
var generalData = exportGeneralInfo($general);
|
||||||
@@ -458,7 +489,7 @@ jQuery(function($){
|
|||||||
importGeneralInfo(getGeneralDetail($newObj), generalData);
|
importGeneralInfo(getGeneralDetail($newObj), generalData);
|
||||||
}
|
}
|
||||||
|
|
||||||
var importBattleInfo = function(battleData){
|
var importBattleInfo = function(battleData) {
|
||||||
|
|
||||||
$('.form_load_battle_file').val('');
|
$('.form_load_battle_file').val('');
|
||||||
console.log(battleData);
|
console.log(battleData);
|
||||||
@@ -481,12 +512,11 @@ jQuery(function($){
|
|||||||
$('.delete-defender').click();
|
$('.delete-defender').click();
|
||||||
|
|
||||||
$attackerNation.find('.form_nation_type').val(attackerNation.type);
|
$attackerNation.find('.form_nation_type').val(attackerNation.type);
|
||||||
$attackerNation.find('.form_tech').val(Math.floor(attackerNation.tech/1000));
|
$attackerNation.find('.form_tech').val(Math.floor(attackerNation.tech / 1000));
|
||||||
$attackerNation.find('.form_nation_level').val(attackerNation.level);
|
$attackerNation.find('.form_nation_level').val(attackerNation.level);
|
||||||
if(attackerNation.capital == 1){
|
if (attackerNation.capital == 1) {
|
||||||
$attackerNation.find('.form_is_capital:first').click();
|
$attackerNation.find('.form_is_capital:first').click();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$attackerNation.find('.form_is_capital:last').click();
|
$attackerNation.find('.form_is_capital:last').click();
|
||||||
}
|
}
|
||||||
$attackerNation.find('.form_city_level').val(attackerCity.level);
|
$attackerNation.find('.form_city_level').val(attackerCity.level);
|
||||||
@@ -494,56 +524,55 @@ jQuery(function($){
|
|||||||
importGeneralInfo($('.attacker_form'), attackerGeneral);
|
importGeneralInfo($('.attacker_form'), attackerGeneral);
|
||||||
|
|
||||||
$defenderNation.find('.form_nation_type').val(defenderNation.type);
|
$defenderNation.find('.form_nation_type').val(defenderNation.type);
|
||||||
$defenderNation.find('.form_tech').val(Math.floor(defenderNation.tech/1000));
|
$defenderNation.find('.form_tech').val(Math.floor(defenderNation.tech / 1000));
|
||||||
$defenderNation.find('.form_nation_level').val(defenderNation.level);
|
$defenderNation.find('.form_nation_level').val(defenderNation.level);
|
||||||
if(defenderNation.capital == 1){
|
if (defenderNation.capital == 1) {
|
||||||
$defenderNation.find('.form_is_capital:first').click();
|
$defenderNation.find('.form_is_capital:first').click();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$defenderNation.find('.form_is_capital:last').click();
|
$defenderNation.find('.form_is_capital:last').click();
|
||||||
}
|
}
|
||||||
$defenderNation.find('.form_city_level').val(defenderCity.level);
|
$defenderNation.find('.form_city_level').val(defenderCity.level);
|
||||||
$('#city_def').val(defenderCity.def);
|
$('#city_def').val(defenderCity.def);
|
||||||
$('#city_wall').val(defenderCity.wall);
|
$('#city_wall').val(defenderCity.wall);
|
||||||
|
|
||||||
$.each(defenderGenerals, function(idx, defenderGeneral){
|
$.each(defenderGenerals, function(idx, defenderGeneral) {
|
||||||
var $card = addDefender();
|
var $card = addDefender();
|
||||||
importGeneralInfo($card, defenderGeneral);
|
importGeneralInfo($card, defenderGeneral);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var exportAllData = function(){
|
var exportAllData = function() {
|
||||||
var $attackerNation = $('.attacker_nation');
|
var $attackerNation = $('.attacker_nation');
|
||||||
var $defenderNation = $('.defender_nation');
|
var $defenderNation = $('.defender_nation');
|
||||||
|
|
||||||
var attackerGeneral = exportGeneralInfo($('.attacker_form'));
|
var attackerGeneral = exportGeneralInfo($('.attacker_form'));
|
||||||
|
|
||||||
var attackerCity = {
|
var attackerCity = {
|
||||||
level:parseInt($attackerNation.find('.form_city_level').val()),
|
level: parseInt($attackerNation.find('.form_city_level').val()),
|
||||||
};
|
};
|
||||||
|
|
||||||
var attackerNation = {
|
var attackerNation = {
|
||||||
type:$attackerNation.find('.form_nation_type').val(),
|
type: $attackerNation.find('.form_nation_type').val(),
|
||||||
tech:parseInt($attackerNation.find('.form_tech').val()) * 1000,
|
tech: parseInt($attackerNation.find('.form_tech').val()) * 1000,
|
||||||
level:parseInt($attackerNation.find('.form_nation_level').val()),
|
level: parseInt($attackerNation.find('.form_nation_level').val()),
|
||||||
capital:$attackerNation.find('.form_is_capital:checked').val()=='1'?1:2,
|
capital: $attackerNation.find('.form_is_capital:checked').val() == '1' ? 1 : 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
var defenderGenerals = $('.defender_form').map(function(){
|
var defenderGenerals = $('.defender_form').map(function() {
|
||||||
return exportGeneralInfo($(this));
|
return exportGeneralInfo($(this));
|
||||||
}).toArray();
|
}).toArray();
|
||||||
|
|
||||||
var defenderCity = {
|
var defenderCity = {
|
||||||
def: parseInt($('#city_def').val()),
|
def: parseInt($('#city_def').val()),
|
||||||
wall: parseInt($('#city_wall').val()),
|
wall: parseInt($('#city_wall').val()),
|
||||||
level:parseInt($defenderNation.find('.form_city_level').val()),
|
level: parseInt($defenderNation.find('.form_city_level').val()),
|
||||||
};
|
};
|
||||||
|
|
||||||
var defenderNation = {
|
var defenderNation = {
|
||||||
type:$defenderNation.find('.form_nation_type').val(),
|
type: $defenderNation.find('.form_nation_type').val(),
|
||||||
tech:parseInt($defenderNation.find('.form_tech').val()) * 1000,
|
tech: parseInt($defenderNation.find('.form_tech').val()) * 1000,
|
||||||
level:parseInt($defenderNation.find('.form_nation_level').val()),
|
level: parseInt($defenderNation.find('.form_nation_level').val()),
|
||||||
capital:$defenderNation.find('.form_is_capital:checked').val()=='1'?3:4,
|
capital: $defenderNation.find('.form_is_capital:checked').val() == '1' ? 3 : 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
var year = parseInt($('#year').val());
|
var year = parseInt($('#year').val());
|
||||||
@@ -551,59 +580,59 @@ jQuery(function($){
|
|||||||
var repeatCnt = parseInt($('#repeat_cnt').val());
|
var repeatCnt = parseInt($('#repeat_cnt').val());
|
||||||
|
|
||||||
return {
|
return {
|
||||||
attackerGeneral:attackerGeneral,
|
attackerGeneral: attackerGeneral,
|
||||||
attackerCity:attackerCity,
|
attackerCity: attackerCity,
|
||||||
attackerNation:attackerNation,
|
attackerNation: attackerNation,
|
||||||
|
|
||||||
defenderGenerals:defenderGenerals,
|
defenderGenerals: defenderGenerals,
|
||||||
defenderCity:defenderCity,
|
defenderCity: defenderCity,
|
||||||
defenderNation:defenderNation,
|
defenderNation: defenderNation,
|
||||||
|
|
||||||
year:year,
|
year: year,
|
||||||
month:month,
|
month: month,
|
||||||
repeatCnt:repeatCnt,
|
repeatCnt: repeatCnt,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var extendAllDataForDB = function(allData){
|
var extendAllDataForDB = function(allData) {
|
||||||
var defaultNation = {
|
var defaultNation = {
|
||||||
nation:0,
|
nation: 0,
|
||||||
name:'재야',
|
name: '재야',
|
||||||
capital:0,
|
capital: 0,
|
||||||
level:0,
|
level: 0,
|
||||||
gold:0,
|
gold: 0,
|
||||||
rice:2000,
|
rice: 2000,
|
||||||
type:'None',
|
type: 'None',
|
||||||
tech:0,
|
tech: 0,
|
||||||
gennum:200,
|
gennum: 200,
|
||||||
};
|
};
|
||||||
|
|
||||||
var defaultCity = {
|
var defaultCity = {
|
||||||
nation:0,
|
nation: 0,
|
||||||
supply:1,
|
supply: 1,
|
||||||
name:'도시',
|
name: '도시',
|
||||||
|
|
||||||
pop:500000,
|
pop: 500000,
|
||||||
agri:10000,
|
agri: 10000,
|
||||||
comm:10000,
|
comm: 10000,
|
||||||
secu:10000,
|
secu: 10000,
|
||||||
def:1000,
|
def: 1000,
|
||||||
wall:1000,
|
wall: 1000,
|
||||||
|
|
||||||
trust:100,
|
trust: 100,
|
||||||
|
|
||||||
pop_max:600000,
|
pop_max: 600000,
|
||||||
agri_max:12000,
|
agri_max: 12000,
|
||||||
comm_max:12000,
|
comm_max: 12000,
|
||||||
secu_max:10000,
|
secu_max: 10000,
|
||||||
def_max:12000,
|
def_max: 12000,
|
||||||
wall_max:12000,
|
wall_max: 12000,
|
||||||
|
|
||||||
dead:0,
|
dead: 0,
|
||||||
|
|
||||||
state:0,
|
state: 0,
|
||||||
|
|
||||||
conflict:'{}',
|
conflict: '{}',
|
||||||
};
|
};
|
||||||
|
|
||||||
var attackerNation = $.extend({}, defaultNation, allData.attackerNation);
|
var attackerNation = $.extend({}, defaultNation, allData.attackerNation);
|
||||||
@@ -615,10 +644,9 @@ jQuery(function($){
|
|||||||
attackerCity.city = 1;
|
attackerCity.city = 1;
|
||||||
|
|
||||||
var attackerGeneral = extendGeneralInfoForDB(allData.attackerGeneral);
|
var attackerGeneral = extendGeneralInfoForDB(allData.attackerGeneral);
|
||||||
if(2 <= attackerGeneral.officer_level && attackerGeneral.officer_level <= 4){
|
if (2 <= attackerGeneral.officer_level && attackerGeneral.officer_level <= 4) {
|
||||||
attackerGeneral.officer_city = 1;
|
attackerGeneral.officer_city = 1;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
attackerGeneral.officer_city = 0;
|
attackerGeneral.officer_city = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,16 +657,15 @@ jQuery(function($){
|
|||||||
var defenderCity = $.extend({}, defaultCity, allData.defenderCity);
|
var defenderCity = $.extend({}, defaultCity, allData.defenderCity);
|
||||||
defenderCity.nation = 2;
|
defenderCity.nation = 2;
|
||||||
defenderCity.city = 3;
|
defenderCity.city = 3;
|
||||||
defenderCity.wall_max = defenderCity.wall/5*6;
|
defenderCity.wall_max = parseInt(defenderCity.wall / 5 * 6);
|
||||||
defenderCity.def_max = defenderCity.def/5*6;
|
defenderCity.def_max = parseInt(defenderCity.def / 5 * 6);
|
||||||
|
|
||||||
var defenderGenerals = [];
|
var defenderGenerals = [];
|
||||||
$.each(allData.defenderGenerals, function(){
|
$.each(allData.defenderGenerals, function() {
|
||||||
var defenderGeneral = extendGeneralInfoForDB(this);
|
var defenderGeneral = extendGeneralInfoForDB(this);
|
||||||
if(2 <= defenderGeneral.officer_level && defenderGeneral.officer_level <= 4){
|
if (2 <= defenderGeneral.officer_level && defenderGeneral.officer_level <= 4) {
|
||||||
defenderGeneral.officer_city = 3;
|
defenderGeneral.officer_city = 3;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
defenderGeneral.officer_city = 0;
|
defenderGeneral.officer_city = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -647,58 +674,55 @@ jQuery(function($){
|
|||||||
|
|
||||||
|
|
||||||
return $.extend({}, allData, {
|
return $.extend({}, allData, {
|
||||||
attackerGeneral:attackerGeneral,
|
attackerGeneral: attackerGeneral,
|
||||||
attackerCity:attackerCity,
|
attackerCity: attackerCity,
|
||||||
attackerNation:attackerNation,
|
attackerNation: attackerNation,
|
||||||
|
|
||||||
defenderGenerals:defenderGenerals,
|
defenderGenerals: defenderGenerals,
|
||||||
defenderCity:defenderCity,
|
defenderCity: defenderCity,
|
||||||
defenderNation:defenderNation,
|
defenderNation: defenderNation,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var parseSkillCount = function(skills){
|
var parseSkillCount = function(skills) {
|
||||||
var result = [];
|
var result = [];
|
||||||
$.each(skills, function(key, value){
|
$.each(skills, function(key, value) {
|
||||||
result.push("{0}({1}회)".format(key, toPretty(value)));
|
result.push("{0}({1}회)".format(key, toPretty(value)));
|
||||||
})
|
})
|
||||||
|
|
||||||
if(result.length == 0){
|
if (result.length == 0) {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
return result.join(', ');
|
return result.join(', ');
|
||||||
}
|
}
|
||||||
|
|
||||||
var toPretty = function(number){
|
var toPretty = function(number) {
|
||||||
if(isInt(number)){
|
if (isInt(number)) {
|
||||||
number = parseInt(number);
|
number = parseInt(number);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
number = parseFloat(number).toFixed(2);
|
number = parseFloat(number).toFixed(2);
|
||||||
}
|
}
|
||||||
return numberWithCommas(number);
|
return numberWithCommas(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
var showBattleResult = function(result){
|
var showBattleResult = function(result) {
|
||||||
$('#result_datetime').html(result.datetime);
|
$('#result_datetime').html(result.datetime);
|
||||||
$('#result_warcnt').html(toPretty(result.avgWar));
|
$('#result_warcnt').html(toPretty(result.avgWar));
|
||||||
$('#result_phase').html(toPretty(result.phase));
|
$('#result_phase').html(toPretty(result.phase));
|
||||||
$('#result_killed').html(toPretty(result.killed));
|
$('#result_killed').html(toPretty(result.killed));
|
||||||
if(result.minKilled != result.maxKilled){
|
if (result.minKilled != result.maxKilled) {
|
||||||
$('#result_maxKilled').html(toPretty(result.maxKilled));
|
$('#result_maxKilled').html(toPretty(result.maxKilled));
|
||||||
$('#result_minKilled').html(toPretty(result.minKilled));
|
$('#result_minKilled').html(toPretty(result.minKilled));
|
||||||
$('#result_varKilled').show();
|
$('#result_varKilled').show();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$('#result_varKilled').hide();
|
$('#result_varKilled').hide();
|
||||||
}
|
}
|
||||||
$('#result_dead').html(toPretty(result.dead));
|
$('#result_dead').html(toPretty(result.dead));
|
||||||
if(result.minDead != result.maxDead){
|
if (result.minDead != result.maxDead) {
|
||||||
$('#result_maxDead').html(toPretty(result.maxDead));
|
$('#result_maxDead').html(toPretty(result.maxDead));
|
||||||
$('#result_minDead').html(toPretty(result.minDead));
|
$('#result_minDead').html(toPretty(result.minDead));
|
||||||
$('#result_varDead').show();
|
$('#result_varDead').show();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$('#result_varDead').hide();
|
$('#result_varDead').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -710,7 +734,7 @@ jQuery(function($){
|
|||||||
|
|
||||||
var $summary = $('#battle_result_summary');
|
var $summary = $('#battle_result_summary');
|
||||||
|
|
||||||
$.each(result.defendersSkills, function(idx, defenderSkills){
|
$.each(result.defendersSkills, function(idx, defenderSkills) {
|
||||||
console.log(defenderSkills);
|
console.log(defenderSkills);
|
||||||
var $result = $("<tr class='result_defenderSkills'><th>수비자{0} 스킬</th><td></td></tr>".format(idx + 1));
|
var $result = $("<tr class='result_defenderSkills'><th>수비자{0} 스킬</th><td></td></tr>".format(idx + 1));
|
||||||
$result.find('td').html(parseSkillCount(defenderSkills));
|
$result.find('td').html(parseSkillCount(defenderSkills));
|
||||||
@@ -722,35 +746,35 @@ jQuery(function($){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var beginBattle = function(){
|
var beginBattle = function() {
|
||||||
var data = extendAllDataForDB(exportAllData());
|
var data = extendAllDataForDB(exportAllData());
|
||||||
console.log(data);
|
console.log(data);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type: 'post',
|
||||||
url:'j_simulate_battle.php',
|
url: 'j_simulate_battle.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
action:'battle',
|
action: 'battle',
|
||||||
query:JSON.stringify(data),
|
query: JSON.stringify(data),
|
||||||
}
|
}
|
||||||
}).then(function(result){
|
}).then(function(result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if(!result.result){
|
if (!result.result) {
|
||||||
alert(result.reason);
|
alert(result.reason);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showBattleResult(result);
|
showBattleResult(result);
|
||||||
|
|
||||||
}, function(result){
|
}, function(result) {
|
||||||
alert('전투 개시 실패!');
|
alert('전투 개시 실패!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var reorderDefender = function(defenderOrder){
|
var reorderDefender = function(defenderOrder) {
|
||||||
$.each(defenderOrder, function(idx, generalNo){
|
$.each(defenderOrder, function(idx, generalNo) {
|
||||||
|
|
||||||
if(!(generalNo in defenderNoList)){
|
if (!(generalNo in defenderNoList)) {
|
||||||
//음..?
|
//음..?
|
||||||
alert("{0}이 수비자 리스트에 없습니다. 버그인 듯 합니다.".format(generalNo));
|
alert("{0}이 수비자 리스트에 없습니다. 버그인 듯 합니다.".format(generalNo));
|
||||||
return true;
|
return true;
|
||||||
@@ -762,39 +786,147 @@ jQuery(function($){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
var requestReorderDefender = function(){
|
var requestReorderDefender = function() {
|
||||||
var data = extendAllDataForDB(exportAllData());
|
var data = extendAllDataForDB(exportAllData());
|
||||||
console.log(data);
|
console.log(data);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type: 'post',
|
||||||
url:'j_simulate_battle.php',
|
url: 'j_simulate_battle.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
action:'reorder',
|
action: 'reorder',
|
||||||
query:JSON.stringify(data),
|
query: JSON.stringify(data),
|
||||||
}
|
}
|
||||||
}).then(function(result){
|
}).then(function(result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if(!result.result){
|
if (!result.result) {
|
||||||
alert(result.reason);
|
alert(result.reason);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
reorderDefender(result.order);
|
reorderDefender(result.order);
|
||||||
|
|
||||||
}, function(result){
|
}, function(result) {
|
||||||
alert('재정렬 실패!');
|
alert('재정렬 실패!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var initGeneralList = false;
|
||||||
|
|
||||||
|
$('#importFromDB').click(function() {
|
||||||
|
var generalID = $('#modalSelector').val();
|
||||||
|
console.log(generalID);
|
||||||
|
|
||||||
|
|
||||||
|
$.post({
|
||||||
|
url: 'j_export_simulator_object.php',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
destGeneralID: generalID
|
||||||
|
}
|
||||||
|
}).then(function(data) {
|
||||||
|
|
||||||
|
if (!data.result) {
|
||||||
|
alert(data.reason);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var $modal = $('#importModal');
|
||||||
|
var $card = $modal.data('target');
|
||||||
|
importGeneralInfo($card, data.general);
|
||||||
|
|
||||||
|
$modal.modal('hide');
|
||||||
|
}, errUnknown);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#importModal').on('show.bs.modal', function(e) {
|
||||||
|
if (!initGeneralList) {
|
||||||
|
var $list = $('#modalSelector');
|
||||||
|
|
||||||
|
var addNation = function(generalList, nationName, color) {
|
||||||
|
|
||||||
|
generalList.sort(function(lhs, rhs) {
|
||||||
|
if (lhs.npc != rhs.npc) {
|
||||||
|
return lhs.npc - rhs.npc;
|
||||||
|
}
|
||||||
|
if (lhs.name < rhs.name) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (lhs.name > rhs.name) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
})
|
||||||
|
var $optGroup = $('<optgroup label="{0}"></optgroup>'.format(nationName));
|
||||||
|
$optGroup.css('background-color', color);
|
||||||
|
$optGroup.css('color', isBrightColor(color) ? 'black' : 'white');
|
||||||
|
|
||||||
|
$.each(generalList, function(idx, general) {
|
||||||
|
$item = $('<option value="{0}">{1}</option>'.format(general.no, general.name));
|
||||||
|
if (general.npc) {
|
||||||
|
$item.css('color', getNpcColor(general.npc));
|
||||||
|
} else {
|
||||||
|
$item.css('color', 'white');
|
||||||
|
}
|
||||||
|
$item.css('background-color', 'black');
|
||||||
|
$optGroup.append($item);
|
||||||
|
|
||||||
|
});
|
||||||
|
$list.append($optGroup);
|
||||||
|
}
|
||||||
|
$.post({
|
||||||
|
url: 'j_get_basic_general_list.php',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
req: 2,
|
||||||
|
}
|
||||||
|
}).then(function(data) {
|
||||||
|
if (!data.result) {
|
||||||
|
alert(data.reason);
|
||||||
|
$('#importModal').modal('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var nations = data.nation;
|
||||||
|
var myNationID = data.nationID;
|
||||||
|
|
||||||
|
$list.empty();
|
||||||
|
//자국 먼저
|
||||||
|
|
||||||
|
if (0 in data.list) {
|
||||||
|
nations[0] = {
|
||||||
|
nation: 0,
|
||||||
|
name: '재야',
|
||||||
|
color: '#000000'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
addNation(combineArray(data.list[myNationID], data.column), nations[myNationID].name, nations[myNationID].color);
|
||||||
|
|
||||||
|
for (var nationID in data.list) {
|
||||||
|
if (nationID == myNationID) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
addNation(combineArray(data.list[nationID], data.column), nations[nationID].name, nations[nationID].color);
|
||||||
|
}
|
||||||
|
initGeneralList = true;
|
||||||
|
}, errUnknown);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
initBasicEvent();
|
initBasicEvent();
|
||||||
$attackerCard.append($generalForm.clone(true,true));
|
$attackerCard.append($generalForm.clone(true, true));
|
||||||
addDefender();
|
addDefender();
|
||||||
|
|
||||||
$('.btn-begin_battle').click(function(){
|
$('.btn-begin_battle').click(function() {
|
||||||
beginBattle();
|
beginBattle();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btn-reorder_defender').click(function(){
|
$('.btn-reorder_defender').click(function() {
|
||||||
requestReorderDefender();
|
requestReorderDefender();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
+66
-72
@@ -1,26 +1,26 @@
|
|||||||
function changePermission(isAmbassador, rawGeneralList){
|
function changePermission(isAmbassador, rawGeneralList) {
|
||||||
console.log(isAmbassador);
|
console.log(isAmbassador);
|
||||||
console.log(rawGeneralList);
|
console.log(rawGeneralList);
|
||||||
|
|
||||||
var generalList = [];
|
var generalList = [];
|
||||||
$.each(rawGeneralList, function(idx, value){
|
$.each(rawGeneralList, function(idx, value) {
|
||||||
generalList.push(parseInt(value.id));
|
generalList.push(parseInt(value.id));
|
||||||
})
|
})
|
||||||
|
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_general_set_permission.php',
|
url: 'j_general_set_permission.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
isAmbassador:isAmbassador,
|
isAmbassador: isAmbassador,
|
||||||
genlist:generalList
|
genlist: generalList
|
||||||
},
|
},
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
alert('변경하지 못했습니다.');
|
alert('변경하지 못했습니다.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
alert('변경하지 못했습니다. : '+data.reason);
|
alert('변경하지 못했습니다. : ' + data.reason);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
alert('변경했습니다.');
|
alert('변경했습니다.');
|
||||||
@@ -28,19 +28,19 @@ function changePermission(isAmbassador, rawGeneralList){
|
|||||||
}, errUnknown);
|
}, errUnknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function(){
|
$(function() {
|
||||||
$('#selectAmbassador').select2({
|
$('#selectAmbassador').select2({
|
||||||
theme: 'bootstrap4',
|
theme: 'bootstrap4',
|
||||||
placeholder: "",
|
placeholder: "",
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
language: "ko",
|
language: "ko",
|
||||||
width:300,
|
width: 300,
|
||||||
maximumSelectionLength: 2,
|
maximumSelectionLength: 2,
|
||||||
containerCss: {
|
containerCss: {
|
||||||
display: "inline-block !important;",
|
display: "inline-block !important;",
|
||||||
color: 'white !important'
|
color: 'white !important'
|
||||||
},
|
},
|
||||||
data:candidateAmbassadors,
|
data: candidateAmbassadors,
|
||||||
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||||
});
|
});
|
||||||
@@ -50,19 +50,19 @@ $(function(){
|
|||||||
placeholder: "",
|
placeholder: "",
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
language: "ko",
|
language: "ko",
|
||||||
width:300,
|
width: 300,
|
||||||
maximumSelectionLength: 2,
|
maximumSelectionLength: 2,
|
||||||
containerCss: {
|
containerCss: {
|
||||||
display: "inline-block !important;",
|
display: "inline-block !important;",
|
||||||
color: 'white !important'
|
color: 'white !important'
|
||||||
},
|
},
|
||||||
data:candidateAuditors,
|
data: candidateAuditors,
|
||||||
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
//containerCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||||
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
dropdownCssClass: 'simple-select2-align-center bg-secondary text-secondary',
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#changeAmbassador').click(function(){
|
$('#changeAmbassador').click(function() {
|
||||||
if(!confirm('외교권자를 변경할까요?')){
|
if (!confirm('외교권자를 변경할까요?')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,8 +70,8 @@ $(function(){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#changeAuditor').click(function(){
|
$('#changeAuditor').click(function() {
|
||||||
if(!confirm('조언자를 변경할까요?')){
|
if (!confirm('조언자를 변경할까요?')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,31 +79,31 @@ $(function(){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btn_kick').click(function(){
|
$('#btn_kick').click(function() {
|
||||||
var $kickSelect = $('#genlist_kick option:selected');
|
var $kickSelect = $('#genlist_kick option:selected');
|
||||||
var generalID = $kickSelect.val();
|
var generalID = $kickSelect.val();
|
||||||
if(!generalID){
|
if (!generalID) {
|
||||||
alert('장수를 선택해주세요');
|
alert('장수를 선택해주세요');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var generalName = $kickSelect.data('name');
|
var generalName = $kickSelect.data('name');
|
||||||
if(!confirm('{0}를 추방하시겠습니까?'.format(generalName))){
|
if (!confirm('{0}를 추방하시겠습니까?'.format(generalName))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_myBossInfo.php',
|
url: 'j_myBossInfo.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
action:'추방',
|
action: '추방',
|
||||||
destGeneralID:generalID
|
destGeneralID: generalID
|
||||||
},
|
},
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
alert('추방하지 못했습니다.');
|
alert('추방하지 못했습니다.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
alert('추방하지 못했습니다. : '+data.reason);
|
alert('추방하지 못했습니다. : ' + data.reason);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
alert('{0}를 추방했습니다.'.format(generalName));
|
alert('{0}를 추방했습니다.'.format(generalName));
|
||||||
@@ -112,7 +112,7 @@ $(function(){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btn_appoint').click(function(){
|
$('.btn_appoint').click(function() {
|
||||||
var $btn = $(this);
|
var $btn = $(this);
|
||||||
var officerLevel = $btn.data('officer_level');
|
var officerLevel = $btn.data('officer_level');
|
||||||
var officerLevelText = $btn.data('officer_level_text');
|
var officerLevelText = $btn.data('officer_level_text');
|
||||||
@@ -121,76 +121,70 @@ $(function(){
|
|||||||
var $generalSelect = $('#genlist_{0} option:selected'.format(officerLevel));
|
var $generalSelect = $('#genlist_{0} option:selected'.format(officerLevel));
|
||||||
var $citySelect = $('#citylist_{0} option:selected'.format(officerLevel));
|
var $citySelect = $('#citylist_{0} option:selected'.format(officerLevel));
|
||||||
|
|
||||||
var generalID = $generalSelect.val();
|
var generalID = parseInt($generalSelect.val());
|
||||||
var generalName = $generalSelect.data('name');
|
var generalName = $generalSelect.data('name');
|
||||||
var generalOfficerLevel = $generalSelect.data('officer_level');
|
var generalOfficerLevel = $generalSelect.data('officer_level');
|
||||||
|
|
||||||
|
|
||||||
if(officerLevel >= 5){
|
if (officerLevel >= 5) {
|
||||||
if(generalID == 0){
|
if (generalID == 0) {
|
||||||
if(!confirm('{0}직을 비우시겠습니까?'.format(officerLevelText))){
|
if (!confirm('{0}직을 비우시겠습니까?'.format(officerLevelText))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if (generalOfficerLevel >= 5) {
|
||||||
|
if (!confirm('이미 수뇌인 {0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!confirm('{0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(generalOfficerLevel >= 5){
|
} else {
|
||||||
if(!confirm('이미 수뇌인 {0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(!confirm('{0}을(를) {1}직에 임명하시겠습니까?'.format(generalName, officerLevelText))){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
cityID = $citySelect.val();
|
cityID = $citySelect.val();
|
||||||
if(!cityID){
|
if (!cityID) {
|
||||||
alert('도시를 선택해주세요');
|
alert('도시를 선택해주세요');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cityName = $citySelect.find('option:selected .name_field').text();
|
cityName = $citySelect.find('option:selected .name_field').text();
|
||||||
|
|
||||||
if(generalID == 0){
|
if (generalID == 0) {
|
||||||
if(!confirm('{0} {1}직을 비우시겠습니까?'.format(cityName, officerLevelText))){
|
if (!confirm('{0} {1}직을 비우시겠습니까?'.format(cityName, officerLevelText))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
} else if (generalOfficerLevel >= 5) {
|
||||||
else if(generalOfficerLevel >= 5){
|
if (!confirm('수뇌인 {0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))) {
|
||||||
if(!confirm('수뇌인 {0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))){
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else{
|
if (!confirm('{0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))) {
|
||||||
if(!confirm('{0}을(를) {1} {2}직에 임명하시겠습니까?'.format(generalName, cityName, officerLevelText))){
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_myBossInfo.php',
|
url: 'j_myBossInfo.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
action:'임명',
|
action: '임명',
|
||||||
destGeneralID:generalID,
|
destGeneralID: generalID,
|
||||||
destCityID:cityID,
|
destCityID: cityID,
|
||||||
officerLevel:officerLevel
|
officerLevel: officerLevel
|
||||||
},
|
},
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
alert('임명하지 못했습니다.');
|
alert('임명하지 못했습니다.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
alert('임명하지 못했습니다. : '+data.reason);
|
alert('임명하지 못했습니다. : ' + data.reason);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(generalID){
|
if (generalID) {
|
||||||
alert('{0}을(를) 임명했습니다.'.format(generalName));
|
alert('{0}을(를) 임명했습니다.'.format(generalName));
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
alert('관직을 비웠습니다.');
|
alert('관직을 비웠습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+167
-99
@@ -3,8 +3,8 @@
|
|||||||
* @see https://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
|
* @see https://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
|
||||||
* @param {string} string escape하고자 하는 문자열
|
* @param {string} string escape하고자 하는 문자열
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
var escapeHtml = (function (string) {
|
var escapeHtml = (function(string) {
|
||||||
var entityMap = {
|
var entityMap = {
|
||||||
'&': '&',
|
'&': '&',
|
||||||
'<': '<',
|
'<': '<',
|
||||||
@@ -32,58 +32,70 @@ function isInt(n) {
|
|||||||
return +n === n && !(n % 1);
|
return +n === n && !(n % 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
;(function(ns){
|
;
|
||||||
|
(function(ns) {
|
||||||
//https://gist.github.com/demouth/3217440
|
//https://gist.github.com/demouth/3217440
|
||||||
/**
|
/**
|
||||||
* mb_strwidth
|
* mb_strwidth
|
||||||
* @param String
|
* @param String
|
||||||
* @return int
|
* @return int
|
||||||
* @see http://php.net/manual/ja/function.mb-strwidth.php
|
* @see http://php.net/manual/ja/function.mb-strwidth.php
|
||||||
*/
|
*/
|
||||||
var mb_strwidth = function(str){
|
var mb_strwidth = function(str) {
|
||||||
var i=0,l=str.length,c='',length=0;
|
var i = 0,
|
||||||
for(;i<l;i++){
|
l = str.length,
|
||||||
c=str.charCodeAt(i);
|
c = '',
|
||||||
if(0x0000<=c&&c<=0x0019){
|
length = 0;
|
||||||
length += 0;
|
for (; i < l; i++) {
|
||||||
}else if(0x0020<=c&&c<=0x1FFF){
|
c = str.charCodeAt(i);
|
||||||
length += 1;
|
if (0x0000 <= c && c <= 0x0019) {
|
||||||
}else if(0x2000<=c&&c<=0xFF60){
|
length += 0;
|
||||||
length += 2;
|
} else if (0x0020 <= c && c <= 0x1FFF) {
|
||||||
}else if(0xFF61<=c&&c<=0xFF9F){
|
length += 1;
|
||||||
length += 1;
|
} else if (0x2000 <= c && c <= 0xFF60) {
|
||||||
}else if(0xFFA0<=c){
|
length += 2;
|
||||||
length += 2;
|
} else if (0xFF61 <= c && c <= 0xFF9F) {
|
||||||
}
|
length += 1;
|
||||||
}
|
} else if (0xFFA0 <= c) {
|
||||||
return length;
|
length += 2;
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
return length;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mb_strimwidth
|
* mb_strimwidth
|
||||||
* @param String
|
* @param String
|
||||||
* @param int
|
* @param int
|
||||||
* @param int
|
* @param int
|
||||||
* @param String
|
* @param String
|
||||||
* @return String
|
* @return String
|
||||||
* @see http://www.php.net/manual/ja/function.mb-strimwidth.php
|
* @see http://www.php.net/manual/ja/function.mb-strimwidth.php
|
||||||
*/
|
*/
|
||||||
var mb_strimwidth = function(str,start,width,trimmarker){
|
var mb_strimwidth = function(str, start, width, trimmarker) {
|
||||||
if(typeof trimmarker === 'undefined') trimmarker='';
|
if (typeof trimmarker === 'undefined') trimmarker = '';
|
||||||
var trimmakerWidth = mb_strwidth(trimmarker),i=start,l=str.length,trimmedLength=0,trimmedStr='';
|
var trimmakerWidth = mb_strwidth(trimmarker),
|
||||||
for(;i<l;i++){
|
i = start,
|
||||||
var charCode=str.charCodeAt(i),c=str.charAt(i),charWidth=mb_strwidth(c),next=str.charAt(i+1),nextWidth=mb_strwidth(next);
|
l = str.length,
|
||||||
trimmedLength += charWidth;
|
trimmedLength = 0,
|
||||||
trimmedStr += c;
|
trimmedStr = '';
|
||||||
if(trimmedLength+trimmakerWidth+nextWidth>width){
|
for (; i < l; i++) {
|
||||||
trimmedStr += trimmarker;
|
var charCode = str.charCodeAt(i),
|
||||||
break;
|
c = str.charAt(i),
|
||||||
}
|
charWidth = mb_strwidth(c),
|
||||||
}
|
next = str.charAt(i + 1),
|
||||||
return trimmedStr;
|
nextWidth = mb_strwidth(next);
|
||||||
};
|
trimmedLength += charWidth;
|
||||||
ns.mb_strwidth = mb_strwidth;
|
trimmedStr += c;
|
||||||
ns.mb_strimwidth = mb_strimwidth;
|
if (trimmedLength + trimmakerWidth + nextWidth > width) {
|
||||||
|
trimmedStr += trimmarker;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return trimmedStr;
|
||||||
|
};
|
||||||
|
ns.mb_strwidth = mb_strwidth;
|
||||||
|
ns.mb_strimwidth = mb_strimwidth;
|
||||||
})(window);
|
})(window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,7 +105,7 @@ function isInt(n) {
|
|||||||
*/
|
*/
|
||||||
function convertDictById(arr) {
|
function convertDictById(arr) {
|
||||||
var result = {};
|
var result = {};
|
||||||
arr.forEach(function (v, i) {
|
arr.forEach(function(v, i) {
|
||||||
result[v.id] = v;
|
result[v.id] = v;
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
@@ -106,7 +118,7 @@ function convertDictById(arr) {
|
|||||||
*/
|
*/
|
||||||
function convertSet(arr) {
|
function convertSet(arr) {
|
||||||
var result = {};
|
var result = {};
|
||||||
arr.forEach(function (v) {
|
arr.forEach(function(v) {
|
||||||
result[v] = true;
|
result[v] = true;
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
@@ -115,7 +127,7 @@ function convertSet(arr) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {0}, {1}, {2}형태로 포맷해주는 함수
|
* {0}, {1}, {2}형태로 포맷해주는 함수
|
||||||
*/
|
*/
|
||||||
String.prototype.format = function() {
|
String.prototype.format = function() {
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
return this.replace(/{(\d+)}/g, function(match, number) {
|
return this.replace(/{(\d+)}/g, function(match, number) {
|
||||||
@@ -134,12 +146,11 @@ function hexToRgb(hex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function isBrightColor(color){
|
function isBrightColor(color) {
|
||||||
color = hexToRgb(color);
|
color = hexToRgb(color);
|
||||||
if ((color.r*0.299 + color.g*0.587 + color.b*0.114) > 140){
|
if ((color.r * 0.299 + color.g * 0.587 + color.b * 0.114) > 140) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,7 +188,7 @@ function numberWithCommas(x) {
|
|||||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
function linkifyStrWithOpt(text){
|
function linkifyStrWithOpt(text) {
|
||||||
return linkifyStr(text, {});
|
return linkifyStr(text, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,14 +199,14 @@ function linkifyStrWithOpt(text){
|
|||||||
* @param {object} options
|
* @param {object} options
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
var TemplateEngine = function (html, options) {
|
var TemplateEngine = function(html, options) {
|
||||||
var re = /<%(.+?)%>/g,
|
var re = /<%(.+?)%>/g,
|
||||||
reExp = /(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,
|
reExp = /(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,
|
||||||
code = 'with(obj) { var r=[];\n',
|
code = 'with(obj) { var r=[];\n',
|
||||||
cursor = 0,
|
cursor = 0,
|
||||||
result,
|
result,
|
||||||
match;
|
match;
|
||||||
var add = function (line, js) {
|
var add = function(line, js) {
|
||||||
js ? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') :
|
js ? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') :
|
||||||
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : '');
|
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : '');
|
||||||
return add;
|
return add;
|
||||||
@@ -208,82 +219,97 @@ var TemplateEngine = function (html, options) {
|
|||||||
}
|
}
|
||||||
add(html.substr(cursor, html.length - cursor));
|
add(html.substr(cursor, html.length - cursor));
|
||||||
code = (code + 'return r.join(""); }').replace(/[\r\t\n]/g, ' ');
|
code = (code + 'return r.join(""); }').replace(/[\r\t\n]/g, ' ');
|
||||||
try { result = new Function('obj', code).apply(options, [options]); }
|
try { result = new Function('obj', code).apply(options, [options]); } catch (err) { console.error("'" + err.message + "'", " in \n\nCode:\n", code, "\n"); }
|
||||||
catch (err) { console.error("'" + err.message + "'", " in \n\nCode:\n", code, "\n"); }
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIconPath(imgsvr, picture){
|
function getIconPath(imgsvr, picture) {
|
||||||
// ../d_shared/common_path.js 필요
|
// ../d_shared/common_path.js 필요
|
||||||
if(!imgsvr){
|
if (!imgsvr) {
|
||||||
return pathConfig.sharedIcon+'/'+picture;
|
return pathConfig.sharedIcon + '/' + picture;
|
||||||
}
|
} else {
|
||||||
else{
|
return pathConfig.root + '/d_pic/' + picture;
|
||||||
return pathConfig.root+'/d_pic/'+picture;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function activeFlip($obj){
|
function activeFlip($obj) {
|
||||||
var $result;
|
var $result;
|
||||||
if($obj === undefined){
|
if ($obj === undefined) {
|
||||||
$result = $('img[data-flip]');
|
$result = $('img[data-flip]');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$result = $obj.find('img[data-flip]');
|
$result = $obj.find('img[data-flip]');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result.each(function(){
|
$result.each(function() {
|
||||||
activeFlipItem($(this));
|
activeFlipItem($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function activeFlipItem($img){
|
function combineObject(item, columnList) {
|
||||||
|
var newItem = {};
|
||||||
|
for (var columnIdx in columnList) {
|
||||||
|
var columnName = columnList[columnIdx];
|
||||||
|
newItem[columnName] = item[columnIdx];
|
||||||
|
}
|
||||||
|
return newItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
function combineArray(array, columnList) {
|
||||||
|
var result = [];
|
||||||
|
for (var key in array) {
|
||||||
|
var item = array[key];
|
||||||
|
result[key] = combineObject(item, columnList);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function activeFlipItem($img) {
|
||||||
var imageList = [];
|
var imageList = [];
|
||||||
imageList.push($img.attr('src'));
|
imageList.push($img.attr('src'));
|
||||||
$.each($img.data('flip').split(','), function(idx, value){
|
$.each($img.data('flip').split(','), function(idx, value) {
|
||||||
var value = $.trim(value);
|
var value = $.trim(value);
|
||||||
if(!value){
|
if (!value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
imageList.push(value);
|
imageList.push(value);
|
||||||
});
|
});
|
||||||
if(imageList.length <= 1){
|
if (imageList.length <= 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$img.data('computed_flip_array', imageList);
|
$img.data('computed_flip_array', imageList);
|
||||||
$img.data('computed_flip_idx', 0);
|
$img.data('computed_flip_idx', 0);
|
||||||
|
|
||||||
$img.click(function(){
|
$img.click(function() {
|
||||||
var arr = $img.data('computed_flip_array');
|
var arr = $img.data('computed_flip_array');
|
||||||
var idx = $img.data('computed_flip_idx');
|
var idx = $img.data('computed_flip_idx');
|
||||||
idx = (idx + 1)%(arr.length);
|
idx = (idx + 1) % (arr.length);
|
||||||
$img.attr('src', arr[idx]);
|
$img.attr('src', arr[idx]);
|
||||||
$img.data('computed_flip_idx', idx);
|
$img.data('computed_flip_idx', idx);
|
||||||
});
|
});
|
||||||
$img.css('cursor','pointer');
|
$img.css('cursor', 'pointer');
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($) {
|
||||||
$('.obj_tooltip').mouseover(function(){
|
$('.obj_tooltip').mouseover(function() {
|
||||||
var $objTooltip = $(this);
|
var $objTooltip = $(this);
|
||||||
if($objTooltip.data('setObjTooltip')){
|
if ($objTooltip.data('setObjTooltip')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tooltipClassText = $objTooltip.data('tooltip-class');
|
var tooltipClassText = $objTooltip.data('tooltip-class');
|
||||||
if(!tooltipClassText){
|
if (!tooltipClassText) {
|
||||||
tooltipClassText = '';
|
tooltipClassText = '';
|
||||||
}
|
}
|
||||||
var template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
var template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||||
.format(tooltipClassText);
|
.format(tooltipClassText);
|
||||||
|
|
||||||
$objTooltip.tooltip({
|
$objTooltip.tooltip({
|
||||||
title:function(){
|
title: function() {
|
||||||
return $.trim($(this).find('.tooltiptext').html());
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
},
|
},
|
||||||
template:template,
|
template: template,
|
||||||
html:true
|
html: true
|
||||||
}).tooltip('show');
|
}).tooltip('show');
|
||||||
|
|
||||||
$objTooltip.data('setObjTooltip', true);
|
$objTooltip.data('setObjTooltip', true);
|
||||||
@@ -297,7 +323,7 @@ jQuery(function($){
|
|||||||
activeFlip();
|
activeFlip();
|
||||||
|
|
||||||
var customCSS = localStorage.getItem('sam_customCSS');
|
var customCSS = localStorage.getItem('sam_customCSS');
|
||||||
if(customCSS){
|
if (customCSS) {
|
||||||
var $style = $('<style type="text/css"></style>');
|
var $style = $('<style type="text/css"></style>');
|
||||||
$style.text(customCSS);
|
$style.text(customCSS);
|
||||||
$style.appendTo($('head'));
|
$style.appendTo($('head'));
|
||||||
@@ -307,11 +333,11 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function errUnknown(){
|
function errUnknown() {
|
||||||
alert('작업을 실패했습니다.');
|
alert('작업을 실패했습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
function errUnknownToast(){
|
function errUnknownToast() {
|
||||||
$.toast({
|
$.toast({
|
||||||
title: '에러!',
|
title: '에러!',
|
||||||
content: '작업을 실패했습니다.',
|
content: '작업을 실패했습니다.',
|
||||||
@@ -320,8 +346,8 @@ function errUnknownToast(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function quickReject(errMsg){
|
function quickReject(errMsg) {
|
||||||
if(errMsg === undefined){
|
if (errMsg === undefined) {
|
||||||
errMsg = '작업을 실패했습니다.';
|
errMsg = '작업을 실패했습니다.';
|
||||||
}
|
}
|
||||||
var deferred = $.Deferred();
|
var deferred = $.Deferred();
|
||||||
@@ -329,8 +355,8 @@ function quickReject(errMsg){
|
|||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
function nl2br(text){
|
function nl2br(text) {
|
||||||
return text.replace(/\n/g,"<br>");
|
return text.replace(/\n/g, "<br>");
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
function br2nl (text) {
|
function br2nl (text) {
|
||||||
@@ -338,12 +364,54 @@ function br2nl (text) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getNpcColor(npcType){
|
function getNpcColor(npcType) {
|
||||||
if(npcType >= 2){
|
if (npcType >= 2) {
|
||||||
return 'cyan';
|
return 'cyan';
|
||||||
}
|
}
|
||||||
if(npcType == 1){
|
if (npcType == 1) {
|
||||||
return 'skyblue';
|
return 'skyblue';
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function initTooltip($obj) {
|
||||||
|
if ($obj === undefined) {
|
||||||
|
$obj = $('.obj_tooltip');
|
||||||
|
} else if (!$obj.hasClass('obj_tooltip')) {
|
||||||
|
$obj = $obj.find('.obj_tooltip');
|
||||||
|
}
|
||||||
|
console.log($obj);
|
||||||
|
|
||||||
|
$obj.each(function() {
|
||||||
|
$target = $(this);
|
||||||
|
|
||||||
|
if ($target.data('installHandler')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$target.data('installHandler', true);
|
||||||
|
|
||||||
|
$target.mouseover(function() {
|
||||||
|
var $objTooltip = $(this);
|
||||||
|
if ($objTooltip.data('setObjTooltip')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var tooltipClassText = $objTooltip.data('tooltip-class');
|
||||||
|
if (!tooltipClassText) {
|
||||||
|
tooltipClassText = '';
|
||||||
|
}
|
||||||
|
var template = '<div class="tooltip {0}" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||||||
|
.format(tooltipClassText);
|
||||||
|
|
||||||
|
$objTooltip.tooltip({
|
||||||
|
title: function() {
|
||||||
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
|
},
|
||||||
|
template: template,
|
||||||
|
html: true
|
||||||
|
}).tooltip('show');
|
||||||
|
|
||||||
|
$objTooltip.data('setObjTooltip', true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Lodash <https://lodash.com/>
|
||||||
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
*/
|
||||||
File diff suppressed because one or more lines are too long
+69
-71
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
function showCityGeneral(cityIdx){
|
function showCityGeneral(cityIdx){
|
||||||
|
|
||||||
@@ -21,13 +20,13 @@ function loadScenarioPreview(scenarioIdx){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function loadScenarios(){
|
function loadScenarios() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'post',
|
method: 'post',
|
||||||
url:'j_load_scenarios.php',
|
url: 'j_load_scenarios.php',
|
||||||
dataType:'json'
|
dataType: 'json'
|
||||||
}).then(function(result){
|
}).then(function(result) {
|
||||||
if(!result.result){
|
if (!result.result) {
|
||||||
var deferred = $.Deferred();
|
var deferred = $.Deferred();
|
||||||
deferred.reject('fail');
|
deferred.reject('fail');
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
@@ -37,18 +36,18 @@ function loadScenarios(){
|
|||||||
var list = {};
|
var list = {};
|
||||||
|
|
||||||
|
|
||||||
$.each(result.scenario, function(idx, value){
|
$.each(result.scenario, function(idx, value) {
|
||||||
var title = value.title || "-";
|
var title = value.title || "-";
|
||||||
var pat = /【(.*?)[0-9\-_\.a-zA-Z]*】/;
|
var pat = /【(.*?)[0-9\-_\.a-zA-Z]*】/;
|
||||||
var category = pat.exec(title);
|
var category = pat.exec(title);
|
||||||
category = category?category[1]:'-';
|
category = category ? category[1] : '-';
|
||||||
|
|
||||||
value.title = title;
|
value.title = title;
|
||||||
value.category = category;
|
value.category = category;
|
||||||
value.idx = idx;
|
value.idx = idx;
|
||||||
value.year = value.year || 180;
|
value.year = value.year || 180;
|
||||||
|
|
||||||
if(!(category in list)){
|
if (!(category in list)) {
|
||||||
list[category] = {};
|
list[category] = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,12 +55,12 @@ function loadScenarios(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
var $select = $('#scenario_sel');
|
var $select = $('#scenario_sel');
|
||||||
$.each(list, function(category, items){
|
$.each(list, function(category, items) {
|
||||||
var $optgroup = $('<optgroup>').attr('label', category);
|
var $optgroup = $('<optgroup>').attr('label', category);
|
||||||
|
|
||||||
$.each(items, function(idx, scenario){
|
$.each(items, function(idx, scenario) {
|
||||||
var $option = $('<option>')
|
var $option = $('<option>')
|
||||||
.data('scenario',scenario)
|
.data('scenario', scenario)
|
||||||
.val(idx)
|
.val(idx)
|
||||||
.html(scenario.title);
|
.html(scenario.title);
|
||||||
$optgroup.append($option);
|
$optgroup.append($option);
|
||||||
@@ -75,7 +74,7 @@ function loadScenarios(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function scenarioPreview(){
|
function scenarioPreview() {
|
||||||
var $select = $(this);
|
var $select = $(this);
|
||||||
var $option = $select.find('option:selected');
|
var $option = $select.find('option:selected');
|
||||||
|
|
||||||
@@ -89,124 +88,123 @@ function scenarioPreview(){
|
|||||||
|
|
||||||
$year.html('{0}년'.format(scenario.year));
|
$year.html('{0}년'.format(scenario.year));
|
||||||
$npc.html('{0}명'.format(scenario.npc_cnt));
|
$npc.html('{0}명'.format(scenario.npc_cnt));
|
||||||
if(scenario.npcEx_cnt == 0){
|
if (scenario.npcEx_cnt == 0) {
|
||||||
$npcEx.html('');
|
$npcEx.html('');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$npcEx.html('+{0}명'.format(scenario.npcEx_cnt));
|
$npcEx.html('+{0}명'.format(scenario.npcEx_cnt));
|
||||||
}
|
}
|
||||||
|
|
||||||
$nation.html('');
|
$nation.html('');
|
||||||
$.each(scenario.nation, function(idx, nation){
|
$.each(scenario.nation, function(idx, nation) {
|
||||||
$nation.append('<span style="color:{0}">{1}</span> {2}명. {3}<br>'.format(
|
$nation.append('<span style="color:{0}">{1}</span> {2}명. {3}<br>'.format(
|
||||||
nation.color, nation.name, nation.generals, nation.cities.join(', ')
|
nation.color, nation.name, nation.generals, nation.cities.join(', ')
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function formSetup(){
|
function formSetup() {
|
||||||
$.validator.addMethod("autorun_user", function(value,element){
|
$.validator.addMethod("autorun_user", function(value, element) {
|
||||||
var parent = $(element).parent('.input-group');
|
var parent = $(element).parent('.input-group');
|
||||||
var checkCnt = parent.find('input:checked').length;
|
var checkCnt = parent.find('input:checked').length;
|
||||||
if(value <= 0){
|
if (value <= 0) {
|
||||||
if(checkCnt > 0){
|
if (checkCnt > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(checkCnt == 0){
|
if (checkCnt == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}, "유효 시간과 옵션은 동시에 설정해야합니다.");
|
}, "유효 시간과 옵션은 동시에 설정해야합니다.");
|
||||||
$('#game_form').validate({
|
$('#game_form').validate({
|
||||||
rules:{
|
rules: {
|
||||||
turnterm:"required",
|
turnterm: "required",
|
||||||
sync:"required",
|
sync: "required",
|
||||||
scenario:"required",
|
scenario: "required",
|
||||||
fiction:"required",
|
fiction: "required",
|
||||||
extend:"required",
|
extend: "required",
|
||||||
npcmode:"required",
|
npcmode: "required",
|
||||||
show_img_level:"required",
|
show_img_level: "required",
|
||||||
tournament_trig:"required",
|
tournament_trig: "required",
|
||||||
join_mode:'required',
|
join_mode: 'required',
|
||||||
autorun_user_minutes:{required: true, autorun_user: true, min:0}
|
autorun_user_minutes: { required: true, autorun_user: true, min: 0 }
|
||||||
},
|
},
|
||||||
errorElement: "div",
|
errorElement: "div",
|
||||||
errorPlacement: function ( error, element ) {
|
errorPlacement: function(error, element) {
|
||||||
// Add the `help-block` class to the error element
|
// Add the `help-block` class to the error element
|
||||||
error.addClass( "invalid-feedback" );
|
error.addClass("invalid-feedback");
|
||||||
|
|
||||||
if ( element.prop( "type" ) === "checkbox" ) {
|
if (element.prop("type") === "checkbox") {
|
||||||
error.insertAfter( element.parent( "label" ) );
|
error.insertAfter(element.parent("label"));
|
||||||
} else {
|
} else {
|
||||||
error.insertAfter( element );
|
error.insertAfter(element);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
highlight: function ( element, errorClass, validClass ) {
|
highlight: function(element, errorClass, validClass) {
|
||||||
$( element ).addClass( "is-invalid" ).removeClass( "is-valid" );
|
$(element).addClass("is-invalid").removeClass("is-valid");
|
||||||
},
|
},
|
||||||
unhighlight: function (element, errorClass, validClass) {
|
unhighlight: function(element, errorClass, validClass) {
|
||||||
$( element ).addClass( "is-valid" ).removeClass( "is-invalid" );
|
$(element).addClass("is-valid").removeClass("is-invalid");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#game_form').submit(function(e){
|
$('#game_form').submit(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(!$("#game_form").valid()){
|
if (!$("#game_form").valid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var autorun_user_minutes = parseInt($('#autorun_user_minutes').val());
|
var autorun_user_minutes = parseInt($('#autorun_user_minutes').val());
|
||||||
var autorun_user = [];
|
var autorun_user = [];
|
||||||
if(autorun_user_minutes > 0){
|
if (autorun_user_minutes > 0) {
|
||||||
$('.autorun_user_chk:checked').each(function(){
|
$('.autorun_user_chk:checked').each(function() {
|
||||||
autorun_user.push($(this).data('key'));
|
autorun_user.push($(this).data('key'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache:false,
|
cache: false,
|
||||||
type:'post',
|
type: 'post',
|
||||||
url:'j_install.php',
|
url: 'j_install.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
turnterm:$('#turnterm input:radio:checked').val(),
|
turnterm: $('#turnterm input:radio:checked').val(),
|
||||||
sync:$('#sync input:radio:checked').val(),
|
sync: $('#sync input:radio:checked').val(),
|
||||||
scenario:$('#scenario_sel').val(),
|
scenario: $('#scenario_sel').val(),
|
||||||
fiction:$('#fiction input:radio:checked').val(),
|
fiction: $('#fiction input:radio:checked').val(),
|
||||||
extend:$('#extend input:radio:checked').val(),
|
extend: $('#extend input:radio:checked').val(),
|
||||||
npcmode:$('#npcmode input:radio:checked').val(),
|
block_general_create: $('#block_general_create input:radio:checked').val(),
|
||||||
show_img_level:$('#show_img_level input:radio:checked').val(),
|
npcmode: $('#npcmode input:radio:checked').val(),
|
||||||
tournament_trig:$('#tournament_trig input:radio:checked').val(),
|
show_img_level: $('#show_img_level input:radio:checked').val(),
|
||||||
reserve_open:$('#reserve_open').val(),
|
tournament_trig: $('#tournament_trig input:radio:checked').val(),
|
||||||
pre_reserve_open:$('#pre_reserve_open').val(),
|
reserve_open: $('#reserve_open').val(),
|
||||||
join_mode:$('#join_mode input:radio:checked').val(),
|
pre_reserve_open: $('#pre_reserve_open').val(),
|
||||||
autorun_user_minutes:autorun_user_minutes,
|
join_mode: $('#join_mode input:radio:checked').val(),
|
||||||
autorun_user:autorun_user
|
autorun_user_minutes: autorun_user_minutes,
|
||||||
|
autorun_user: autorun_user
|
||||||
}
|
}
|
||||||
}).then(function(result){
|
}).then(function(result) {
|
||||||
var deferred = $.Deferred();
|
var deferred = $.Deferred();
|
||||||
|
|
||||||
if(!result.result){
|
if (!result.result) {
|
||||||
alert(result.reason);
|
alert(result.reason);
|
||||||
deferred.reject('fail');
|
deferred.reject('fail');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
alert('게임이 리셋되었습니다.');
|
alert('게임이 리셋되었습니다.');
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
}).then(function(){
|
}).then(function() {
|
||||||
location.href = '..';
|
location.href = '..';
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function(){
|
$(function() {
|
||||||
loadScenarios();
|
loadScenarios();
|
||||||
$('#scenario_sel').change(scenarioPreview);
|
$('#scenario_sel').change(scenarioPreview);
|
||||||
formSetup();
|
formSetup();
|
||||||
|
|||||||
+218
-186
@@ -1,8 +1,7 @@
|
|||||||
|
|
||||||
function is_touch_device() {
|
function is_touch_device() {
|
||||||
var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');
|
var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');
|
||||||
var mq = function(query) {
|
var mq = function(query) {
|
||||||
return window.matchMedia(query).matches;
|
return window.matchMedia(query).matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch) {
|
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch) {
|
||||||
@@ -14,32 +13,39 @@ function is_touch_device() {
|
|||||||
// https://git.io/vznFH
|
// https://git.io/vznFH
|
||||||
var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');
|
var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');
|
||||||
return mq(query);
|
return mq(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadWorldMap(option){
|
function reloadWorldMap(option, drawTarget) {
|
||||||
var $world_map = $('.world_map');
|
if (drawTarget === undefined || drawTarget === null) {
|
||||||
|
drawTarget = '.world_map'
|
||||||
|
}
|
||||||
|
var $world_map = $(drawTarget);
|
||||||
|
|
||||||
if($world_map.length == 0){
|
if ($world_map.length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultOption = {
|
var defaultOption = {
|
||||||
isDetailMap:true, //복잡 지도, 단순 지도
|
isDetailMap: true, //복잡 지도, 단순 지도
|
||||||
clickableAll:false, //어떤 경우든 클릭을 가능하게 함. 해당 동작의 동작 가능성 여부와는 별도.
|
clickableAll: false, //어떤 경우든 클릭을 가능하게 함. 해당 동작의 동작 가능성 여부와는 별도.
|
||||||
selectCallback:null, //callback을 지정시 clickable과 관계 없이 해당 함수를 실행.
|
selectCallback: null, //callback을 지정시 clickable과 관계 없이 해당 함수를 실행.
|
||||||
hrefTemplate:'#', //도시가 클릭가능할 경우 지정할 href값. {0}은 도시 id로 변환됨
|
hrefTemplate: '#', //도시가 클릭가능할 경우 지정할 href값. {0}은 도시 id로 변환됨
|
||||||
useCachedMap:false, //맵 캐시를 사용
|
useCachedMap: false, //맵 캐시를 사용
|
||||||
|
|
||||||
//아래부터는 post query에 들어갈 녀석
|
//아래부터는 post query에 들어갈 녀석
|
||||||
year:null, //year값, 연감등에 사용
|
year: null, //year값, 연감등에 사용
|
||||||
month:null, //month값, 연감등에 사용
|
month: null, //month값, 연감등에 사용
|
||||||
aux:null, //기타 넣고 싶은 값을 입력
|
aux: null, //기타 넣고 싶은 값을 입력
|
||||||
neutralView:false, //clickable, 소속 국가, 첩보 여부 등을 반환여부를 설정
|
neutralView: false, //clickable, 소속 국가, 첩보 여부 등을 반환여부를 설정
|
||||||
showMe:true, //반환 값에 본인이 위치한 도시 값을 반환하도록 설정. neutralView와 별개
|
showMe: true, //반환 값에 본인이 위치한 도시 값을 반환하도록 설정. neutralView와 별개
|
||||||
targetJson:'j_map.php',
|
|
||||||
|
targetJson: 'j_map.php',
|
||||||
|
reqType: 'post',
|
||||||
|
dynamicMapTheme: false,
|
||||||
|
callback: null,
|
||||||
|
|
||||||
//기타 보조 값
|
//기타 보조 값
|
||||||
startYear:null,
|
startYear: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
option = $.extend(defaultOption, option);
|
option = $.extend(defaultOption, option);
|
||||||
@@ -56,23 +62,23 @@ function reloadWorldMap(option){
|
|||||||
var storedStartYear = 'sam.{0}.startYear'.format(serverNick);
|
var storedStartYear = 'sam.{0}.startYear'.format(serverNick);
|
||||||
//OBJ : startYear, year, month, cityList, nationList, spyList, shownByGeneralList, myCity
|
//OBJ : startYear, year, month, cityList, nationList, spyList, shownByGeneralList, myCity
|
||||||
|
|
||||||
function checkReturnObject(obj){
|
function checkReturnObject(obj) {
|
||||||
if(!obj.result){
|
if (!obj.result) {
|
||||||
var obj = $.Deferred();
|
var obj = $.Deferred();
|
||||||
obj.reject('fail');
|
obj.reject('fail');
|
||||||
return obj.promise();
|
return obj.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$.isNumeric(obj.startYear)
|
if (!$.isNumeric(obj.startYear) ||
|
||||||
||!$.isNumeric(obj.year)
|
!$.isNumeric(obj.year) ||
|
||||||
||!$.isNumeric(obj.month)
|
!$.isNumeric(obj.month)
|
||||||
){
|
) {
|
||||||
var obj = $.Deferred();
|
var obj = $.Deferred();
|
||||||
obj.reject('fail');
|
obj.reject('fail');
|
||||||
return obj.promise();
|
return obj.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useCachedMap){
|
if (useCachedMap) {
|
||||||
localStorage.setItem(storedOldMapKey, JSON.stringify([serverID, obj]));
|
localStorage.setItem(storedOldMapKey, JSON.stringify([serverID, obj]));
|
||||||
localStorage.setItem(storedStartYear, JSON.stringify(obj.startYear));
|
localStorage.setItem(storedStartYear, JSON.stringify(obj.startYear));
|
||||||
}
|
}
|
||||||
@@ -82,26 +88,40 @@ function reloadWorldMap(option){
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMapBackground(obj){
|
|
||||||
|
|
||||||
|
function setMapBackground(obj) {
|
||||||
|
function setTheme() {
|
||||||
|
var oldTheme = $world_map.data('currentTheme');
|
||||||
|
var newTheme = obj.theme;
|
||||||
|
if (oldTheme === newTheme) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (oldTheme) {
|
||||||
|
$world_map.removeClass('map_theme_' + oldTheme);
|
||||||
|
}
|
||||||
|
$world_map.addClass('map_theme_' + newTheme);
|
||||||
|
$world_map.data('currentTheme', newTheme);
|
||||||
|
}
|
||||||
|
if (option.dynamicMapTheme) {
|
||||||
|
setTheme();
|
||||||
|
}
|
||||||
var startYear = obj.startYear;
|
var startYear = obj.startYear;
|
||||||
var year = obj.year;
|
var year = obj.year;
|
||||||
var month = obj.month;
|
var month = obj.month;
|
||||||
|
|
||||||
if(isDetailMap){
|
if (isDetailMap) {
|
||||||
$world_map.addClass('map_detail').removeClass('map_basic');
|
$world_map.addClass('map_detail').removeClass('map_basic');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$world_map.addClass('map_basic').removeClass('map_detail');
|
$world_map.addClass('map_basic').removeClass('map_detail');
|
||||||
}
|
}
|
||||||
|
|
||||||
var $map_title = $('.map_title_text');
|
var $map_title = $('.map_title_text');
|
||||||
if(year < startYear + 1){
|
if (year < startYear + 1) {
|
||||||
$map_title.css('color', 'magenta');
|
$map_title.css('color', 'magenta');
|
||||||
}
|
} else if (year < startYear + 2) {
|
||||||
else if(year < startYear + 2){
|
|
||||||
$map_title.css('color', 'orange');
|
$map_title.css('color', 'orange');
|
||||||
}
|
} else if (year < startYear + 3) {
|
||||||
else if(year < startYear + 3){
|
|
||||||
$map_title.css('color', 'yellow');
|
$map_title.css('color', 'yellow');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,17 +129,17 @@ function reloadWorldMap(option){
|
|||||||
$map_title_tooltip.empty();
|
$map_title_tooltip.empty();
|
||||||
|
|
||||||
var tooltipTexts = [];
|
var tooltipTexts = [];
|
||||||
if(year < startYear + 3){
|
if (year < startYear + 3) {
|
||||||
var startYearText = [];
|
var startYearText = [];
|
||||||
var remainYear = startYear + 3 - year;
|
var remainYear = startYear + 3 - year;
|
||||||
var remainMonth = 12 - month + 1;
|
var remainMonth = 12 - month + 1;
|
||||||
if(remainMonth > 0){
|
if (remainMonth > 0) {
|
||||||
remainYear -= 1;
|
remainYear -= 1;
|
||||||
}
|
}
|
||||||
if(remainYear){
|
if (remainYear) {
|
||||||
startYearText.push('{0}년'.format(remainYear));
|
startYearText.push('{0}년'.format(remainYear));
|
||||||
}
|
}
|
||||||
if(remainMonth){
|
if (remainMonth) {
|
||||||
startYearText.push('{0}개월'.format(remainMonth));
|
startYearText.push('{0}개월'.format(remainMonth));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,20 +149,17 @@ function reloadWorldMap(option){
|
|||||||
var currentTechLimit = Math.floor(Math.max(0, year - startYear) / 5) + 1;
|
var currentTechLimit = Math.floor(Math.max(0, year - startYear) / 5) + 1;
|
||||||
var nextTechLimitYear = currentTechLimit * 5 + startYear;
|
var nextTechLimitYear = currentTechLimit * 5 + startYear;
|
||||||
|
|
||||||
tooltipTexts.push('기술등급 제한 : {0}등급 ({1}년 해제)'.format(currentTechLimit, nextTechLimitYear, currentTechLimit+1));
|
tooltipTexts.push('기술등급 제한 : {0}등급 ({1}년 해제)'.format(currentTechLimit, nextTechLimitYear, currentTechLimit + 1));
|
||||||
$map_title_tooltip.html(tooltipTexts.join('<br>'));
|
$map_title_tooltip.html(tooltipTexts.join('<br>'));
|
||||||
|
|
||||||
$world_map.removeClass('map_string map_summer map_fall map_winter');
|
$world_map.removeClass('map_string map_summer map_fall map_winter');
|
||||||
if(month <= 3){
|
if (month <= 3) {
|
||||||
$world_map.addClass('map_spring');
|
$world_map.addClass('map_spring');
|
||||||
}
|
} else if (month <= 6) {
|
||||||
else if(month <= 6){
|
|
||||||
$world_map.addClass('map_summer');
|
$world_map.addClass('map_summer');
|
||||||
}
|
} else if (month <= 9) {
|
||||||
else if(month <= 9){
|
|
||||||
$world_map.addClass('map_fall');
|
$world_map.addClass('map_fall');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$world_map.addClass('map_winter');
|
$world_map.addClass('map_winter');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,26 +168,26 @@ function reloadWorldMap(option){
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertCityObjs(obj){
|
function convertCityObjs(obj) {
|
||||||
//원본 Obj는 굉장히 간소하게 온다, Object 형태로 변환해서 사용한다.
|
//원본 Obj는 굉장히 간소하게 온다, Object 형태로 변환해서 사용한다.
|
||||||
|
|
||||||
function toCityObj(arr){
|
function toCityObj(arr) {
|
||||||
return {
|
return {
|
||||||
id:arr[0],
|
id: arr[0],
|
||||||
level:arr[1],
|
level: arr[1],
|
||||||
state:arr[2],
|
state: arr[2],
|
||||||
nationId:(arr[3]>0)?arr[3]:null,
|
nationId: (arr[3] > 0) ? arr[3] : null,
|
||||||
region:arr[4],
|
region: arr[4],
|
||||||
supply:(arr[5]!=0)
|
supply: (arr[5] != 0)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function toNationObj(arr){
|
function toNationObj(arr) {
|
||||||
return {
|
return {
|
||||||
id:arr[0],
|
id: arr[0],
|
||||||
name:arr[1],
|
name: arr[1],
|
||||||
color:arr[2],
|
color: arr[2],
|
||||||
capital:arr[3]
|
capital: arr[3]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,15 +196,15 @@ function reloadWorldMap(option){
|
|||||||
nationList = convertDictById(nationList); //array of object -> dict
|
nationList = convertDictById(nationList); //array of object -> dict
|
||||||
|
|
||||||
var spyList = obj.spyList;
|
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;
|
||||||
var myNation = obj.myNation;
|
var myNation = obj.myNation;
|
||||||
|
|
||||||
|
|
||||||
function mergePositionInfo(city){
|
function mergePositionInfo(city) {
|
||||||
var id = city.id;
|
var id = city.id;
|
||||||
if(!(id in cityPosition)){
|
if (!(id in cityPosition)) {
|
||||||
return city;
|
return city;
|
||||||
}
|
}
|
||||||
var xy_val = cityPosition[id];
|
var xy_val = cityPosition[id];
|
||||||
@@ -197,11 +214,11 @@ function reloadWorldMap(option){
|
|||||||
return city;
|
return city;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mergeNationInfo(city){
|
function mergeNationInfo(city) {
|
||||||
//nationId 값으로 isCapital, color, nation을 통합
|
//nationId 값으로 isCapital, color, nation을 통합
|
||||||
|
|
||||||
var nationId = city.nationId;
|
var nationId = city.nationId;
|
||||||
if(nationId === null || !(nationId in nationList)){
|
if (nationId === null || !(nationId in nationList)) {
|
||||||
city.nationId = null;
|
city.nationId = null;
|
||||||
city.nation = null;
|
city.nation = null;
|
||||||
city.color = null;
|
city.color = null;
|
||||||
@@ -217,24 +234,24 @@ function reloadWorldMap(option){
|
|||||||
return city;
|
return city;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mergeClickable(city){
|
function mergeClickable(city) {
|
||||||
//clickable = (remainSpy << 3) | (ourCity << 2) | (shownByGeneral << 1) | clickableAll
|
//clickable = (defaultCity << 4 ) | (remainSpy << 3) | (ourCity << 2) | (shownByGeneral << 1) | clickableAll
|
||||||
var id = city.id;
|
var id = city.id;
|
||||||
var nationId = city.nationId;
|
var nationId = city.nationId;
|
||||||
var clickable = 0;
|
var clickable = 16;
|
||||||
if(id in spyList){
|
if (id in spyList) {
|
||||||
clickable |= spyList[id] << 3;
|
clickable |= spyList[id] << 3;
|
||||||
}
|
}
|
||||||
if(myNation !== null && nationId == myNation){
|
if (myNation !== null && nationId == myNation) {
|
||||||
clickable |= 4;
|
clickable |= 4;
|
||||||
}
|
}
|
||||||
if(shownByGeneralList.hasOwnProperty(id)){
|
if (shownByGeneralList.hasOwnProperty(id)) {
|
||||||
clickable |= 2;
|
clickable |= 2;
|
||||||
}
|
}
|
||||||
if(myCity !== null && id == myCity){
|
if (myCity !== null && id == myCity) {
|
||||||
clickable |= 2;
|
clickable |= 2;
|
||||||
}
|
}
|
||||||
if(clickableAll){
|
if (clickableAll) {
|
||||||
clickable |= 1;
|
clickable |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,35 +267,35 @@ function reloadWorldMap(option){
|
|||||||
.map(formatCityInfo);
|
.map(formatCityInfo);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'cityList' : cityList,
|
'cityList': cityList,
|
||||||
'myCity' : myCity
|
'myCity': myCity
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawDetailWorldMap(obj){
|
function drawDetailWorldMap(obj) {
|
||||||
|
|
||||||
var $map_body = $('.world_map .map_body');
|
var $map_body = $(drawTarget + ' .map_body');
|
||||||
|
|
||||||
var cityList = obj.cityList;
|
var cityList = obj.cityList;
|
||||||
var myCity = obj.myCity;
|
var myCity = obj.myCity;
|
||||||
|
|
||||||
cityList.forEach(function(city){
|
cityList.forEach(function(city) {
|
||||||
var id = city.id;
|
var id = city.id;
|
||||||
$('.city_base_{0}'.format(id)).detach();
|
$('.city_base_{0}'.format(id)).detach();
|
||||||
//이전 도시는 지운다.
|
//이전 도시는 지운다.
|
||||||
|
|
||||||
var $cityObj = $('<div class="city_base city_base_{0}"></div>'.format(id));
|
var $cityObj = $('<div class="city_base city_base_{0}"></div>'.format(id));
|
||||||
$cityObj.addClass('city_level_{0}'.format(city.level));
|
$cityObj.addClass('city_level_{0}'.format(city.level));
|
||||||
$cityObj.data('obj', city).css({'left':city.x-20,'top':city.y-15});
|
$cityObj.data('obj', city).css({ 'left': city.x - 20, 'top': city.y - 15 });
|
||||||
|
|
||||||
if('color' in city && city.color !== null){
|
if ('color' in city && city.color !== null) {
|
||||||
var $bgObj = $('<div class="city_bg"></div>');
|
var $bgObj = $('<div class="city_bg"></div>');
|
||||||
$cityObj.append($bgObj);
|
$cityObj.append($bgObj);
|
||||||
$bgObj.css({'background-image':'url({0}/b{1}.png)'.format(pathConfig.gameImage, convColorValue(city.color))});
|
$bgObj.css({ 'background-image': 'url({0}/b{1}.png)'.format(pathConfig.gameImage, convColorValue(city.color)) });
|
||||||
}
|
}
|
||||||
|
|
||||||
var $linkObj = $('<a class="city_link"></a>');
|
var $linkObj = $('<a class="city_link"></a>');
|
||||||
$linkObj.data({'text':city.text,'nation':city.nation,'id':city.id});
|
$linkObj.data({ 'text': city.text, 'nation': city.nation, 'id': city.id });
|
||||||
$cityObj.append($linkObj);
|
$cityObj.append($linkObj);
|
||||||
|
|
||||||
var $imgObj = $('<div class="city_img"><img src="{0}/cast_{1}.gif"><div class="city_filler"></div></div>'.format(pathConfig.gameImage, city.level));
|
var $imgObj = $('<div class="city_img"><img src="{0}/cast_{1}.gif"><div class="city_filler"></div></div>'.format(pathConfig.gameImage, city.level));
|
||||||
@@ -286,15 +303,15 @@ function reloadWorldMap(option){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(city.state > 0){
|
if (city.state > 0) {
|
||||||
var $stateObj = $('<div class="city_state"><img src="{0}/event{1}.gif"></div>'.format(pathConfig.gameImage, city.state));
|
var $stateObj = $('<div class="city_state"><img src="{0}/event{1}.gif"></div>'.format(pathConfig.gameImage, city.state));
|
||||||
$linkObj.append($stateObj);
|
$linkObj.append($stateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(city.nationId && city.nationId > 0){
|
if (city.nationId && city.nationId > 0) {
|
||||||
var flagType = city.supply?'f':'d';
|
var flagType = city.supply ? 'f' : 'd';
|
||||||
var $flagObj = $('<div class="city_flag"><img src="{0}/{1}{2}.gif"></div>'.format(pathConfig.gameImage, flagType, convColorValue(city.color)));
|
var $flagObj = $('<div class="city_flag"><img src="{0}/{1}{2}.gif"></div>'.format(pathConfig.gameImage, flagType, convColorValue(city.color)));
|
||||||
if(city.isCapital){
|
if (city.isCapital) {
|
||||||
var $capitalObj = $('<div class="city_capital"><img src="{0}/event51.gif"></div>'.format(pathConfig.gameImage));
|
var $capitalObj = $('<div class="city_capital"><img src="{0}/event51.gif"></div>'.format(pathConfig.gameImage));
|
||||||
$flagObj.append($capitalObj);
|
$flagObj.append($capitalObj);
|
||||||
}
|
}
|
||||||
@@ -315,41 +332,39 @@ function reloadWorldMap(option){
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawBasicWorldMap(obj){
|
function drawBasicWorldMap(obj) {
|
||||||
|
|
||||||
var $map_body = $('.world_map .map_body');
|
var $map_body = $(drawTarget + ' .map_body');
|
||||||
|
|
||||||
var cityList = obj.cityList;
|
var cityList = obj.cityList;
|
||||||
var myCity = obj.myCity;
|
var myCity = obj.myCity;
|
||||||
|
|
||||||
cityList.forEach(function(city){
|
cityList.forEach(function(city) {
|
||||||
var id = city.id;
|
var id = city.id;
|
||||||
$('.city_base_{0}'.format(id)).detach();
|
$('.city_base_{0}'.format(id)).detach();
|
||||||
//이전 도시는 지운다.
|
//이전 도시는 지운다.
|
||||||
|
|
||||||
var $cityObj = $('<div class="city_base city_base_{0}"></div>'.format(id));
|
var $cityObj = $('<div class="city_base city_base_{0}"></div>'.format(id));
|
||||||
$cityObj.addClass('city_level_{0}'.format(city.level));
|
$cityObj.addClass('city_level_{0}'.format(city.level));
|
||||||
$cityObj.data('obj', city).css({'left':city.x-20,'top':city.y-15});
|
$cityObj.data('obj', city).css({ 'left': city.x - 20, 'top': city.y - 15 });
|
||||||
|
|
||||||
var $linkObj = $('<a class="city_link"></a>');
|
var $linkObj = $('<a class="city_link"></a>');
|
||||||
$linkObj.data({'text':city.text,'nation':city.nation,'id':city.id});
|
$linkObj.data({ 'text': city.text, 'nation': city.nation, 'id': city.id });
|
||||||
$cityObj.append($linkObj);
|
$cityObj.append($linkObj);
|
||||||
|
|
||||||
var $imgObj = $('<div class="city_img"><div class="city_filler"></div></div>');
|
var $imgObj = $('<div class="city_img"><div class="city_filler"></div></div>');
|
||||||
if('color' in city && city.color !== null){
|
if ('color' in city && city.color !== null) {
|
||||||
$imgObj.css({'background-color':city.color});
|
$imgObj.css({ 'background-color': city.color });
|
||||||
}
|
}
|
||||||
$linkObj.append($imgObj);
|
$linkObj.append($imgObj);
|
||||||
|
|
||||||
if(city.state > 0){
|
if (city.state > 0) {
|
||||||
var state_text = 'wrong';
|
var state_text = 'wrong';
|
||||||
if(city.state < 10){
|
if (city.state < 10) {
|
||||||
state_text = 'good';
|
state_text = 'good';
|
||||||
}
|
} else if (city.state < 40) {
|
||||||
else if(city.state < 40){
|
|
||||||
state_text = 'bad';
|
state_text = 'bad';
|
||||||
}
|
} else if (city.state < 50) {
|
||||||
else if(city.state < 50){
|
|
||||||
state_text = 'war';
|
state_text = 'war';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +373,7 @@ function reloadWorldMap(option){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//단순 표기에서는 깃발 여부가 없음
|
//단순 표기에서는 깃발 여부가 없음
|
||||||
if(city.isCapital){
|
if (city.isCapital) {
|
||||||
var $capitalObj = $('<div class="city_capital"></div>');
|
var $capitalObj = $('<div class="city_capital"></div>');
|
||||||
$imgObj.append($capitalObj);
|
$imgObj.append($capitalObj);
|
||||||
}
|
}
|
||||||
@@ -374,32 +389,30 @@ function reloadWorldMap(option){
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMouseWork(obj){
|
function setMouseWork(obj) {
|
||||||
var $tooltip = $('.world_map .city_tooltip');
|
var $tooltip = $(drawTarget + ' .city_tooltip');
|
||||||
var $tooltip_city = $tooltip.find('.city_name');
|
var $tooltip_city = $tooltip.find('.city_name');
|
||||||
var $tooltip_nation = $tooltip.find('.nation_name');
|
var $tooltip_nation = $tooltip.find('.nation_name');
|
||||||
|
|
||||||
var $objs = $('.world_map .city_link');
|
var $objs = $(drawTarget + ' .city_link');
|
||||||
|
|
||||||
var $map_body = $('.world_map .map_body');
|
var $map_body = $(drawTarget + ' .map_body');
|
||||||
|
|
||||||
//터치스크린 탭
|
//터치스크린 탭
|
||||||
|
|
||||||
if(!option.neutralView && is_touch_device()){
|
if (!option.neutralView && is_touch_device()) {
|
||||||
$objs.on('touchstart', function(e){
|
$objs.on('touchstart', function(e) {
|
||||||
if(window.sam_toggleSingleTap){
|
if (window.sam_toggleSingleTap) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
var touchMode = $this.data('touchMode');
|
var touchMode = $this.data('touchMode');
|
||||||
if($tooltip_city.data('target') != $this.data('id')){
|
if ($tooltip_city.data('target') != $this.data('id')) {
|
||||||
$this.data('touchMode', 1);
|
$this.data('touchMode', 1);
|
||||||
}
|
} else if (touchMode === undefined) {
|
||||||
else if(touchMode === undefined){
|
|
||||||
$this.data('touchMode', 1);
|
$this.data('touchMode', 1);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$this.data('touchMode', touchMode + 1);
|
$this.data('touchMode', touchMode + 1);
|
||||||
}
|
}
|
||||||
$map_body.data('touchMode', 1);
|
$map_body.data('touchMode', 1);
|
||||||
@@ -409,8 +422,8 @@ function reloadWorldMap(option){
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$objs.on('touchend', function(e){
|
$objs.on('touchend', function(e) {
|
||||||
if(window.sam_toggleSingleTap){
|
if (window.sam_toggleSingleTap) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
@@ -418,17 +431,25 @@ function reloadWorldMap(option){
|
|||||||
$tooltip_city.html($this.data('text'));
|
$tooltip_city.html($this.data('text'));
|
||||||
|
|
||||||
var nation_text = $this.data('nation');
|
var nation_text = $this.data('nation');
|
||||||
if(nation_text){
|
if (nation_text) {
|
||||||
$tooltip_nation.html(nation_text).show();
|
$tooltip_nation.html(nation_text).show();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$tooltip_nation.html('').hide();
|
$tooltip_nation.html('').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$tooltip.css({'top': position.top + 25, 'left': position.left + 35}).show();
|
var left = position.left;
|
||||||
|
var top = position.top;
|
||||||
|
|
||||||
|
var scale = $map_body.data('scale');
|
||||||
|
if (scale) {
|
||||||
|
left /= scale;
|
||||||
|
top /= scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tooltip.css({ 'top': top + 25, 'left': left + 35 }).show();
|
||||||
|
|
||||||
var touchMode = $this.data('touchMode');
|
var touchMode = $this.data('touchMode');
|
||||||
if(touchMode <= 1){
|
if (touchMode <= 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -436,8 +457,8 @@ function reloadWorldMap(option){
|
|||||||
$this.data('touchMode', 0);
|
$this.data('touchMode', 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
$map_body.on('touchend',function(e){
|
$map_body.on('touchend', function(e) {
|
||||||
if(window.sam_toggleSingleTap){
|
if (window.sam_toggleSingleTap) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//위의 touchend bind에 해당하지 않는 경우 -> 빈 지도 터치
|
//위의 touchend bind에 해당하지 않는 경우 -> 빈 지도 터치
|
||||||
@@ -448,20 +469,26 @@ function reloadWorldMap(option){
|
|||||||
|
|
||||||
//Mouse over 모드 작동
|
//Mouse over 모드 작동
|
||||||
|
|
||||||
$map_body.on('mousemove', function(e){
|
$map_body.on('mousemove', function(e) {
|
||||||
if($(this).data('touchMode')){
|
if ($(this).data('touchMode')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parentOffset = $map_body.offset();
|
var rect = this.getBoundingClientRect();
|
||||||
var relX = e.pageX - parentOffset.left;
|
var left = (e.clientX - rect.left - this.clientLeft + this.scrollLeft);
|
||||||
var relY = e.pageY - parentOffset.top;
|
var top = (e.clientY - rect.top - this.clientTop + this.scrollTop);
|
||||||
|
|
||||||
$tooltip.css({'top': relY + 10, 'left': relX + 10});
|
var scale = $map_body.data('scale');
|
||||||
|
if (scale) {
|
||||||
|
left /= scale;
|
||||||
|
top /= scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tooltip.css({ 'top': top + 10, 'left': left + 10 });
|
||||||
});
|
});
|
||||||
|
|
||||||
$objs.on('mouseenter', function(e){
|
$objs.on('mouseenter', function(e) {
|
||||||
if($map_body.data('touchMode')){
|
if ($map_body.data('touchMode')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,28 +497,27 @@ function reloadWorldMap(option){
|
|||||||
$tooltip_city.data('target', $this.data('id'));
|
$tooltip_city.data('target', $this.data('id'));
|
||||||
$tooltip_city.html($this.data('text'));
|
$tooltip_city.html($this.data('text'));
|
||||||
var nation_text = $this.data('nation');
|
var nation_text = $this.data('nation');
|
||||||
if(nation_text){
|
if (nation_text) {
|
||||||
$tooltip_nation.html(nation_text).show();
|
$tooltip_nation.html(nation_text).show();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$tooltip_nation.html('').hide();
|
$tooltip_nation.html('').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$tooltip.show();
|
$tooltip.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$objs.on('mouseleave', function(event){
|
$objs.on('mouseleave', function(event) {
|
||||||
$tooltip.hide();
|
$tooltip.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$objs.on('click', function(e){
|
$objs.on('click', function(e) {
|
||||||
//xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다.
|
//xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다.
|
||||||
var touchMode = $(this).data('touchMode');
|
var touchMode = $(this).data('touchMode');
|
||||||
if(touchMode === undefined){
|
if (touchMode === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(touchMode === 1){
|
if (touchMode === 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -500,17 +526,17 @@ function reloadWorldMap(option){
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCityClickable(obj){
|
function setCityClickable(obj) {
|
||||||
|
|
||||||
obj.cityList.forEach(function(city){
|
obj.cityList.forEach(function(city) {
|
||||||
var $cityLink = $world_map.find('.city_base_{0} .city_link'.format(city.id));
|
var $cityLink = $world_map.find('.city_base_{0} .city_link'.format(city.id));
|
||||||
|
|
||||||
if('clickable' in city && city.clickable > 0){
|
if ('clickable' in city && city.clickable > 0) {
|
||||||
$cityLink.attr('href',hrefTemplate.format(city.id));
|
$cityLink.attr('href', hrefTemplate.format(city.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectCallback){
|
if (selectCallback) {
|
||||||
$cityLink.click(function(){
|
$cityLink.click(function() {
|
||||||
return selectCallback(city);
|
return selectCallback(city);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -519,127 +545,133 @@ function reloadWorldMap(option){
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveCityInfo(obj){
|
function saveCityInfo(obj) {
|
||||||
$world_map.data('cityInfo', obj);
|
$world_map.data('cityInfo', obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $hideCityNameBtn = $world_map.find('.map_toggle_cityname');
|
var $hideCityNameBtn = $world_map.find('.map_toggle_cityname');
|
||||||
if(localStorage.getItem('sam.hideMapCityName') == 'yes'){
|
if (localStorage.getItem('sam.hideMapCityName') == 'yes') {
|
||||||
$world_map.addClass('hide_cityname');
|
$world_map.addClass('hide_cityname');
|
||||||
$hideCityNameBtn.addClass('active').attr('aria-pressed', 'true');
|
$hideCityNameBtn.addClass('active').attr('aria-pressed', 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hideCityNameBtn.click(function(){
|
$hideCityNameBtn.click(function() {
|
||||||
//이전 상태 확인
|
//이전 상태 확인
|
||||||
var state = !$hideCityNameBtn.hasClass('active');
|
var state = !$hideCityNameBtn.hasClass('active');
|
||||||
if(state){
|
if (state) {
|
||||||
$world_map.addClass('hide_cityname');
|
$world_map.addClass('hide_cityname');
|
||||||
localStorage.setItem('sam.hideMapCityName', 'yes');
|
localStorage.setItem('sam.hideMapCityName', 'yes');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$world_map.removeClass('hide_cityname');
|
$world_map.removeClass('hide_cityname');
|
||||||
localStorage.setItem('sam.hideMapCityName', 'no');
|
localStorage.setItem('sam.hideMapCityName', 'no');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var $toggleSingleTapBtn = $world_map.find('.map_toggle_single_tap');
|
var $toggleSingleTapBtn = $world_map.find('.map_toggle_single_tap');
|
||||||
if(localStorage.getItem('sam.toggleSingleTap') == 'yes'){
|
if (localStorage.getItem('sam.toggleSingleTap') == 'yes') {
|
||||||
window.sam_toggleSingleTap = true;
|
window.sam_toggleSingleTap = true;
|
||||||
$toggleSingleTapBtn.addClass('active').attr('aria-pressed', 'true');
|
$toggleSingleTapBtn.addClass('active').attr('aria-pressed', 'true');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
window.sam_toggleSingleTap = false;
|
window.sam_toggleSingleTap = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $map_body = $('.world_map .map_body');
|
var $map_body = $(drawTarget + ' .map_body');
|
||||||
|
|
||||||
$toggleSingleTapBtn.click(function(){
|
$toggleSingleTapBtn.click(function() {
|
||||||
//이전 상태 확인
|
//이전 상태 확인
|
||||||
var state = !$toggleSingleTapBtn.hasClass('active');
|
var state = !$toggleSingleTapBtn.hasClass('active');
|
||||||
if(state){
|
if (state) {
|
||||||
$map_body.removeData('touchMode');
|
$map_body.removeData('touchMode');
|
||||||
localStorage.setItem('sam.toggleSingleTap', 'yes');
|
localStorage.setItem('sam.toggleSingleTap', 'yes');
|
||||||
window.sam_toggleSingleTap = true;
|
window.sam_toggleSingleTap = true;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
localStorage.setItem('sam.toggleSingleTap', 'no');
|
localStorage.setItem('sam.toggleSingleTap', 'no');
|
||||||
window.sam_toggleSingleTap = false;
|
window.sam_toggleSingleTap = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(isDetailMap){
|
if (isDetailMap) {
|
||||||
$world_map.addClass('map_detail');
|
$world_map.addClass('map_detail');
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$world_map.removeClass('map_datail');
|
$world_map.removeClass('map_datail');
|
||||||
}
|
}
|
||||||
|
|
||||||
//deferred mode of jQuery. != promise-then.
|
//deferred mode of jQuery. != promise-then.
|
||||||
var deferred = $.ajax({
|
var deferred = $.ajax({
|
||||||
url: option.targetJson,
|
url: option.targetJson,
|
||||||
type: 'post',
|
type: option.reqType,
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
|
ifModified: true,
|
||||||
data: {
|
data: {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
neutralView:option.neutralView,
|
neutralView: option.neutralView,
|
||||||
year:option.year,
|
year: option.year,
|
||||||
month:option.month,
|
month: option.month,
|
||||||
showMe:option.showMe,
|
showMe: option.showMe,
|
||||||
aux:option.aux
|
aux: option.aux
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var rawObject = null;
|
||||||
|
|
||||||
deferred
|
deferred
|
||||||
|
.then(function(data) {
|
||||||
|
rawObject = data;
|
||||||
|
return data;
|
||||||
|
})
|
||||||
.then(checkReturnObject)
|
.then(checkReturnObject)
|
||||||
.then(setMapBackground)
|
.then(setMapBackground)
|
||||||
.then(convertCityObjs)
|
.then(convertCityObjs)
|
||||||
.then(isDetailMap?drawDetailWorldMap:drawBasicWorldMap)
|
.then(isDetailMap ? drawDetailWorldMap : drawBasicWorldMap)
|
||||||
.then(setMouseWork)
|
.then(setMouseWork)
|
||||||
.then(setCityClickable)
|
.then(setCityClickable)
|
||||||
.then(saveCityInfo);
|
.then(saveCityInfo)
|
||||||
|
.then(function(data) {
|
||||||
|
if (option.callback) {
|
||||||
|
option.callback(data, rawObject);
|
||||||
|
}
|
||||||
|
|
||||||
if($world_map.hasClass('draw_required')){
|
});
|
||||||
if(useCachedMap){
|
|
||||||
|
if ($world_map.hasClass('draw_required')) {
|
||||||
|
if (useCachedMap) {
|
||||||
//일단 불러옴
|
//일단 불러옴
|
||||||
do{
|
do {
|
||||||
var storedMap = localStorage.getItem(storedOldMapKey);
|
var storedMap = localStorage.getItem(storedOldMapKey);
|
||||||
if(!storedMap){
|
if (!storedMap) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
storedMap = JSON.parse(storedMap);
|
storedMap = JSON.parse(storedMap);
|
||||||
var storedServerID = storedMap[0];
|
var storedServerID = storedMap[0];
|
||||||
if(storedServerID != serverID){
|
if (storedServerID != serverID) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
storedMap = storedMap[1];
|
storedMap = storedMap[1];
|
||||||
storedMap = setMapBackground(storedMap);
|
storedMap = setMapBackground(storedMap);
|
||||||
storedMap = convertCityObjs(storedMap);
|
storedMap = convertCityObjs(storedMap);
|
||||||
if(isDetailMap){
|
if (isDetailMap) {
|
||||||
storedMap = drawDetailWorldMap(storedMap);
|
storedMap = drawDetailWorldMap(storedMap);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
storedMap = drawBasicWorldMap(storedMap);
|
storedMap = drawBasicWorldMap(storedMap);
|
||||||
}
|
}
|
||||||
storedMap = setMouseWork(storedMap);
|
storedMap = setMouseWork(storedMap);
|
||||||
storedMap = setCityClickable(storedMap);
|
storedMap = setCityClickable(storedMap);
|
||||||
storedMap = saveCityInfo(storedMap);
|
storedMap = saveCityInfo(storedMap);
|
||||||
}while(false);
|
} while (false);
|
||||||
}
|
} else if (option.year && option.month) {
|
||||||
else if(option.year && option.month){
|
|
||||||
var startYear = localStorage.getItem(storedStartYear);
|
var startYear = localStorage.getItem(storedStartYear);
|
||||||
if(startYear){
|
if (startYear) {
|
||||||
startYear = JSON.parse(startYear);
|
startYear = JSON.parse(startYear);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
startYear = option.year;
|
startYear = option.year;
|
||||||
}
|
}
|
||||||
var tmp = {
|
var tmp = {
|
||||||
year : option.year,
|
year: option.year,
|
||||||
month : option.month,
|
month: option.month,
|
||||||
startYear : startYear
|
startYear: startYear
|
||||||
};
|
};
|
||||||
setMapBackground(tmp);
|
setMapBackground(tmp);
|
||||||
}
|
}
|
||||||
@@ -647,8 +679,8 @@ function reloadWorldMap(option){
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(function(){
|
$(function() {
|
||||||
if(is_touch_device()){
|
if (is_touch_device()) {
|
||||||
$('.map_body .map_toggle_single_tap').show();
|
$('.map_body .map_toggle_single_tap').show();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
+88
-87
@@ -1,166 +1,167 @@
|
|||||||
jQuery(function($){
|
jQuery(function($) {
|
||||||
|
|
||||||
|
|
||||||
var initCustomCSSForm = function(){
|
var initCustomCSSForm = function() {
|
||||||
var lastTimeOut = null;
|
var lastTimeOut = null;
|
||||||
var $obj = $('#custom_css');
|
var $obj = $('#custom_css');
|
||||||
var key = 'sam_customCSS';
|
var key = 'sam_customCSS';
|
||||||
|
|
||||||
var text = localStorage.getItem(key);
|
var text = localStorage.getItem(key);
|
||||||
if(text){
|
if (text) {
|
||||||
$obj.val(text);
|
$obj.val(text);
|
||||||
console.log(text);
|
console.log(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($obj.on('change keyup paste', function(){
|
if ($obj.on('change keyup paste', function() {
|
||||||
var newText = $obj.val();
|
var newText = $obj.val();
|
||||||
if(text == newText){
|
if (text == newText) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(lastTimeOut){
|
if (lastTimeOut) {
|
||||||
clearTimeout(lastTimeOut);
|
clearTimeout(lastTimeOut);
|
||||||
}
|
}
|
||||||
$obj.css('background-color', '#222222');
|
$obj.css('background-color', '#222222');
|
||||||
lastTimeOut = setTimeout(function(){
|
lastTimeOut = setTimeout(function() {
|
||||||
text = $obj.val();
|
text = $obj.val();
|
||||||
localStorage.setItem(key, text);
|
localStorage.setItem(key, text);
|
||||||
$obj.css('background-color', 'black');
|
$obj.css('background-color', 'black');
|
||||||
}, 500);
|
}, 500);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.load_old_log').click(function(){
|
$('.load_old_log').click(function() {
|
||||||
var $thisBtn = $(this);
|
var $thisBtn = $(this);
|
||||||
var logType = $thisBtn.data('log_type');
|
var logType = $thisBtn.data('log_type');
|
||||||
var $last = $('.log_{0}:last'.format(logType));
|
var $last = $('.log_{0}:last'.format(logType));
|
||||||
var reqTo = null;
|
var reqTo = null;
|
||||||
if($last.length){
|
if ($last.length) {
|
||||||
reqTo = $last.data('seq');
|
reqTo = $last.data('seq');
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_general_log_old.php',
|
url: 'j_general_log_old.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
to:reqTo,
|
to: reqTo,
|
||||||
type:logType
|
type: logType
|
||||||
}
|
}
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
return quickReject('로그를 받아오지 못했습니다.');
|
return quickReject('로그를 받아오지 못했습니다.');
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
return quickReject('로그를 받아오지 못했습니다. : '+data.reason);
|
return quickReject('로그를 받아오지 못했습니다. : ' + data.reason);
|
||||||
}
|
|
||||||
|
|
||||||
var keys = Object.keys(data.log);
|
|
||||||
if(keys.length > 1 && keys[0] < keys[1]){
|
|
||||||
keys.reverse();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(keys == 0){
|
|
||||||
$thisBtn.hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var html = [];
|
|
||||||
$.each(keys, function(_, key){
|
|
||||||
if($('#log_{0}_{1}'.format(logType, key)).length){
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
var item = data.log[key];
|
|
||||||
html.push("<div class='log_{0}' id='log_{0}_{1}' data-seq='{1}'>{2}</div>".format(logType, key, item));
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#{0}Plate'.format(logType)).append(html);
|
var keys = Object.keys(data.log);
|
||||||
}, errUnknown)
|
if (keys.length > 1 && keys[0] < keys[1]) {
|
||||||
.fail(function(reason){
|
keys.reverse();
|
||||||
alert(reason);
|
}
|
||||||
location.reload();
|
|
||||||
});
|
if (keys == 0) {
|
||||||
|
$thisBtn.hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var html = [];
|
||||||
|
$.each(keys, function(_, key) {
|
||||||
|
if ($('#log_{0}_{1}'.format(logType, key)).length) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var item = data.log[key];
|
||||||
|
html.push("<div class='log_{0}' id='log_{0}_{1}' data-seq='{1}'>{2}</div>".format(logType, key, item));
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#{0}Plate'.format(logType)).append(html);
|
||||||
|
}, errUnknown)
|
||||||
|
.fail(function(reason) {
|
||||||
|
alert(reason);
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
initCustomCSSForm();
|
initCustomCSSForm();
|
||||||
|
|
||||||
|
|
||||||
$('#die_immediately').click(function(){
|
$('#die_immediately').click(function() {
|
||||||
if(!confirm('정말로 삭제하시겠습니까?')){
|
if (!confirm('정말로 삭제하시겠습니까?')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_die_immediately.php',
|
url: 'j_die_immediately.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
return quickReject('실패했습니다.');
|
return quickReject('실패했습니다.');
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
return quickReject(data.reason);
|
return quickReject(data.reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
location.replace('..');
|
location.replace('..');
|
||||||
|
|
||||||
}, errUnknown)
|
}, errUnknown)
|
||||||
.fail(function(reason){
|
.fail(function(reason) {
|
||||||
alert(reason);
|
alert(reason);
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#vacation').click(function(){
|
$('#vacation').click(function() {
|
||||||
if(!confirm('휴가 기능을 신청할까요?')){
|
if (!confirm('휴가 기능을 신청할까요?')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_vacation.php',
|
url: 'j_vacation.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
return quickReject('실패했습니다.');
|
return quickReject('실패했습니다.');
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
return quickReject(data.reason);
|
return quickReject(data.reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
||||||
}, errUnknown)
|
}, errUnknown)
|
||||||
.fail(function(reason){
|
.fail(function(reason) {
|
||||||
alert(reason);
|
alert(reason);
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#set_my_setting').click(function(){
|
$('#set_my_setting').click(function() {
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_set_my_setting.php',
|
url: 'j_set_my_setting.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
tnmt:$('.tnmt:checked').val(),
|
tnmt: $('.tnmt:checked').val(),
|
||||||
defence_train:$('#defence_train').val(),
|
defence_train: $('#defence_train').val(),
|
||||||
use_treatment:$('#use_treatment').val(),
|
use_treatment: $('#use_treatment').val(),
|
||||||
|
use_auto_nation_turn: $('#use_auto_nation_turn').val(),
|
||||||
}
|
}
|
||||||
}).then(function(data){
|
}).then(function(data) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
return quickReject('실패했습니다.');
|
return quickReject('실패했습니다.');
|
||||||
}
|
}
|
||||||
if(!data.result){
|
if (!data.result) {
|
||||||
return quickReject(data.reason);
|
return quickReject(data.reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
||||||
}, errUnknown)
|
}, errUnknown)
|
||||||
.fail(function(reason){
|
.fail(function(reason) {
|
||||||
alert(reason);
|
alert(reason);
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -35,7 +35,7 @@ jQuery(function($) {
|
|||||||
//checkCommandArg 참고
|
//checkCommandArg 참고
|
||||||
var availableArgumentList = {
|
var availableArgumentList = {
|
||||||
'string': [
|
'string': [
|
||||||
'nationName', 'optionText', 'itemType', 'nationType', 'itemCode',
|
'nationName', 'optionText', 'itemType', 'nationType', 'itemCode', 'commandType',
|
||||||
],
|
],
|
||||||
'int': [
|
'int': [
|
||||||
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
|
'crewType', 'destGeneralID', 'destCityID', 'destNationID',
|
||||||
@@ -73,9 +73,11 @@ jQuery(function($) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'integerArray': function($obj) {
|
'integerArray': function($obj) {
|
||||||
return $obj.map(function() {
|
var result = [];
|
||||||
return parseInt($(this).val());
|
$obj.each(function() {
|
||||||
|
result.push(parseInt($(this).val()));
|
||||||
});
|
});
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,210 @@
|
|||||||
|
var templateGeneralCard = '<div class="general_card">\
|
||||||
|
<h4 class="bg1 with_border"><%generalName%></h4>\
|
||||||
|
<h4><img src="<%iconPath%>" height=64 width=64></h4><p>\
|
||||||
|
<%if(leadership){%>\
|
||||||
|
<%leadership%> / <%strength%> / <%intel%><br>\
|
||||||
|
<%}%>\
|
||||||
|
<%if(personalText){%><%personalText%><br><%}%>\
|
||||||
|
<%if(specialDomesticText||specialWarText){%>\
|
||||||
|
<%specialDomesticText%> / <%specialWarText%><br>\
|
||||||
|
<%}%>\
|
||||||
|
<%if(dex){%><br>\
|
||||||
|
보병: <%parseInt(dex[0]/1000)%>K<br>\
|
||||||
|
궁병: <%parseInt(dex[1]/1000)%>K<br>\
|
||||||
|
기병: <%parseInt(dex[2]/1000)%>K<br>\
|
||||||
|
귀병: <%parseInt(dex[3]/1000)%>K<br>\
|
||||||
|
차병: <%parseInt(dex[4]/1000)%>K<br>\
|
||||||
|
<%}%>\
|
||||||
|
</p>\
|
||||||
|
<button type="subject" class="with_skin with_border select_btn" data-name="<%generalName%>" value="<%uniqueName%>" name="pick">선택하기</button>\
|
||||||
|
</div>';
|
||||||
|
|
||||||
|
var templateSpecial =
|
||||||
|
'<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><%text%>\
|
||||||
|
<span class="tooltiptext">\
|
||||||
|
<%info%>\
|
||||||
|
</span>\
|
||||||
|
</span>\
|
||||||
|
';
|
||||||
|
|
||||||
|
function pickGeneral() {
|
||||||
|
$btn = $(this);
|
||||||
|
|
||||||
|
|
||||||
|
if (hasGeneralID) {
|
||||||
|
if (!confirm('이 장수를 선택할까요? : {0}'.format($btn.data('name')))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.post({
|
||||||
|
url: 'j_update_picked_general.php',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
pick: $btn.val()
|
||||||
|
}
|
||||||
|
}).then(function(result) {
|
||||||
|
if (!result.result) {
|
||||||
|
alert(result.reason);
|
||||||
|
location.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
alert('선택한 장수로 변경했습니다.');
|
||||||
|
location.href = './';
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentGeneralInfo = cards[$btn.val()];
|
||||||
|
var $card = $btn.closest('.general_card');
|
||||||
|
|
||||||
|
var $leftPad = $('#left_pad');
|
||||||
|
$leftPad.empty();
|
||||||
|
$card.clone().appendTo($leftPad);
|
||||||
|
initTooltip($leftPad);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildGeneral() {
|
||||||
|
if (!currentGeneralInfo) {
|
||||||
|
alert('장수를 선택해주세요!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!confirm('이 장수로 생성할까요?')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.post({
|
||||||
|
url: 'j_select_picked_general.php',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
pick: currentGeneralInfo.uniqueName,
|
||||||
|
use_own_picture: $('#use_own_picture').is(':checked'),
|
||||||
|
leadership: parseInt($('#leadership').val()),
|
||||||
|
strength: parseInt($('#leadership').val()),
|
||||||
|
intel: parseInt($('#leadership').val()),
|
||||||
|
personal: $('#selChar').val()
|
||||||
|
}
|
||||||
|
}).then(function(result) {
|
||||||
|
if (!result.result) {
|
||||||
|
alert(result.reason);
|
||||||
|
location.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
alert('선택한 장수로 생성했습니다.');
|
||||||
|
location.href = './';
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateOutdateTimer() {
|
||||||
|
var $validUntilText = $('#valid_until_text');
|
||||||
|
var now = Date.now();
|
||||||
|
var validUntil = $validUntilText.data('until');
|
||||||
|
if (validUntil <= 0) {
|
||||||
|
return;
|
||||||
|
} else if (validUntil < now) {
|
||||||
|
$validUntilText.data('until', 0);
|
||||||
|
$('#valid_until').hide();
|
||||||
|
$('#outdate_token').show();
|
||||||
|
return;
|
||||||
|
} else if (validUntil - now <= 30000) {
|
||||||
|
$validUntilText.css('color', "rgb(255, {0}, {0})".format(255 * (validUntil - now) / 30000));
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(updateOutdateTimer, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printGenerals(value) {
|
||||||
|
$('.card_holder').empty();
|
||||||
|
$('#valid_until').show();
|
||||||
|
$('#valid_until_text').html(value.validUntil).data('until', (new Date(value.validUntil)).getTime()).css('color', 'white');
|
||||||
|
$('#outdate_token').hide();
|
||||||
|
|
||||||
|
var pick = $.map(value.pick, function(value, key) {
|
||||||
|
return value;
|
||||||
|
});
|
||||||
|
|
||||||
|
var emptyCard = {
|
||||||
|
'leadership': null,
|
||||||
|
'strength': null,
|
||||||
|
'intel': null,
|
||||||
|
'personalText': null,
|
||||||
|
'specialDomesticText': null,
|
||||||
|
'specialWarText': null,
|
||||||
|
'dex': null
|
||||||
|
};
|
||||||
|
|
||||||
|
$.each(pick, function(idx, cardData) {
|
||||||
|
cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture);
|
||||||
|
if (cardData.specialDomestic !== undefined) {
|
||||||
|
cardData.specialDomesticText = TemplateEngine(templateSpecial, {
|
||||||
|
text: cardData.specialDomesticName,
|
||||||
|
info: cardData.specialDomesticInfo
|
||||||
|
});
|
||||||
|
cardData.specialWarText = '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cardData.specialWar !== undefined) {
|
||||||
|
cardData.specialWarText = TemplateEngine(templateSpecial, {
|
||||||
|
text: cardData.specialWarName,
|
||||||
|
info: cardData.specialWarInfo
|
||||||
|
});
|
||||||
|
if (cardData.specialDomesticText === undefined) {
|
||||||
|
cardData.specialDomesticText = '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//FIXME: ego로 적었던것 같음!
|
||||||
|
if (cardData.personal in characterInfo) {
|
||||||
|
cardData.personalText = TemplateEngine(templateSpecial, {
|
||||||
|
text: characterInfo[cardData.personal].name,
|
||||||
|
info: characterInfo[cardData.personal].info
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
cardData.personalText = cardData.personal;
|
||||||
|
}
|
||||||
|
|
||||||
|
cards[cardData.uniqueName] = cardData;
|
||||||
|
|
||||||
|
var $card = $(TemplateEngine(templateGeneralCard, $.extend({}, emptyCard, cardData)));
|
||||||
|
|
||||||
|
$('.card_holder').append($card);
|
||||||
|
$card.find('.select_btn').click(pickGeneral);
|
||||||
|
$card.find('.obj_tooltip').tooltip({
|
||||||
|
title: function() {
|
||||||
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
|
},
|
||||||
|
html: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
updateOutdateTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$(function($) {
|
||||||
|
$.post('j_get_select_pool.php').then(function(value) {
|
||||||
|
if (!value.result) {
|
||||||
|
alert(value.reason);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(value);
|
||||||
|
printGenerals(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (hasGeneralID) {
|
||||||
|
$('#create_plate').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#build_general').on('click', buildGeneral);
|
||||||
|
|
||||||
|
$.each(validCustomOption, function(idx, value) {
|
||||||
|
if (value == 'picture') {
|
||||||
|
$('.custom_picture').show();
|
||||||
|
} else if (value == 'ego') {
|
||||||
|
$('.custom_personality').show();
|
||||||
|
} else if (value == 'stat') {
|
||||||
|
$('.custom_stat').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
+138
-145
@@ -1,5 +1,5 @@
|
|||||||
var templateGeneralCard =
|
var templateGeneralCard =
|
||||||
'<div class="general_card">\
|
'<div class="general_card">\
|
||||||
<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><%leadership%> / <%strength%> / <%intel%><br>\
|
<p><%leadership%> / <%strength%> / <%intel%><br>\
|
||||||
@@ -11,7 +11,7 @@ var templateGeneralCard =
|
|||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
var templateSpecial =
|
var templateSpecial =
|
||||||
'<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><%text%>\
|
'<span class="obj_tooltip" data-toggle="tooltip" data-placement="top"><%text%>\
|
||||||
<span class="tooltiptext">\
|
<span class="tooltiptext">\
|
||||||
<%info%>\
|
<%info%>\
|
||||||
</span>\
|
</span>\
|
||||||
@@ -19,7 +19,7 @@ var templateSpecial =
|
|||||||
';
|
';
|
||||||
|
|
||||||
var templateGeneralRow =
|
var templateGeneralRow =
|
||||||
'<tr>\
|
'<tr>\
|
||||||
<td><img class="generalIcon" width="64" height="64" src="<%iconPath%>"></td>\
|
<td><img class="generalIcon" width="64" height="64" src="<%iconPath%>"></td>\
|
||||||
<td style="<%userCSS%>"><%name%><%nameAux%></td>\
|
<td style="<%userCSS%>"><%name%><%nameAux%></td>\
|
||||||
<td><%age%>세</td>\
|
<td><%age%>세</td>\
|
||||||
@@ -37,7 +37,7 @@ var templateGeneralRow =
|
|||||||
<td><%killturn%></td>\
|
<td><%killturn%></td>\
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
function pickGeneral(){
|
function pickGeneral() {
|
||||||
$btn = $(this);
|
$btn = $(this);
|
||||||
|
|
||||||
if (!confirm('빙의할까요? : {0}'.format($btn.data('name')))) {
|
if (!confirm('빙의할까요? : {0}'.format($btn.data('name')))) {
|
||||||
@@ -45,13 +45,13 @@ function pickGeneral(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_select_npc.php',
|
url: 'j_select_npc.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
pick:$btn.val()
|
pick: $btn.val()
|
||||||
}
|
}
|
||||||
}).then(function(result){
|
}).then(function(result) {
|
||||||
if(!result.result){
|
if (!result.result) {
|
||||||
alert(result.reason);
|
alert(result.reason);
|
||||||
location.refresh();
|
location.refresh();
|
||||||
}
|
}
|
||||||
@@ -62,32 +62,30 @@ function pickGeneral(){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateOutdateTimer(){
|
function updateOutdateTimer() {
|
||||||
var $validUntilText = $('#valid_until_text');
|
var $validUntilText = $('#valid_until_text');
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
var validUntil = $validUntilText.data('until');
|
var validUntil = $validUntilText.data('until');
|
||||||
if(validUntil <= 0){
|
if (validUntil <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
} else if (validUntil < now) {
|
||||||
else if(validUntil < now){
|
$validUntilText.data('until', 0);
|
||||||
$validUntilText.data('until',0);
|
|
||||||
$('#valid_until').hide();
|
$('#valid_until').hide();
|
||||||
$('#outdate_token').show();
|
$('#outdate_token').show();
|
||||||
return;
|
return;
|
||||||
}
|
} else if (validUntil - now <= 30000) {
|
||||||
else if(validUntil - now <= 30000){
|
$validUntilText.css('color', "rgb(255, {0}, {0})".format(255 * (validUntil - now) / 30000));
|
||||||
$validUntilText.css('color', "rgb(255, {0}, {0})".format(255*(validUntil - now)/30000));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(updateOutdateTimer, 1000);
|
setTimeout(updateOutdateTimer, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updatePickMoreTimer(){
|
function updatePickMoreTimer() {
|
||||||
var $btn = $('#btn_pick_more');
|
var $btn = $('#btn_pick_more');
|
||||||
|
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
var remain = ($btn.data('available') - now) / 1000;
|
var remain = ($btn.data('available') - now) / 1000;
|
||||||
if(remain <= 0){
|
if (remain <= 0) {
|
||||||
$btn.prop('disabled', false)
|
$btn.prop('disabled', false)
|
||||||
$btn.html('다른 장수 보기');
|
$btn.html('다른 장수 보기');
|
||||||
return;
|
return;
|
||||||
@@ -98,53 +96,50 @@ function updatePickMoreTimer(){
|
|||||||
setTimeout(updatePickMoreTimer, 250);
|
setTimeout(updatePickMoreTimer, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
function printGenerals(value){
|
function printGenerals(value) {
|
||||||
$('.card_holder').empty();
|
$('.card_holder').empty();
|
||||||
$('#valid_until').show();
|
$('#valid_until').show();
|
||||||
$('#valid_until_text').html(value.validUntil).data('until', (new Date(value.validUntil)).getTime()).css('color','white');
|
$('#valid_until_text').html(value.validUntil).data('until', (new Date(value.validUntil)).getTime()).css('color', 'white');
|
||||||
$('#outdate_token').hide();
|
$('#outdate_token').hide();
|
||||||
var time = Date.now() + value.pickMoreSeconds*1000;
|
var time = Date.now() + value.pickMoreSeconds * 1000;
|
||||||
$('#btn_pick_more').data('available', time).prop('disabled',true);
|
$('#btn_pick_more').data('available', time).prop('disabled', true);
|
||||||
|
|
||||||
var pick = $.map(value.pick, function(value, key) {
|
var pick = $.map(value.pick, function(value, key) {
|
||||||
return value;
|
return value;
|
||||||
});
|
});
|
||||||
|
|
||||||
pick.sort(function(lhs, rhs){
|
pick.sort(function(lhs, rhs) {
|
||||||
var lsum = lhs.leadership+lhs.strength+lhs.intel;
|
var lsum = lhs.leadership + lhs.strength + lhs.intel;
|
||||||
var rsum = rhs.leadership+rhs.strength+rhs.intel;
|
var rsum = rhs.leadership + rhs.strength + rhs.intel;
|
||||||
return lsum - rsum;
|
return lsum - rsum;
|
||||||
});
|
});
|
||||||
|
|
||||||
$.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){
|
if (cardData.special in specialInfo) {
|
||||||
cardData.specialText = TemplateEngine(templateSpecial, {
|
cardData.specialText = TemplateEngine(templateSpecial, {
|
||||||
text:cardData.special,
|
text: cardData.special,
|
||||||
info:specialInfo[cardData.special]
|
info: specialInfo[cardData.special]
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
cardData.specialText = cardData.special;
|
cardData.specialText = cardData.special;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cardData.special2 in specialInfo){
|
if (cardData.special2 in specialInfo) {
|
||||||
cardData.special2Text = TemplateEngine(templateSpecial, {
|
cardData.special2Text = TemplateEngine(templateSpecial, {
|
||||||
text:cardData.special2,
|
text: cardData.special2,
|
||||||
info:specialInfo[cardData.special2]
|
info: specialInfo[cardData.special2]
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
cardData.special2Text = cardData.special2;
|
cardData.special2Text = cardData.special2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cardData.personal in characterInfo){
|
if (cardData.personal in characterInfo) {
|
||||||
cardData.personalText = TemplateEngine(templateSpecial, {
|
cardData.personalText = TemplateEngine(templateSpecial, {
|
||||||
text:cardData.personal,
|
text: cardData.personal,
|
||||||
info:characterInfo[cardData.personal]
|
info: characterInfo[cardData.personal]
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
cardData.personalText = cardData.personal;
|
cardData.personalText = cardData.personal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,10 +149,10 @@ function printGenerals(value){
|
|||||||
$('.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({
|
$card.find('.obj_tooltip').tooltip({
|
||||||
title:function(){
|
title: function() {
|
||||||
return $.trim($(this).find('.tooltiptext').html());
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
},
|
},
|
||||||
html:true
|
html: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -165,59 +160,57 @@ function printGenerals(value){
|
|||||||
updateOutdateTimer();
|
updateOutdateTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function printGeneralList(value){
|
function printGeneralList(value) {
|
||||||
var tokenList = value.token;
|
var tokenList = value.token;
|
||||||
var generalList = $.map(value.list, function(general){
|
var generalList = $.map(value.list, function(general) {
|
||||||
general = {
|
general = {
|
||||||
no:general[0],
|
no: general[0],
|
||||||
picture:general[1],
|
picture: general[1],
|
||||||
imgsvr:general[2],
|
imgsvr: general[2],
|
||||||
npc:general[3],
|
npc: general[3],
|
||||||
age:general[4],
|
age: general[4],
|
||||||
nation:general[5],
|
nation: general[5],
|
||||||
special:general[6],
|
special: general[6],
|
||||||
special2:general[7],
|
special2: general[7],
|
||||||
personal:general[8],
|
personal: general[8],
|
||||||
name:general[9],
|
name: general[9],
|
||||||
ownerName:general[10],
|
ownerName: general[10],
|
||||||
injury:general[11],
|
injury: general[11],
|
||||||
leadership:general[12],
|
leadership: general[12],
|
||||||
lbonus:general[13],
|
lbonus: general[13],
|
||||||
strength:general[14],
|
strength: general[14],
|
||||||
intel:general[15],
|
intel: general[15],
|
||||||
explevel:general[16],
|
explevel: general[16],
|
||||||
experience:general[17],
|
experience: general[17],
|
||||||
dedication:general[18],
|
dedication: general[18],
|
||||||
officerLevel:general[19],
|
officerLevel: general[19],
|
||||||
killturn:general[20],
|
killturn: general[20],
|
||||||
connect:general[21],
|
connect: general[21],
|
||||||
reserved:0
|
reserved: 0
|
||||||
};
|
};
|
||||||
if(general.npc < 2){
|
if (general.npc < 2) {
|
||||||
general.reserved = 2;
|
general.reserved = 2;
|
||||||
}
|
}
|
||||||
if(general.no in tokenList){
|
if (general.no in tokenList) {
|
||||||
general.reserved = 1;
|
general.reserved = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
general.userCSS = "";
|
general.userCSS = "";
|
||||||
general.nameAux = "";
|
general.nameAux = "";
|
||||||
|
|
||||||
if(general.reserved == 1){
|
if (general.reserved == 1) {
|
||||||
general.userCSS = 'color:violet';
|
general.userCSS = 'color:violet';
|
||||||
}
|
} else if (general.npc >= 2) {
|
||||||
else if(general.npc >= 2){
|
|
||||||
general.userCSS = 'color:cyan';
|
general.userCSS = 'color:cyan';
|
||||||
}
|
} else if (general.npc == 1) {
|
||||||
else if(general.npc == 1){
|
|
||||||
general.userCSS = 'color:skyblue';
|
general.userCSS = 'color:skyblue';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(general.ownerName){
|
if (general.ownerName) {
|
||||||
general.nameAux += '<br><small>({0})</small>'.format(general.ownerName);
|
general.nameAux += '<br><small>({0})</small>'.format(general.ownerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(general.reserved == 1){
|
if (general.reserved == 1) {
|
||||||
general.nameAux += '<br><small>({0}회)</small>'.format(tokenList[general.no]);
|
general.nameAux += '<br><small>({0}회)</small>'.format(tokenList[general.no]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,41 +219,41 @@ function printGeneralList(value){
|
|||||||
general.iconPath = getIconPath(general.imgsvr, general.picture);
|
general.iconPath = getIconPath(general.imgsvr, general.picture);
|
||||||
|
|
||||||
general.specialDomesticWithTooltip = TemplateEngine(templateSpecial, {
|
general.specialDomesticWithTooltip = TemplateEngine(templateSpecial, {
|
||||||
text:general.special,
|
text: general.special,
|
||||||
info:specialInfo[general.special]
|
info: specialInfo[general.special]
|
||||||
});
|
});
|
||||||
|
|
||||||
general.speicalWarWithTooltip = TemplateEngine(templateSpecial, {
|
general.speicalWarWithTooltip = TemplateEngine(templateSpecial, {
|
||||||
text:general.special2,
|
text: general.special2,
|
||||||
info:specialInfo[general.special2]
|
info: specialInfo[general.special2]
|
||||||
});
|
});
|
||||||
|
|
||||||
general.personalWithTooltip = TemplateEngine(templateSpecial, {
|
general.personalWithTooltip = TemplateEngine(templateSpecial, {
|
||||||
text:general.personal,
|
text: general.personal,
|
||||||
info:characterInfo[general.personal]
|
info: characterInfo[general.personal]
|
||||||
});
|
});
|
||||||
|
|
||||||
return general;
|
return general;
|
||||||
});
|
});
|
||||||
|
|
||||||
generalList.sort(function(lhs, rhs){
|
generalList.sort(function(lhs, rhs) {
|
||||||
if(lhs.reserved > rhs.reserved){
|
if (lhs.reserved > rhs.reserved) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(lhs.reserved < rhs.reserved){
|
if (lhs.reserved < rhs.reserved) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if(lhs.total != rhs.total){
|
if (lhs.total != rhs.total) {
|
||||||
return rhs.total - lhs.total;
|
return rhs.total - lhs.total;
|
||||||
}
|
}
|
||||||
if(lhs.leadership != rhs.leadership){
|
if (lhs.leadership != rhs.leadership) {
|
||||||
return rhs.leadership - lhs.total;
|
return rhs.leadership - lhs.total;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lhs.name < rhs.name){
|
if (lhs.name < rhs.name) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(lhs.name > rhs.name){
|
if (lhs.name > rhs.name) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -270,9 +263,9 @@ function printGeneralList(value){
|
|||||||
_printGeneralList(true);
|
_printGeneralList(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _printGeneralList(clear){
|
function _printGeneralList(clear) {
|
||||||
var $generalTable = $('#general_list');
|
var $generalTable = $('#general_list');
|
||||||
if(clear){
|
if (clear) {
|
||||||
$generalTable.empty();
|
$generalTable.empty();
|
||||||
$generalTable.data('lastIdx', 0);
|
$generalTable.data('lastIdx', 0);
|
||||||
$('#row_print_more').show();
|
$('#row_print_more').show();
|
||||||
@@ -284,77 +277,77 @@ function _printGeneralList(clear){
|
|||||||
var idxTo = Math.min(idxFrom + 50, generalList.length);
|
var idxTo = Math.min(idxFrom + 50, generalList.length);
|
||||||
$generalTable.data('lastIdx', idxTo);
|
$generalTable.data('lastIdx', idxTo);
|
||||||
|
|
||||||
for(var idx = idxFrom; idx < idxFrom + 50; idx++){
|
for (var idx = idxFrom; idx < idxFrom + 50; idx++) {
|
||||||
var general = generalList[idx];
|
var general = generalList[idx];
|
||||||
$generalTable.append(TemplateEngine(templateGeneralRow, general));
|
$generalTable.append(TemplateEngine(templateGeneralRow, general));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(idxTo == generalList.length){
|
if (idxTo == generalList.length) {
|
||||||
$('#row_print_more').hide();
|
$('#row_print_more').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$generalTable.find('.obj_tooltip').tooltip({
|
$generalTable.find('.obj_tooltip').tooltip({
|
||||||
title:function(){
|
title: function() {
|
||||||
return $.trim($(this).find('.tooltiptext').html());
|
return $.trim($(this).find('.tooltiptext').html());
|
||||||
},
|
},
|
||||||
html:true
|
html: true
|
||||||
});
|
});
|
||||||
$('#tb_general_list').show();
|
$('#tb_general_list').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function($){
|
$(function($) {
|
||||||
window.generalList = [];
|
window.generalList = [];
|
||||||
|
|
||||||
$.post('j_get_select_npc_token.php').then(function(value){
|
$.post('j_get_select_npc_token.php').then(function(value) {
|
||||||
if(!value.result){
|
if (!value.result) {
|
||||||
alert(value.reason);
|
alert(value.reason);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(value);
|
console.log(value);
|
||||||
printGenerals(value);
|
printGenerals(value);
|
||||||
});
|
|
||||||
|
|
||||||
$('#btn_pick_more').click(function(){
|
|
||||||
var generals = $.map($('.keep_select:checked'), function(value){
|
|
||||||
return $(value).val();
|
|
||||||
});
|
});
|
||||||
console.log(generals);
|
|
||||||
$.post({
|
$('#btn_pick_more').click(function() {
|
||||||
url:'j_get_select_npc_token.php',
|
var generals = $.map($('.keep_select:checked'), function(value) {
|
||||||
dataType:'json',
|
return $(value).val();
|
||||||
data:{
|
});
|
||||||
refresh:true,
|
console.log(generals);
|
||||||
keep:generals
|
$.post({
|
||||||
}
|
url: 'j_get_select_npc_token.php',
|
||||||
}).then(function(result){
|
dataType: 'json',
|
||||||
if(!result.result){
|
data: {
|
||||||
alert(result.reason);
|
refresh: true,
|
||||||
location.refresh();
|
keep: generals
|
||||||
}
|
}
|
||||||
console.log(result);
|
}).then(function(result) {
|
||||||
printGenerals(result);
|
if (!result.result) {
|
||||||
|
alert(result.reason);
|
||||||
|
location.refresh();
|
||||||
|
}
|
||||||
|
console.log(result);
|
||||||
|
printGenerals(result);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$('#btn_load_general_list').click(function(){
|
$('#btn_load_general_list').click(function() {
|
||||||
$.post({
|
$.post({
|
||||||
url:'j_get_general_list.php',
|
url: 'j_get_general_list.php',
|
||||||
dataType:'json',
|
dataType: 'json',
|
||||||
data:{
|
data: {
|
||||||
with_token:true
|
with_token: true
|
||||||
}
|
}
|
||||||
}).then(function(result){
|
}).then(function(result) {
|
||||||
if(!result.result){
|
if (!result.result) {
|
||||||
alert(result.reason);
|
alert(result.reason);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
printGeneralList(result);
|
printGeneralList(result);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$('#btn_print_more').click(function(){
|
$('#btn_print_more').click(function() {
|
||||||
_printGeneralList();
|
_printGeneralList();
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
+17
@@ -55,3 +55,20 @@ function LogText($prefix, $variable)
|
|||||||
$text = sprintf('%s : %s'."\r\n", $prefix, TVarDumper::dump($variable));
|
$text = sprintf('%s : %s'."\r\n", $prefix, TVarDumper::dump($variable));
|
||||||
file_put_contents(ROOT.'/d_log/'.UniqueConst::$serverName.'_dbg_logs.txt', $text, FILE_APPEND);
|
file_put_contents(ROOT.'/d_log/'.UniqueConst::$serverName.'_dbg_logs.txt', $text, FILE_APPEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepareDir(string $dirPath, bool $forceCreate=true):bool{
|
||||||
|
if(file_exists($dirPath)){
|
||||||
|
if(is_dir($dirPath)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(!$forceCreate){
|
||||||
|
throw new \RuntimeException('이미 파일이 있습니다');
|
||||||
|
}
|
||||||
|
if(!unlink($dirPath)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return mkdir($dirPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mkdir($dirPath, 0777, true);
|
||||||
|
}
|
||||||
+12
-2
@@ -43,7 +43,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
|
|||||||
$iterDefender = new \ArrayIterator($defenderList);
|
$iterDefender = new \ArrayIterator($defenderList);
|
||||||
$iterDefender->rewind();
|
$iterDefender->rewind();
|
||||||
|
|
||||||
$getNextDefender = function(?WarUnit $prevDefender, bool $reqNext) use ($iterDefender, $rawDefenderNation, $db) {
|
$getNextDefender = function(?WarUnit $prevDefender, bool $reqNext) use ($iterDefender, $rawDefenderNation, $rawDefenderCity, $db) {
|
||||||
if($prevDefender !== null){
|
if($prevDefender !== null){
|
||||||
$prevDefender->applyDB($db);
|
$prevDefender->applyDB($db);
|
||||||
}
|
}
|
||||||
@@ -57,6 +57,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
|
|||||||
}
|
}
|
||||||
|
|
||||||
$nextDefender = $iterDefender->current();
|
$nextDefender = $iterDefender->current();
|
||||||
|
$nextDefender->setRawCity($rawDefenderCity);
|
||||||
if(extractBattleOrder($nextDefender) <= 0){
|
if(extractBattleOrder($nextDefender) <= 0){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -261,6 +262,15 @@ function processWar_NG(
|
|||||||
$attacker->addTrain(1);
|
$attacker->addTrain(1);
|
||||||
$defender->addTrain(1);
|
$defender->addTrain(1);
|
||||||
|
|
||||||
|
$attackerCrewTypeCoef = $attacker->getCrewType()->getAttackCoef($defender->getCrewType()) * $defender->getCrewType()->getDefenceCoef($attacker->getCrewType());
|
||||||
|
$defenderCrewTypeCoef = $defender->getCrewType()->getAttackCoef($attacker->getCrewType()) * $attacker->getCrewType()->getDefenceCoef($defender->getCrewType());
|
||||||
|
if($attackerCrewTypeCoef > $defenderCrewTypeCoef && $attacker instanceof WarUnitGeneral){
|
||||||
|
$attacker->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
|
||||||
|
}
|
||||||
|
if($defenderCrewTypeCoef > $attackerCrewTypeCoef && $defender instanceof WarUnitGeneral){
|
||||||
|
$defender->getGeneral()->increaseInheritancePoint('snipe_combat', 1);
|
||||||
|
}
|
||||||
|
|
||||||
$attackerName = $attacker->getName();
|
$attackerName = $attacker->getName();
|
||||||
$attackerCrewTypeName = $attacker->getCrewTypeName();
|
$attackerCrewTypeName = $attacker->getCrewTypeName();
|
||||||
|
|
||||||
@@ -521,7 +531,7 @@ function ConquerCity(array $admin, General $general, array $city) {
|
|||||||
|
|
||||||
$lord = new General($db->queryFirstRow(
|
$lord = new General($db->queryFirstRow(
|
||||||
'SELECT %l FROM general WHERE nation = %i AND officer_level = %i LIMIT 1',
|
'SELECT %l FROM general WHERE nation = %i AND officer_level = %i LIMIT 1',
|
||||||
Util::formatListOfBackticks(General::mergeQueryColumn(['npc', 'gold', 'rice', 'experience', 'explevel', 'dedication', 'dedlevel', 'aux'], 1)[0]),
|
Util::formatListOfBackticks(General::mergeQueryColumn(['npc', 'gold', 'rice', 'experience', 'explevel', 'belong', 'dedication', 'dedlevel', 'aux'], 1)[0]),
|
||||||
$defenderNationID,
|
$defenderNationID,
|
||||||
12
|
12
|
||||||
), null, $city, $loseNation, $year, $month, false);
|
), null, $city, $loseNation, $year, $month, false);
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
use sammo\AbsGeneralPool;
|
||||||
|
use sammo\GameConst;
|
||||||
|
use sammo\Json;
|
||||||
|
use sammo\Util;
|
||||||
|
|
||||||
|
abstract class AbsFromUserPool extends AbsGeneralPool{
|
||||||
|
|
||||||
|
public function occupyGeneralName(): bool
|
||||||
|
{
|
||||||
|
$generalID = $this->getGeneralBuilder()->getGeneralID();
|
||||||
|
if($generalID === null){
|
||||||
|
throw new \RuntimeException('build되지 않음');
|
||||||
|
}
|
||||||
|
|
||||||
|
$db= $this->db;
|
||||||
|
$db->update('select_pool', [
|
||||||
|
'general_id'=>$generalID,
|
||||||
|
'owner'=>null,
|
||||||
|
'reserved_until'=>null,
|
||||||
|
], 'unique_name = %s AND owner IS NOT NULL', $this->uniqueName);
|
||||||
|
return $db->affectedRows()!=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function pickGeneralFromPool(\MeekroDB $db, int $owner, int $pickCnt, ?string $prefix=null):array{
|
||||||
|
$oNow = new \DateTimeImmutable();
|
||||||
|
$now = $oNow->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$db->update('select_pool', [
|
||||||
|
'reserved_until'=>null,
|
||||||
|
'owner'=>null,
|
||||||
|
],'reserved_until < %s AND general_id IS NULL', $now);
|
||||||
|
|
||||||
|
$pool = [];
|
||||||
|
foreach($db->query('SELECT id, unique_name, info FROM select_pool WHERE reserved_until IS NULL AND general_id IS NULL', $pickCnt) as $cand){
|
||||||
|
$cand['info'] = Json::decode($cand['info']);
|
||||||
|
$dexTotal = array_sum($cand['info']['dex']);
|
||||||
|
$pool[] = [$cand, $dexTotal];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($pool) < $pickCnt){
|
||||||
|
throw new \RuntimeException('pool 부족');
|
||||||
|
}
|
||||||
|
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
$result = [];
|
||||||
|
$validUntil = TimeUtil::nowAddMinutes(2 * $gameStor->turnterm);
|
||||||
|
while(count($result) < $pickCnt){
|
||||||
|
$cand = Util::choiceRandomUsingWeightPair($pool);
|
||||||
|
$poolID = $cand['id'];
|
||||||
|
if(key_exists($poolID, $result)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$candInfo = $cand['info'];
|
||||||
|
$candInfo['uniqueName'] = $cand['unique_name'];
|
||||||
|
|
||||||
|
//하나씩 한다.
|
||||||
|
$db->update('select_pool', [
|
||||||
|
'owner'=>$owner,
|
||||||
|
'reserved_until'=>$validUntil,
|
||||||
|
], 'id = %i AND reserved_until IS NULL AND owner IS NULL and general_id IS NULL', $poolID);
|
||||||
|
if($db->affectedRows()==0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$result[$poolID] = new static($db, $candInfo, $validUntil);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_values($result);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo;
|
||||||
|
|
||||||
|
use MeekroDB;
|
||||||
|
use sammo\GameConst;
|
||||||
|
use sammo\Scenario\GeneralBuilder;
|
||||||
|
use sammo\Util;
|
||||||
|
|
||||||
|
abstract class AbsGeneralPool{
|
||||||
|
protected $builder;
|
||||||
|
protected $info;
|
||||||
|
protected $db=null;
|
||||||
|
protected $uniqueName;
|
||||||
|
protected $generalName;
|
||||||
|
protected $validUntil;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* info = [
|
||||||
|
* uniqueName
|
||||||
|
* generalName
|
||||||
|
* imgsvr
|
||||||
|
* picture
|
||||||
|
*
|
||||||
|
* leadership
|
||||||
|
* strength
|
||||||
|
* intel
|
||||||
|
*
|
||||||
|
* experience
|
||||||
|
* dedication
|
||||||
|
*
|
||||||
|
* dex[5]
|
||||||
|
*
|
||||||
|
* specialDomestic
|
||||||
|
* specialWar
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function __construct(\MeekroDB $db, array $info, string $validUntil)
|
||||||
|
{
|
||||||
|
$this->db = $db;
|
||||||
|
$this->info = $info;
|
||||||
|
$this->uniqueName = $info['uniqueName'];
|
||||||
|
$this->generalName = $info['generalName'];
|
||||||
|
$this->builder = new GeneralBuilder(
|
||||||
|
$info['generalName'],
|
||||||
|
$info['imgsvr'],
|
||||||
|
$info['picture'],
|
||||||
|
0
|
||||||
|
);
|
||||||
|
$this->validUntil = $validUntil;
|
||||||
|
|
||||||
|
$builder = $this->builder;
|
||||||
|
if(key_exists('leadership', $info)){
|
||||||
|
$builder->setStat($info['leadership'], $info['strength'], $info['intel']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(key_exists('experience', $info)){
|
||||||
|
$builder->setExpDed($info['experience'], $info['dedication']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(key_exists('dex', $info)){
|
||||||
|
$builder->setDex($info['dex'][0], $info['dex'][1], $info['dex'][2], $info['dex'][3], $info['dex'][4]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(key_exists('specialDomestic', $info) || key_exists('specialWar', $info)){
|
||||||
|
$builder->setSpecial($info['specialDomestic']??GameConst::$defaultSpecialDomestic, $info['specialWar']??GameConst::$defaultSpecialWar);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUniqueName():string{
|
||||||
|
return $this->uniqueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getInfo():array{
|
||||||
|
return $this->info;
|
||||||
|
}
|
||||||
|
|
||||||
|
static protected function checkDuplicatedCnt(\MeekroDB $db, string $name):int{
|
||||||
|
$duplicateCnt = 0;
|
||||||
|
foreach(GeneralBuilder::$prefixList as $npcPrefix){
|
||||||
|
$testName = "{$npcPrefix}{$name}";
|
||||||
|
$duplicateCnt += $db->queryFirstField('SELECT count(no) FROM general WHERE name LIKE %s', $testName.'%');
|
||||||
|
}
|
||||||
|
return $duplicateCnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGeneralBuilder():GeneralBuilder{
|
||||||
|
if(!$this->generalName){
|
||||||
|
throw new \RuntimeException('generalName not picked');
|
||||||
|
}
|
||||||
|
return $this->builder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getValidUntil():string{
|
||||||
|
return $this->validUntil;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \MeekroDB $db
|
||||||
|
* @param int $owner
|
||||||
|
* @param int $pickCnt
|
||||||
|
* @param null|string $prefix
|
||||||
|
* @return AbsGeneralPool[]
|
||||||
|
*/
|
||||||
|
static abstract public function pickGeneralFromPool(\MeekroDB $db, int $owner, int $pickCnt, ?string $prefix=null):array;
|
||||||
|
abstract public function occupyGeneralName():bool;
|
||||||
|
|
||||||
|
|
||||||
|
abstract public static function getPoolName():string;
|
||||||
|
abstract public static function initPool(\MeekroDB $db);
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ class che_계략_삼략 extends \sammo\BaseItem{
|
|||||||
protected $id = 22;
|
protected $id = 22;
|
||||||
protected $rawName = '삼략';
|
protected $rawName = '삼략';
|
||||||
protected $name = '삼략(계략)';
|
protected $name = '삼략(계략)';
|
||||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
|
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p<br>[전투] 계략 시도 확률 +10%p, 계략 성공 확률 +10%p';
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $consumable = false;
|
protected $consumable = false;
|
||||||
|
|
||||||
@@ -19,4 +19,14 @@ class che_계략_삼략 extends \sammo\BaseItem{
|
|||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.1;
|
||||||
|
}
|
||||||
|
if($statName === 'warMagicSuccessProb'){
|
||||||
|
return $value + 0.1;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ class che_계략_육도 extends \sammo\BaseItem{
|
|||||||
protected $id = 21;
|
protected $id = 21;
|
||||||
protected $rawName = '육도';
|
protected $rawName = '육도';
|
||||||
protected $name = '육도(계략)';
|
protected $name = '육도(계략)';
|
||||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
|
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p<br>[전투] 계략 시도 확률 +10%p, 계략 성공 확률 +10%p';
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $consumable = false;
|
protected $consumable = false;
|
||||||
|
|
||||||
@@ -19,4 +19,14 @@ class che_계략_육도 extends \sammo\BaseItem{
|
|||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.1;
|
||||||
|
}
|
||||||
|
if($statName === 'warMagicSuccessProb'){
|
||||||
|
return $value + 0.1;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ class che_계략_이추 extends \sammo\BaseItem{
|
|||||||
protected $id = 5;
|
protected $id = 5;
|
||||||
protected $rawName = '이추';
|
protected $rawName = '이추';
|
||||||
protected $name = '이추(계략)';
|
protected $name = '이추(계략)';
|
||||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p';
|
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
|
||||||
protected $cost = 1000;
|
protected $cost = 1000;
|
||||||
protected $consumable = true;
|
protected $consumable = true;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
@@ -16,7 +16,7 @@ class che_계략_이추 extends \sammo\BaseItem{
|
|||||||
|
|
||||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||||
if($turnType == '계략'){
|
if($turnType == '계략'){
|
||||||
if($varType == 'success') return $value + 0.1;
|
if($varType == 'success') return $value + 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class che_계략_향낭 extends \sammo\BaseItem{
|
|||||||
protected $id = 5;
|
protected $id = 5;
|
||||||
protected $rawName = '항냥';
|
protected $rawName = '항냥';
|
||||||
protected $name = '항냥(계략)';
|
protected $name = '항냥(계략)';
|
||||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
|
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +50%p';
|
||||||
protected $cost = 3000;
|
protected $cost = 3000;
|
||||||
protected $consumable = true;
|
protected $consumable = true;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
@@ -16,7 +16,7 @@ class che_계략_향낭 extends \sammo\BaseItem{
|
|||||||
|
|
||||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||||
if($turnType == '계략'){
|
if($turnType == '계략'){
|
||||||
if($varType == 'success') return $value + 0.2;
|
if($varType == 'success') return $value + 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|||||||
@@ -6,4 +6,18 @@ use \sammo\General;
|
|||||||
class che_명마_07_기주마 extends \sammo\BaseStatItem{
|
class che_명마_07_기주마 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 공격 시 페이즈 +1";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'initWarPhase'){
|
||||||
|
return $value + 1;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_퇴각부상무효;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_명마_07_백마 extends \sammo\BaseStatItem{
|
class che_명마_07_백마 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 전투 종료로 인한 부상 없음";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_퇴각부상무효;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_명마_12_사륜거 extends \sammo\BaseStatItem{
|
class che_명마_12_사륜거 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 전투 종료로 인한 부상 없음";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,26 @@
|
|||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
use sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_무기_02_단궁 extends \sammo\BaseStatItem{
|
class che_무기_02_단궁 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 3000;
|
protected $cost = 3000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 2000;
|
protected $reqSecu = 2000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 새로운 상대와 전투 시 1% 확률로 저격 발동, 성공 시 사기+10";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 102, 0.01, 10, 30),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,25 @@
|
|||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
use sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_무기_07_맥궁 extends \sammo\BaseStatItem{
|
class che_무기_07_맥궁 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 107, 0.2, 20, 40),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,25 @@
|
|||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
use sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_무기_09_동호비궁 extends \sammo\BaseStatItem{
|
class che_무기_09_동호비궁 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.15, 20, 40),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,25 @@
|
|||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
use sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_무기_11_이광궁 extends \sammo\BaseStatItem{
|
class che_무기_11_이광궁 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 새로운 상대와 전투 시 10% 확률로 저격 발동, 성공 시 사기+10";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 111, 0.10, 20, 40),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,25 @@
|
|||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
use sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_무기_13_양유기궁 extends \sammo\BaseStatItem{
|
class che_무기_13_양유기궁 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 새로운 상대와 전투 시 10% 확률로 저격 발동, 성공 시 사기+10";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.05, 20, 40),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
use \sammo\SpecialityHelper;
|
||||||
|
use \sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
use \sammo\BaseWarUnitTrigger;
|
||||||
|
use \sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
use \sammo\WarUnitTrigger\che_반계시도;
|
||||||
|
use \sammo\WarUnitTrigger\che_반계발동;
|
||||||
|
|
||||||
|
class che_반계_백우선 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 45;
|
||||||
|
protected $rawName = '백우선';
|
||||||
|
protected $name = '백우선(반계)';
|
||||||
|
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301, false, '계략약화'),
|
||||||
|
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301),
|
||||||
|
new che_반계발동($unit)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
use \sammo\SpecialityHelper;
|
||||||
|
use \sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
use \sammo\BaseWarUnitTrigger;
|
||||||
|
use \sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
use \sammo\WarUnitTrigger\che_반계시도;
|
||||||
|
use \sammo\WarUnitTrigger\che_반계발동;
|
||||||
|
|
||||||
|
class che_반계_파초선 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 45;
|
||||||
|
protected $rawName = '파초선';
|
||||||
|
protected $name = '파초선(반계)';
|
||||||
|
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302, false, '계략약화'),
|
||||||
|
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302),
|
||||||
|
new che_반계발동($unit)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
use \sammo\GeneralTrigger;
|
||||||
|
use \sammo\GeneralTriggerCaller;
|
||||||
|
use \sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
|
use sammo\WarUnitTrigger\che_부상무효;
|
||||||
|
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
|
||||||
|
class che_부적_태현청생부 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 9;
|
||||||
|
protected $rawName = '태현청생부';
|
||||||
|
protected $name = '태현청생부(부적)';
|
||||||
|
protected $info = '[전투] 저격 불가, 부상 없음';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
|
||||||
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,4 +7,18 @@ class che_서적_01_효경전 extends \sammo\BaseStatItem{
|
|||||||
protected $cost = 1000;
|
protected $cost = 1000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 1000;
|
protected $reqSecu = 1000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +1%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.01;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,18 @@ class che_서적_02_회남자 extends \sammo\BaseStatItem{
|
|||||||
protected $cost = 3000;
|
protected $cost = 3000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 2000;
|
protected $reqSecu = 2000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +1%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.01;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,18 @@ class che_서적_03_변도론 extends \sammo\BaseStatItem{
|
|||||||
protected $cost = 6000;
|
protected $cost = 6000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 3000;
|
protected $reqSecu = 3000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +2%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.02;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,18 @@ class che_서적_04_건상역주 extends \sammo\BaseStatItem{
|
|||||||
protected $cost = 10000;
|
protected $cost = 10000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 4000;
|
protected $reqSecu = 4000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +2%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.02;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,18 @@ class che_서적_05_여씨춘추 extends \sammo\BaseStatItem{
|
|||||||
protected $cost = 15000;
|
protected $cost = 15000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 5000;
|
protected $reqSecu = 5000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +3%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.03;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,4 +7,18 @@ class che_서적_06_사민월령 extends \sammo\BaseStatItem{
|
|||||||
protected $cost = 21000;
|
protected $cost = 21000;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
protected $reqSecu = 6000;
|
protected $reqSecu = 6000;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +3%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.03;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_서적_07_논어 extends \sammo\BaseStatItem{
|
class che_서적_07_논어 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 상대의 계략 성공 확률 -10%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*207, false, '계략약화')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_반계발동;
|
||||||
|
use sammo\WarUnitTrigger\che_반계시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_서적_07_사마법 extends \sammo\BaseStatItem{
|
class che_서적_07_사마법 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*207, 0.2),
|
||||||
|
new che_반계발동($unit)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,18 @@ use \sammo\General;
|
|||||||
class che_서적_07_위료자 extends \sammo\BaseStatItem{
|
class che_서적_07_위료자 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 시도 확률 +20%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicTrialProb'){
|
||||||
|
return $value + 0.2;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,18 @@ use \sammo\General;
|
|||||||
class che_서적_08_전론 extends \sammo\BaseStatItem{
|
class che_서적_08_전론 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 계략 성공 시 대미지 +20%";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
$value = parent::onCalcStat($general, $statName, $value, $aux);
|
||||||
|
if($statName === 'warMagicSuccessDamage'){
|
||||||
|
return $value * 1.2;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_서적_11_춘추전 extends \sammo\BaseStatItem{
|
class che_서적_11_춘추전 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 상대의 계략 성공 확률 -10%p";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*211, false, '계략약화')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo\ActionItem;
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
use \sammo\iAction;
|
use \sammo\iAction;
|
||||||
use \sammo\General;
|
use \sammo\General;
|
||||||
|
use sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTrigger\che_반계발동;
|
||||||
|
use sammo\WarUnitTrigger\che_반계시도;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
|
||||||
class che_서적_12_산해경 extends \sammo\BaseStatItem{
|
class che_서적_12_산해경 extends \sammo\BaseStatItem{
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $buyable = false;
|
protected $buyable = false;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2),
|
||||||
|
new che_반계발동($unit)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
use \sammo\GeneralTrigger;
|
||||||
|
use \sammo\GeneralTriggerCaller;
|
||||||
|
use \sammo\BaseWarUnitTrigger;
|
||||||
|
use \sammo\WarUnitTriggerCaller;
|
||||||
|
use sammo\WarUnitTrigger\che_전투치료발동;
|
||||||
|
use sammo\WarUnitTrigger\che_전투치료시도;
|
||||||
|
|
||||||
|
class che_의술_상한잡병론 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 24;
|
||||||
|
protected $rawName = '상한잡병론';
|
||||||
|
protected $name = '상한잡병론(의술)';
|
||||||
|
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||||
|
return new GeneralTriggerCaller(
|
||||||
|
new GeneralTrigger\che_도시치료($general)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
|
{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301),
|
||||||
|
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ class che_의술_청낭서 extends \sammo\BaseItem{
|
|||||||
protected $id = 23;
|
protected $id = 23;
|
||||||
protected $rawName = '청낭서';
|
protected $rawName = '청낭서';
|
||||||
protected $name = '청낭서(의술)';
|
protected $name = '청낭서(의술)';
|
||||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $consumable = false;
|
protected $consumable = false;
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ class che_의술_청낭서 extends \sammo\BaseItem{
|
|||||||
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
{
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*302),
|
||||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class che_의술_태평청령 extends \sammo\BaseItem{
|
|||||||
protected $id = 24;
|
protected $id = 24;
|
||||||
protected $rawName = '태평청령';
|
protected $rawName = '태평청령';
|
||||||
protected $name = '태평청령(의술)';
|
protected $name = '태평청령(의술)';
|
||||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||||
protected $cost = 200;
|
protected $cost = 200;
|
||||||
protected $consumable = false;
|
protected $consumable = false;
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ class che_의술_태평청령 extends \sammo\BaseItem{
|
|||||||
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||||
{
|
{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
new che_전투치료시도($unit, BaseWarUnitTrigger::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*303),
|
||||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
use \sammo\SpecialityHelper;
|
||||||
|
use \sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
use \sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use \sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
|
||||||
|
class che_저격_매화수전 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 70;
|
||||||
|
protected $rawName = '매화수전';
|
||||||
|
protected $name = '매화수전(저격)';
|
||||||
|
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*304, 0.5, 20, 40),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
|
||||||
|
use sammo\BaseWarUnitTrigger;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
use \sammo\SpecialityHelper;
|
||||||
|
use \sammo\WarUnit;
|
||||||
|
use sammo\WarUnitTriggerCaller;
|
||||||
|
use \sammo\WarUnitTrigger\che_저격시도;
|
||||||
|
use \sammo\WarUnitTrigger\che_저격발동;
|
||||||
|
|
||||||
|
class che_저격_비도 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 70;
|
||||||
|
protected $rawName = '비도';
|
||||||
|
protected $name = '비도(저격)';
|
||||||
|
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
|
return new WarUnitTriggerCaller(
|
||||||
|
new che_저격시도($unit, che_저격시도::TYPE_ITEM+BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*305, 0.5, 20, 40),
|
||||||
|
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@ class che_저격_수극 extends \sammo\BaseItem{
|
|||||||
protected $id = 2;
|
protected $id = 2;
|
||||||
protected $rawName = '수극';
|
protected $rawName = '수극';
|
||||||
protected $name = '수극(저격)';
|
protected $name = '수극(저격)';
|
||||||
protected $info = '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용';
|
protected $info = '[전투] 전투 개시 전 50% 확률로 저격 시도. 1회용';
|
||||||
protected $cost = 1000;
|
protected $cost = 1000;
|
||||||
protected $consumable = true;
|
protected $consumable = true;
|
||||||
protected $buyable = true;
|
protected $buyable = true;
|
||||||
@@ -21,8 +21,15 @@ class che_저격_수극 extends \sammo\BaseItem{
|
|||||||
|
|
||||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||||
return new WarUnitTriggerCaller(
|
return new WarUnitTriggerCaller(
|
||||||
new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.2, 20, 40),
|
new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.5, 20, 40),
|
||||||
new che_저격발동($unit)
|
new che_저격발동($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isConsumableNow(string $actionType, string $command):bool{
|
||||||
|
if($actionType == 'GeneralTrigger' && $command == 'che_아이템치료'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
namespace sammo\ActionItem;
|
||||||
|
use \sammo\iAction;
|
||||||
|
use \sammo\General;
|
||||||
|
|
||||||
|
class che_행동_서촉지형도 extends \sammo\BaseItem{
|
||||||
|
|
||||||
|
protected $id = 22;
|
||||||
|
protected $rawName = '서촉지형도';
|
||||||
|
protected $name = '서촉지형도(행동)';
|
||||||
|
protected $info = '[전투] 공격 시 페이즈 + 2';
|
||||||
|
protected $cost = 200;
|
||||||
|
protected $consumable = false;
|
||||||
|
|
||||||
|
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||||
|
if($statName === 'initWarPhase'){
|
||||||
|
return $value + 2;
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user