mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 20:33:01 +00:00
Compare commits
366 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cd01ed87df | |||
| 8a79994b4e | |||
| 93a661a434 | |||
| 3e8796bb4c | |||
| c23fc4ade7 | |||
| 3b628c1ace | |||
| 27f8ae3999 | |||
| 80a891e541 | |||
| 776449aa3d | |||
| cef352f0ac | |||
| e8607a0c78 | |||
| 9c55cf9a8e | |||
| a9d1034298 | |||
| 8b83a13560 | |||
| 3c87480553 | |||
| 1a69218045 | |||
| e870ee5e0e | |||
| 908c6c18af | |||
| f591378ed3 | |||
| 0997a8a31e | |||
| 0bf6627fb0 | |||
| fb8539e679 | |||
| f8c2e85f3e | |||
| 110d2a0e10 | |||
| 8d9415191a | |||
| 7178a7e55d | |||
| 9e8d03d92d | |||
| f4a70eff43 | |||
| f9ec45c7ff | |||
| cf8bf9e4fc | |||
| 575237d764 | |||
| e12e8df3ef | |||
| 8d7b7d6cc4 | |||
| 6f79ea117c | |||
| 7b022502da | |||
| 4a376b7859 | |||
| 87cdf7feb1 | |||
| caf32290b8 | |||
| 7d495c56b3 | |||
| dc1c7bb284 | |||
| a6c85babfc | |||
| cbea7045fa | |||
| 099759c477 | |||
| 65197ac027 | |||
| e4bd6f5bd2 | |||
| acf5836253 | |||
| 17c8e8414c | |||
| 239033a269 | |||
| fa07064466 | |||
| 994ef712b2 | |||
| 33c30d3cbb | |||
| d9c8e80bca | |||
| 990729fe21 | |||
| aac0dd2993 | |||
| b17c24d2df | |||
| 32d606c667 | |||
| 6661672e2d | |||
| b5391b9110 | |||
| e306059f43 | |||
| a64e326c68 | |||
| 605b3d3a27 | |||
| 248e6d44db | |||
| 328a94e2d4 | |||
| 211196a722 | |||
| 0b283e60db | |||
| 90871cb3d9 | |||
| bf92845a4a | |||
| f8cbc2faed | |||
| 30fdb18945 | |||
| 062fb73f03 | |||
| 194c71727d | |||
| e1de3d2ae0 | |||
| 7f497f9d32 | |||
| 1cdb1816a2 | |||
| bc82b897c5 | |||
| beb4de0b45 | |||
| 785926a584 | |||
| 5c7972345a | |||
| 886f00ed50 | |||
| b983fac860 | |||
| 7b6decaef3 | |||
| 8d8301fbd7 | |||
| b4aa401210 | |||
| f1bfd6bc2a | |||
| 8c95323728 | |||
| 5874deeffc | |||
| 18cc648c8d | |||
| 9d515b20f2 | |||
| 17aaab1f9d | |||
| 6e26e8953c | |||
| e4138b871b | |||
| 4ac525afc2 | |||
| 05782433b8 | |||
| 9af7122b1d | |||
| 9e7a763482 | |||
| 1231d44b55 | |||
| 873f1f7f34 | |||
| d87db648c3 | |||
| 119c3d14b7 | |||
| 3cda32c213 | |||
| df3161455a | |||
| 4389f84ea5 | |||
| f9855fd097 | |||
| f912814e13 | |||
| 5738958a2a | |||
| d36d11653a | |||
| 7230714cbc | |||
| 6e5bf4b941 | |||
| fb66afd565 | |||
| ef5124d756 | |||
| 987de17e93 | |||
| 060be606e7 | |||
| 1c5f9f2e0f | |||
| 62253cc016 | |||
| 0b18671e91 | |||
| c98f3cfb4c | |||
| 624d11de4e | |||
| 5eb95a95d0 | |||
| da01156673 | |||
| 6a244f16e1 | |||
| 36d10462f7 | |||
| c30dbf6628 | |||
| 657cbbcabe | |||
| 81e7cf5a32 | |||
| edf298685e | |||
| efab0c4b6b | |||
| c838564023 | |||
| d197ee631e | |||
| 3dcddcba04 | |||
| 7823ff5336 | |||
| 11c335a015 | |||
| 07d96ad921 | |||
| 5d522b149b | |||
| 234bd89ed5 | |||
| af5cfb9bed | |||
| 426f9c337b | |||
| 5235dcee95 | |||
| 203ba2d340 | |||
| 9c67421ccc | |||
| 6669fc8214 | |||
| cef873f793 | |||
| 6a962f2591 | |||
| 91adf9c0eb | |||
| 9887580f9a | |||
| b7c62b5242 | |||
| 89a40272c6 | |||
| db369c98c8 | |||
| 10ba5d6046 | |||
| dd1a869531 | |||
| a9e23cf83a | |||
| 783c12590e | |||
| 6689b57a52 | |||
| 7029c699a0 | |||
| 3b9574af14 | |||
| 740f84dc22 | |||
| 55d45f9a98 | |||
| 61d1eeab6f | |||
| 133c1e866c | |||
| b730461894 | |||
| 8b08e22dbc | |||
| fc7c99fb0a | |||
| f1d267bb2d | |||
| 07664eedc0 | |||
| 64b8d7c874 | |||
| ccab07bd66 | |||
| 3a76d9a28e | |||
| 5720a5020d | |||
| b3e9e2099a | |||
| 93acf50bb4 | |||
| ff46a854f9 | |||
| 8c5f26ca5e | |||
| 5560b198ca | |||
| 9a413cf553 | |||
| bb5c491794 | |||
| 2f5d360e53 | |||
| 92e03dccb9 | |||
| 5ffe6284ca | |||
| fb98349bbd | |||
| 00a22ca12e | |||
| 3883adcefc | |||
| 0762ffa3dc | |||
| b70dc64d96 | |||
| 859751f74d | |||
| 91c451b6c5 | |||
| 30c7ed7e45 | |||
| 509b6f2056 | |||
| 558bebe710 | |||
| 08a85c5dae | |||
| d22f9ee294 | |||
| 0aeaf7c3b7 | |||
| c04bcef273 | |||
| 7fcea371c2 | |||
| dd765238f7 | |||
| 2c98a11696 | |||
| d4f14efaa0 | |||
| 27787c247b | |||
| ea9c07aa98 | |||
| 5cd9bfeb70 | |||
| b699196299 | |||
| e89c2aec4a | |||
| 456fb56e82 | |||
| 03ac828134 | |||
| 34b2264d5d | |||
| 933ede40f9 | |||
| 881dc33c9b | |||
| 3faa0d2603 | |||
| 1ce5087e2a | |||
| bf8d94eb35 | |||
| 9aac12f517 | |||
| 7b969173f4 | |||
| ca77d22035 | |||
| ad3bf35397 | |||
| 9b06221be0 | |||
| c0de178173 | |||
| 6a5face0aa | |||
| c15c54e920 | |||
| 24c079dca4 | |||
| 8eef7bb283 | |||
| 80493719f2 | |||
| df9d6bc506 | |||
| 71870cbd1c | |||
| f715ccd368 | |||
| 46edd56acc | |||
| 442850aebb | |||
| d4e752987e | |||
| 9c6a85ff16 | |||
| fa8d8eccc2 | |||
| 6e76f89ca2 | |||
| 9589bf6bf8 | |||
| ce5fa9502f | |||
| 7b1b05a35c | |||
| 38a86edc70 | |||
| 56b9b6f2c4 | |||
| 97dcba70cf | |||
| 6b93130c13 | |||
| 94c1a50cc8 | |||
| 31ab1d4287 | |||
| b6ba493450 | |||
| c613db2338 | |||
| 05ac8499df | |||
| 69244a094d | |||
| 1155673642 | |||
| 930079959c | |||
| c078257f70 | |||
| e7dd8d49a9 | |||
| 943c623be0 | |||
| 41352f77ae | |||
| af6d344e12 | |||
| 59434e0101 | |||
| 119018cf41 | |||
| e1df72d64d | |||
| 7f823256f4 | |||
| 9525827881 | |||
| fec1b1538e | |||
| 87a4f64ff0 | |||
| 7b069dcf20 | |||
| 26299354b6 | |||
| 642cbfcadc | |||
| cb3f8daedd | |||
| 5f3c054044 | |||
| 3b01608a71 | |||
| 06890f695a | |||
| 228e0007ca | |||
| f4bd7c53c0 | |||
| 1c8231eb9e | |||
| bde5d6931c | |||
| d40d21121a | |||
| 9c62bf3c2f | |||
| c821397367 | |||
| b539c63326 | |||
| 2c01fe59ce | |||
| 416fadd554 | |||
| 51ad6d65dc | |||
| c69446c460 | |||
| 38a84cae93 | |||
| bb3c918eac | |||
| 0e7cfe96ef | |||
| e71b11fcba | |||
| d270670145 | |||
| f01cf74fa6 | |||
| 93b0264a8b | |||
| 38beb804a3 | |||
| 72056ffba3 | |||
| 2d296eb317 | |||
| c3f8b8073b | |||
| 187d6e9dc4 | |||
| 78b15a0214 | |||
| a50663e0a4 | |||
| fee8772bb6 | |||
| 7e85224202 | |||
| 5d92d484a1 | |||
| 792a3b1443 | |||
| 8696ba398b | |||
| 696d875624 | |||
| b401404227 | |||
| fe7cb764b2 | |||
| 2b74d71ff5 | |||
| ddb14187b0 | |||
| 7decf74505 | |||
| 8a2a1b152e | |||
| a8e12c82a7 | |||
| b68607a6ef | |||
| ab89fe13b4 | |||
| c72a37a434 | |||
| 36e009a5bd | |||
| f5ab135906 | |||
| 92914d86f1 | |||
| 82d6e0138d | |||
| 1c75236508 | |||
| 5a2b5cd295 | |||
| 1f154af2ca | |||
| c214c3a95b | |||
| 34d5959cae | |||
| 27cf5a4068 | |||
| 249cbb7bc7 | |||
| ccfc8b296f | |||
| 3f8b67e500 | |||
| 82ad8b5fe2 | |||
| 40db13d33e | |||
| 68fe95786e | |||
| f8a72296e6 | |||
| ed6e53be54 | |||
| f1d1731fc7 | |||
| d34afb6f30 | |||
| a98e3b758a | |||
| 797eaf308d | |||
| 65150b0581 | |||
| 743b61ae13 | |||
| 966067ae74 | |||
| 4f5824b4a1 | |||
| 5d937b5be9 | |||
| ecdebbc1a7 | |||
| f2ffca1a06 | |||
| 19b14ea2d4 | |||
| b9d8fb0d91 | |||
| 4c7f2391cd | |||
| 7139530787 | |||
| 3886636ec7 | |||
| 22333ee40b | |||
| 2ca37ae838 | |||
| 45eea666a1 | |||
| bcb0e43d13 | |||
| 0e4361955d | |||
| 8d90b5a2e7 | |||
| e1e5873398 | |||
| 4a067e4e9b | |||
| e285a88e13 | |||
| d162f25536 | |||
| a0063997e1 | |||
| 88526eac21 | |||
| 6e12d2fd49 | |||
| 00dd7c2b71 | |||
| cc46297b32 | |||
| 6e61f6d0ba | |||
| b87c5484b1 | |||
| f0bf3826bd | |||
| d9d6a64941 | |||
| d54cd08560 | |||
| ebdb8e5d90 | |||
| b61cc85b5f | |||
| 5b3ab59b7c | |||
| c3456ebea0 | |||
| 0461ac7912 | |||
| 02526072f3 | |||
| 854a09fc84 | |||
| f0d0c83710 |
+1
-1
@@ -13,4 +13,4 @@ steps:
|
||||
image: akkadius/eqemu-server:latest
|
||||
commands:
|
||||
- sudo chown eqemu:eqemu /drone/src/ * -R
|
||||
- git submodule init && git submodule update && mkdir -p build && cd build && cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_BOTS=ON -DEQEMU_BUILD_LUA=ON -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
|
||||
- git submodule init && git submodule update && mkdir -p build && cd build && cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LUA=ON -G 'Unix Makefiles' .. && make -j$((`nproc`-4))
|
||||
|
||||
Vendored
+2
-1
@@ -9,7 +9,8 @@
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"chrono": "cpp",
|
||||
"xutility": "cpp",
|
||||
"iterator": "cpp",
|
||||
"*.ipp": "cpp"
|
||||
}
|
||||
}
|
||||
Vendored
+14
-14
@@ -6,7 +6,7 @@
|
||||
{
|
||||
"label": "make",
|
||||
"type": "shell",
|
||||
"command": "cd bin && make",
|
||||
"command": "mkdir -p build && cd build && make",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -18,7 +18,7 @@
|
||||
{
|
||||
"label": "make clean",
|
||||
"type": "shell",
|
||||
"command": "cd bin && make clean",
|
||||
"command": "mkdir -p build && cd build && make clean",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -30,7 +30,7 @@
|
||||
{
|
||||
"label": "cmake",
|
||||
"type": "shell",
|
||||
"command": "mkdir -p bin && cd bin && rm CMakeCache.txt && cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -G 'Unix Makefiles' ..",
|
||||
"command": "mkdir -p build && cd build && rm CMakeCache.txt && cmake -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -G 'Unix Makefiles' ..",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -52,7 +52,7 @@
|
||||
{
|
||||
"label": "download maps",
|
||||
"type": "shell",
|
||||
"command": "mkdir -p bin && cd bin && wget https://codeload.github.com/Akkadius/EQEmuMaps/zip/master -O maps.zip && unzip -o maps.zip && rm ./maps -rf && mv EQEmuMaps-master maps && rm maps.zip",
|
||||
"command": "mkdir -p build && cd build/bin && wget https://codeload.github.com/Akkadius/EQEmuMaps/zip/master -O maps.zip && unzip -o maps.zip && rm ./maps -rf && mv EQEmuMaps-master maps && rm maps.zip",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -64,7 +64,7 @@
|
||||
{
|
||||
"label": "download quests",
|
||||
"type": "shell",
|
||||
"command": "mkdir -p bin && cd bin && cd server && git -C ./quests pull 2> /dev/null || git clone https://github.com/ProjectEQ/projecteqquests.git quests",
|
||||
"command": "mkdir -p build && cd build/bin && cd server && git -C ./quests pull 2> /dev/null || git clone https://github.com/ProjectEQ/projecteqquests.git quests",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -76,7 +76,7 @@
|
||||
{
|
||||
"label": "download eqemu_config",
|
||||
"type": "shell",
|
||||
"command": "mkdir -p bin && cd bin && wget --no-check-certificate https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/eqemu_config_docker.json -O eqemu_config.json",
|
||||
"command": "mkdir -p build && cd build/bin && wget --no-check-certificate https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/eqemu_config_docker.json -O eqemu_config.json",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -88,7 +88,7 @@
|
||||
{
|
||||
"label": "rebuild database (mariadb must be started)",
|
||||
"type": "shell",
|
||||
"command": "mkdir -p bin && cd bin && docker run -i --rm --privileged -v ${HOST_PROJECT_PATH}/bin:/src --network=eqemu -it eqemu/server:0.0.3 bash -c './eqemu_server.pl source_peq_db && ./eqemu_server.pl check_db_updates && ./eqemu_server.pl linux_login_server_setup'",
|
||||
"command": "mkdir -p build && cd build/bin && docker run -i --rm --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --network=eqemu -it eqemu/server:0.0.3 bash -c './eqemu_server.pl source_peq_db && ./eqemu_server.pl check_db_updates && ./eqemu_server.pl assets && ./eqemu_server.pl lua_modules && ./eqemu_server.pl opcodes && ./eqemu_server.pl linux_login_server_setup'",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -100,7 +100,7 @@
|
||||
{
|
||||
"label": "zone 7000",
|
||||
"type": "shell",
|
||||
"command": "docker stop zone7000 | true && docker network create eqemu | true && docker run -i --rm --name zone7000 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/bin:/src --ulimit core=10000000 --network=eqemu -p 7000:7000/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./zone dynamic_zone7000:7000",
|
||||
"command": "docker stop zone7000 | true && docker network create eqemu | true && docker run -i --rm --name zone7000 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 --network=eqemu -p 7000:7000/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./zone dynamic_zone7000:7000",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
@@ -109,7 +109,7 @@
|
||||
{
|
||||
"label": "zone 7001",
|
||||
"type": "shell",
|
||||
"command": "docker stop zone7001 | true && docker network create eqemu | true && docker run -i --rm --name zone7001 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/bin:/src --ulimit core=10000000 --network=eqemu -p 7001:7001/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./zone dynamic_zone7001:7001",
|
||||
"command": "docker stop zone7001 | true && docker network create eqemu | true && docker run -i --rm --name zone7001 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 --network=eqemu -p 7001:7001/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./zone dynamic_zone7001:7001",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
@@ -118,7 +118,7 @@
|
||||
{
|
||||
"label": "loginserver",
|
||||
"type": "shell",
|
||||
"command": "docker stop loginserver | true && docker network create eqemu | true && docker run -i --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/bin:/src --ulimit core=10000000 --network=eqemu --name loginserver -p 5999:5999/udp -p 5998:5998/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./loginserver",
|
||||
"command": "docker stop loginserver | true && docker network create eqemu | true && docker run -i --rm --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 --network=eqemu --name loginserver -p 5999:5999/udp -p 5998:5998/udp -e LD_LIBRARY_PATH=/src/ eqemu/server:0.0.3 gdb -ex run --args ./loginserver",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
@@ -127,7 +127,7 @@
|
||||
{
|
||||
"label": "shared_memory, world",
|
||||
"type": "shell",
|
||||
"command": "docker stop sharedmemory | true && docker stop world | true && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/bin:/src --network=eqemu --name sharedmemory eqemu/server:0.0.3 ./shared_memory && docker run --rm -v ${HOST_PROJECT_PATH}/bin:/src --ulimit core=10000000 -e LD_LIBRARY_PATH=/src/ --network=eqemu --name world -p 9000:9000 -p 9000:9000/udp -p 9001:9001 -p 9080:9080 eqemu/server:0.0.3 gdb -ex run ./world",
|
||||
"command": "docker stop sharedmemory | true && docker stop world | true && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src --network=eqemu --name sharedmemory eqemu/server:0.0.3 ./shared_memory && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 -e LD_LIBRARY_PATH=/src/ --network=eqemu --name world -p 9000:9000 -p 9000:9000/udp -p 9001:9001 -p 9080:9080 eqemu/server:0.0.3 gdb -ex run ./world",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
@@ -136,7 +136,7 @@
|
||||
{
|
||||
"label": "queryserv",
|
||||
"type": "shell",
|
||||
"command": "docker stop queryserv | true && docker run --rm -v ${HOST_PROJECT_PATH}/bin:/src --ulimit core=10000000 -e LD_LIBRARY_PATH=/src/ --network=eqemu --name queryserv eqemu/server:0.0.3 gdb -ex run ./queryserv",
|
||||
"command": "docker stop queryserv | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src --ulimit core=10000000 -e LD_LIBRARY_PATH=/src/ --network=eqemu --name queryserv eqemu/server:0.0.3 gdb -ex run ./queryserv",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
@@ -145,7 +145,7 @@
|
||||
{
|
||||
"label": "mariadb",
|
||||
"type": "shell",
|
||||
"command": "docker stop mariadb | true && cd bin && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/bin/db:/bitnami/mariadb -p 3306:3306 -e MARIADB_DATABASE=peq -e MARIADB_USER=eqemu -e MARIADB_PASSWORD=eqemupass -e ALLOW_EMPTY_PASSWORD=yes --name mariadb --network=eqemu bitnami/mariadb:latest",
|
||||
"command": "docker stop mariadb | true && cd bin && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin/db:/bitnami/mariadb -p 3306:3306 -e MARIADB_DATABASE=peq -e MARIADB_USER=eqemu -e MARIADB_PASSWORD=eqemupass -e ALLOW_EMPTY_PASSWORD=yes --name mariadb --network=eqemu bitnami/mariadb:latest",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
@@ -154,7 +154,7 @@
|
||||
{
|
||||
"label": "ucs",
|
||||
"type": "shell",
|
||||
"command": "docker stop ucs | true && cd bin && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/bin:/src -p 7778:7778 --name ucs --network=eqemu eqemu/server:0.0.3 gdb -ex run ./ucs",
|
||||
"command": "docker stop ucs | true && cd bin && docker network create eqemu | true && docker run --rm -v ${HOST_PROJECT_PATH}/build/bin:/src -p 7778:7778 --name ucs --network=eqemu eqemu/server:0.0.3 gdb -ex run ./ucs",
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true
|
||||
|
||||
+48
-1
@@ -1,4 +1,4 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
|
||||
|
||||
@@ -131,6 +131,47 @@ OPTION(EQEMU_BUILD_TESTS "Build utility tests." OFF)
|
||||
OPTION(EQEMU_BUILD_CLIENT_FILES "Build Client Import/Export Data Programs." ON)
|
||||
OPTION(EQEMU_PREFER_LUA "Build with normal Lua even if LuaJIT is found." OFF)
|
||||
|
||||
#PRNG options
|
||||
OPTION(EQEMU_ADDITIVE_LFIB_PRNG "Use Additive LFib for PRNG." OFF)
|
||||
MARK_AS_ADVANCED(EQEMU_ADDITIVE_LFIB_PRNG)
|
||||
OPTION(EQEMU_BIASED_INT_DIST "Use biased int dist instead of uniform." OFF)
|
||||
MARK_AS_ADVANCED(EQEMU_BIASED_INT_DIST)
|
||||
SET(EQEMU_CUSTOM_PRNG_ENGINE "" CACHE STRING "Custom random engine. (ex. std::default_random_engine)")
|
||||
MARK_AS_ADVANCED(EQEMU_CUSTOM_PRNG_ENGINE)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
OPTION(EQEMU_SFMT19937 "Use GCC's extention for SIMD Fast MT19937." OFF)
|
||||
MARK_AS_ADVANCED(EQEMU_SFMT19937)
|
||||
ENDIF()
|
||||
|
||||
IF(EQEMU_ADDITIVE_LFIB_PRNG)
|
||||
ADD_DEFINITIONS(-DUSE_ADDITIVE_LFIB_PRNG)
|
||||
IF(EQEMU_SFMT19937)
|
||||
MESSAGE(STATUS "SFMT19937 and ADDITITVE_LFIB_PRNG both set, SFMT19937 ignored.")
|
||||
SET(EQEMU_SFMT19937 OFF)
|
||||
ENDIF()
|
||||
IF(NOT EQEMU_CUSTOM_PRNG_ENGINE STREQUAL "")
|
||||
MESSAGE(STATUS "CUSTOM_PRNG_ENGINE and ADDITITVE_LFIB_PRNG both set, CUSTOM_PRNG_ENGINE ignored.")
|
||||
SET(EQEMU_CUSTOM_PRNG_ENGINE "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(EQEMU_SFMT19937)
|
||||
ADD_DEFINITIONS(-DUSE_SFMT19937)
|
||||
IF(NOT EQEMU_CUSTOM_PRNG_ENGINE STREQUAL "")
|
||||
MESSAGE(STATUS "CUSTOM_PRNG_ENGINE and SFMT19937 both set, CUSTOM_PRNG_ENGINE ignored.")
|
||||
SET(EQEMU_CUSTOM_PRNG_ENGINE "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EQEMU_CUSTOM_PRNG_ENGINE STREQUAL "")
|
||||
ADD_DEFINITIONS(-DUSE_CUSTOM_PRNG_ENGINE=${EQEMU_CUSTOM_PRNG_ENGINE})
|
||||
ENDIF()
|
||||
|
||||
IF(EQEMU_BIASED_INT_DIST)
|
||||
ADD_DEFINITIONS(-DBIASED_INT_DIST)
|
||||
ENDIF()
|
||||
|
||||
IF(EQEMU_COMMANDS_LOGGING)
|
||||
ADD_DEFINITIONS(-DCOMMANDS_LOGGING)
|
||||
ENDIF(EQEMU_COMMANDS_LOGGING)
|
||||
@@ -183,6 +224,9 @@ IF(OpenSSL_FOUND AND MBEDTLS_FOUND)
|
||||
SET(TLS_LIBRARY_LIBS ${OPENSSL_LIBRARIES})
|
||||
SET(TLS_LIBRARY_INCLUDE ${OPENSSL_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DEQEMU_USE_OPENSSL)
|
||||
IF(${OPENSSL_VERSION} VERSION_GREATER_EQUAL "1.1.1")
|
||||
ADD_DEFINITIONS(-DCPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
ENDIF()
|
||||
ELSEIF(TLS_LIBRARY_SELECTION STREQUAL "mbedTLS")
|
||||
SET(TLS_LIBRARY_TYPE " mbedTLS")
|
||||
SET(TLS_LIBRARY_ENABLED ON)
|
||||
@@ -198,6 +242,9 @@ ELSEIF(OpenSSL_FOUND)
|
||||
SET(TLS_LIBRARY_LIBS ${OPENSSL_LIBRARIES})
|
||||
SET(TLS_LIBRARY_INCLUDE ${OPENSSL_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DEQEMU_USE_OPENSSL)
|
||||
IF(${OPENSSL_VERSION} VERSION_GREATER_EQUAL "1.1.1")
|
||||
ADD_DEFINITIONS(-DCPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
ENDIF()
|
||||
ELSEIF(MBEDTLS_FOUND)
|
||||
SET(TLS_LIBRARY_TYPE " mbedTLS")
|
||||
SET(TLS_LIBRARY_ENABLED ON)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
############################################
|
||||
#
|
||||
# New changelog can be found here
|
||||
# https://eqemu.gitbook.io/changelog/
|
||||
# https://docs.eqemu.io/server/changelog/server
|
||||
#
|
||||
############################################
|
||||
# Deprecated
|
||||
|
||||
@@ -83,8 +83,9 @@ int main(int argc, char **argv)
|
||||
content_db.SetMysql(database.getMySQL());
|
||||
}
|
||||
|
||||
database.LoadLogSettings(LogSys.log_settings);
|
||||
LogSys.StartFileLogs();
|
||||
LogSys.SetDatabase(&database)
|
||||
->LoadLogDatabaseSettings()
|
||||
->StartFileLogs();
|
||||
|
||||
std::string arg_1;
|
||||
|
||||
|
||||
@@ -80,8 +80,9 @@ int main(int argc, char **argv) {
|
||||
content_db.SetMysql(database.getMySQL());
|
||||
}
|
||||
|
||||
database.LoadLogSettings(LogSys.log_settings);
|
||||
LogSys.StartFileLogs();
|
||||
LogSys.SetDatabase(&database)
|
||||
->LoadLogDatabaseSettings()
|
||||
->StartFileLogs();
|
||||
|
||||
ImportSpells(&content_db);
|
||||
ImportSkillCaps(&content_db);
|
||||
|
||||
+25
-3
@@ -32,7 +32,6 @@ SET(common_sources
|
||||
eq_stream_proxy.cpp
|
||||
eqtime.cpp
|
||||
event_sub.cpp
|
||||
expedition_base.cpp
|
||||
expedition_lockout_timer.cpp
|
||||
extprofile.cpp
|
||||
faction.cpp
|
||||
@@ -72,6 +71,7 @@ SET(common_sources
|
||||
serialize_buffer.cpp
|
||||
server_event_scheduler.cpp
|
||||
serverinfo.cpp
|
||||
shared_tasks.cpp
|
||||
shareddb.cpp
|
||||
skills.cpp
|
||||
spdat.cpp
|
||||
@@ -154,6 +154,7 @@ SET(repositories
|
||||
repositories/base/base_character_disciplines_repository.h
|
||||
repositories/base/base_character_expedition_lockouts_repository.h
|
||||
repositories/base/base_character_inspect_messages_repository.h
|
||||
repositories/base/base_character_instance_safereturns_repository.h
|
||||
repositories/base/base_character_item_recast_repository.h
|
||||
repositories/base/base_character_languages_repository.h
|
||||
repositories/base/base_character_leadership_abilities_repository.h
|
||||
@@ -165,11 +166,15 @@ SET(repositories
|
||||
repositories/base/base_character_potionbelt_repository.h
|
||||
repositories/base/base_character_skills_repository.h
|
||||
repositories/base/base_character_spells_repository.h
|
||||
repositories/base/base_character_task_timers_repository.h
|
||||
repositories/base/base_character_tasks_repository.h
|
||||
repositories/base/base_char_create_combinations_repository.h
|
||||
repositories/base/base_char_create_point_allocations_repository.h
|
||||
repositories/base/base_char_recipe_list_repository.h
|
||||
repositories/base/base_completed_tasks_repository.h
|
||||
repositories/base/base_completed_shared_tasks_repository.h
|
||||
repositories/base/base_completed_shared_task_members_repository.h
|
||||
repositories/base/base_completed_shared_task_activity_state_repository.h
|
||||
repositories/base/base_content_flags_repository.h
|
||||
repositories/base/base_damageshieldtypes_repository.h
|
||||
repositories/base/base_data_buckets_repository.h
|
||||
@@ -255,6 +260,10 @@ SET(repositories
|
||||
repositories/base/base_rule_values_repository.h
|
||||
repositories/base/base_saylink_repository.h
|
||||
repositories/base/base_server_scheduled_events_repository.h
|
||||
repositories/base/base_shared_tasks_repository.h
|
||||
repositories/base/base_shared_task_activity_state_repository.h
|
||||
repositories/base/base_shared_task_dynamic_zones_repository.h
|
||||
repositories/base/base_shared_task_members_repository.h
|
||||
repositories/base/base_skill_caps_repository.h
|
||||
repositories/base/base_spawn2_repository.h
|
||||
repositories/base/base_spawnentry_repository.h
|
||||
@@ -318,6 +327,7 @@ SET(repositories
|
||||
repositories/character_disciplines_repository.h
|
||||
repositories/character_expedition_lockouts_repository.h
|
||||
repositories/character_inspect_messages_repository.h
|
||||
repositories/character_instance_safereturns_repository.h
|
||||
repositories/character_item_recast_repository.h
|
||||
repositories/character_languages_repository.h
|
||||
repositories/character_leadership_abilities_repository.h
|
||||
@@ -329,11 +339,15 @@ SET(repositories
|
||||
repositories/character_potionbelt_repository.h
|
||||
repositories/character_skills_repository.h
|
||||
repositories/character_spells_repository.h
|
||||
repositories/character_task_timers_repository.h
|
||||
repositories/character_tasks_repository.h
|
||||
repositories/char_create_combinations_repository.h
|
||||
repositories/char_create_point_allocations_repository.h
|
||||
repositories/char_recipe_list_repository.h
|
||||
repositories/completed_tasks_repository.h
|
||||
repositories/completed_shared_tasks_repository.h
|
||||
repositories/completed_shared_task_members_repository.h
|
||||
repositories/completed_shared_task_activity_state_repository.h
|
||||
repositories/content_flags_repository.h
|
||||
repositories/damageshieldtypes_repository.h
|
||||
repositories/data_buckets_repository.h
|
||||
@@ -419,6 +433,10 @@ SET(repositories
|
||||
repositories/rule_values_repository.h
|
||||
repositories/saylink_repository.h
|
||||
repositories/server_scheduled_events_repository.h
|
||||
repositories/shared_tasks_repository.h
|
||||
repositories/shared_task_activity_state_repository.h
|
||||
repositories/shared_task_dynamic_zones_repository.h
|
||||
repositories/shared_task_members_repository.h
|
||||
repositories/skill_caps_repository.h
|
||||
repositories/spawn2_repository.h
|
||||
repositories/spawnentry_repository.h
|
||||
@@ -451,6 +469,7 @@ SET(repositories
|
||||
)
|
||||
|
||||
SET(common_headers
|
||||
additive_lagged_fibonacci_engine.h
|
||||
any.h
|
||||
base_packet.h
|
||||
base_data.h
|
||||
@@ -496,7 +515,6 @@ SET(common_headers
|
||||
eqtime.h
|
||||
errmsg.h
|
||||
event_sub.h
|
||||
expedition_base.h
|
||||
expedition_lockout_timer.h
|
||||
extprofile.h
|
||||
faction.h
|
||||
@@ -508,6 +526,7 @@ SET(common_headers
|
||||
guild_base.h
|
||||
guilds.h
|
||||
http/httplib.h
|
||||
http/uri.h
|
||||
inventory_profile.h
|
||||
inventory_slot.h
|
||||
ipc_mutex.h
|
||||
@@ -552,11 +571,13 @@ SET(common_headers
|
||||
server_event_scheduler.h
|
||||
serverinfo.h
|
||||
servertalk.h
|
||||
shared_tasks.h
|
||||
shareddb.h
|
||||
skills.h
|
||||
spdat.h
|
||||
string_util.h
|
||||
struct_strategy.h
|
||||
tasks.h
|
||||
textures.h
|
||||
timer.h
|
||||
types.h
|
||||
@@ -618,7 +639,8 @@ SET(common_headers
|
||||
StackWalker/StackWalker.h
|
||||
util/memory_stream.h
|
||||
util/directory.h
|
||||
util/uuid.h)
|
||||
util/uuid.h
|
||||
)
|
||||
|
||||
SOURCE_GROUP(Event FILES
|
||||
event/event_loop.h
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2021 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
/*
|
||||
* This is an additive lagged fibonacci generator as seen in The Art of Computer Programming, Vol. 2
|
||||
* This should roughly match the implementation that EQ's client uses and be compatible with our Random class
|
||||
*
|
||||
* EQ's rand looks like it was from an example implementation that as posted on pscode.com
|
||||
*
|
||||
* You might also want to consider defining BIASED_INT_DIST as well to more closely match EQ
|
||||
*/
|
||||
|
||||
namespace EQ {
|
||||
template<typename UIntType, size_t w, size_t j, size_t k>
|
||||
class additive_lagged_fibonacci_engine {
|
||||
static_assert(std::is_unsigned<UIntType>::value, "result_type must be an unsigned integral type");
|
||||
static_assert(0u < j && j < k, "0 < j < k");
|
||||
static_assert(0u < w && w <= std::numeric_limits<UIntType>::digits,
|
||||
"template argument substituting w out of bounds");
|
||||
|
||||
public:
|
||||
using result_type = UIntType;
|
||||
static constexpr size_t word_size = w;
|
||||
static constexpr size_t short_lag = j;
|
||||
static constexpr size_t long_lag = k;
|
||||
static constexpr result_type default_seed = 19780503u; // default for subtract_with_carry_engine
|
||||
|
||||
additive_lagged_fibonacci_engine() : additive_lagged_fibonacci_engine(default_seed) {}
|
||||
|
||||
explicit additive_lagged_fibonacci_engine(result_type sd) { seed(sd); }
|
||||
|
||||
void seed(result_type seed = default_seed)
|
||||
{
|
||||
state1 = long_lag - long_lag;
|
||||
state2 = long_lag - short_lag;
|
||||
state[0] = static_cast<int>(seed) & ((1u << word_size) - 1);
|
||||
state[1] = 1;
|
||||
for (int i = 2; i < long_lag; ++i)
|
||||
state[i] = (state[i - 1] + state[i - 2]) & ((1u << word_size) - 1);
|
||||
return;
|
||||
}
|
||||
// TODO: seed via seed_seq
|
||||
|
||||
static constexpr result_type min() { return 0; }
|
||||
static constexpr result_type max() { return ((1u << word_size) - 1) >> 6; }
|
||||
|
||||
void discard(unsigned long long z) {
|
||||
for (; z != 0ULL; --z)
|
||||
(*this)();
|
||||
}
|
||||
|
||||
result_type operator()() {
|
||||
result_type rand = (state[state1] + state[state2]) & ((1u << word_size) - 1);
|
||||
state[state1] = rand;
|
||||
if (++state1 == long_lag)
|
||||
state1 = 0;
|
||||
if (++state2 == long_lag)
|
||||
state2 = 0;
|
||||
|
||||
return rand >> 6;
|
||||
}
|
||||
|
||||
private:
|
||||
result_type state1;
|
||||
result_type state2;
|
||||
result_type state[long_lag];
|
||||
|
||||
public:
|
||||
template<typename UInt, size_t W, size_t J, size_t K>
|
||||
friend bool operator==(const additive_lagged_fibonacci_engine<UInt, W, J, K> &x,
|
||||
const additive_lagged_fibonacci_engine<UInt, W, J, K> &y)
|
||||
{
|
||||
return std::equal(x.state, x.state + long_lag, y.state) && x.state1 == y.state1 &&
|
||||
x.state2 == y.state2;
|
||||
}
|
||||
|
||||
template<typename UInt, size_t W, size_t J, size_t K>
|
||||
friend bool operator!=(const additive_lagged_fibonacci_engine<UInt, W, J, K> &x,
|
||||
const additive_lagged_fibonacci_engine<UInt, W, J, K> &y)
|
||||
{ return !(x == y); }
|
||||
|
||||
template<typename UInt, size_t W, size_t J, size_t K, typename CharT, typename Traits>
|
||||
friend std::basic_ostream<CharT, Traits> &
|
||||
operator<<(std::basic_istream<CharT, Traits> &os, additive_lagged_fibonacci_engine<UInt, W, J, K> &x)
|
||||
{
|
||||
using ios_base = typename std::basic_istream<CharT, Traits>::ios_base;
|
||||
|
||||
const typename ios_base::fmtflags flags = os.flags();
|
||||
const CharT fill = os.fill();
|
||||
const CharT space = os.widen(' ');
|
||||
os.flags(ios_base::dec | ios_base::fixed | ios_base::left);
|
||||
os.fill(space);
|
||||
|
||||
for (size_t i = 0; i < long_lag; ++i)
|
||||
os << x.state[i] << space;
|
||||
os << x.state1 << space << x.state2;
|
||||
|
||||
os.flags(flags);
|
||||
os.fill(fill);
|
||||
return os;
|
||||
}
|
||||
|
||||
template<typename UInt, size_t W, size_t J, size_t K, typename CharT, typename Traits>
|
||||
friend std::basic_istream<CharT, Traits> &
|
||||
operator>>(std::basic_istream<CharT, Traits> &is, additive_lagged_fibonacci_engine<UInt, W, J, K> &x)
|
||||
{
|
||||
using ios_base = typename std::basic_istream<CharT, Traits>::ios_base;
|
||||
|
||||
const typename ios_base::fmtflags flags = is.flags();
|
||||
is.flags(ios_base::dec | ios_base::skipws);
|
||||
|
||||
for (size_t i = 0; i < long_lag; ++i)
|
||||
is >> x.state[i];
|
||||
is >> x.state1;
|
||||
is >> x.state2;
|
||||
|
||||
is.flags(flags);
|
||||
return is;
|
||||
}
|
||||
};
|
||||
|
||||
using EQRand = additive_lagged_fibonacci_engine<uint32_t, 30, 24, 55>;
|
||||
};
|
||||
|
||||
+10
-8
@@ -27,16 +27,17 @@ typedef enum {
|
||||
BT_Extraplanar = 6,
|
||||
BT_Magical = 7, //this name might be a bit off,
|
||||
BT_SummonedUndead = 8,
|
||||
BT_RaidGiant = 9,
|
||||
// ...
|
||||
BT_RaidGiant = 9, //Velious era Raid Giant
|
||||
BT_RaidColdain = 10, //Velious era Raid Coldain
|
||||
BT_NoTarget = 11, //no name, can't target this bodytype
|
||||
BT_Vampire = 12,
|
||||
BT_Atenha_Ra = 13,
|
||||
BT_Greater_Akheva = 14,
|
||||
BT_Khati_Sha = 15,
|
||||
BT_Seru = 16, //not confirmed....
|
||||
BT_Seru = 16,
|
||||
BT_Grieg_Veneficus = 17,
|
||||
BT_Draz_Nurakk = 18,
|
||||
BT_Zek = 19,
|
||||
BT_Zek = 19, //"creatures from the Plane of War."
|
||||
BT_Luggald = 20,
|
||||
BT_Animal = 21,
|
||||
BT_Insect = 22,
|
||||
@@ -46,17 +47,18 @@ typedef enum {
|
||||
BT_Dragon = 26,
|
||||
BT_Summoned2 = 27,
|
||||
BT_Summoned3 = 28,
|
||||
//29
|
||||
BT_Dragon2 = 29, //database data indicates this is a dragon type (kunark and DoN?)
|
||||
BT_VeliousDragon = 30, //might not be a tight set
|
||||
// ...
|
||||
BT_Familiar = 31,
|
||||
BT_Dragon3 = 32,
|
||||
BT_Boxes = 33,
|
||||
BT_Muramite = 34, //tribal dudes
|
||||
// ...
|
||||
BT_NoTarget2 = 60,
|
||||
// ...
|
||||
BT_SwarmPet = 63, //is this valid, or made up?
|
||||
// ...
|
||||
BT_SwarmPet = 63, //Looks like weapon proc related temp pets and few misc pets, should not be used for checking swarm pets in general.
|
||||
BT_MonsterSummon = 64,
|
||||
// 65, trap or effect related?
|
||||
BT_InvisMan = 66, //no name, seen on 'InvisMan', can be /targeted
|
||||
BT_Special = 67
|
||||
} bodyType;
|
||||
|
||||
+142
-123
@@ -39,6 +39,7 @@
|
||||
#include "unix.h"
|
||||
#include <netinet/in.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "database.h"
|
||||
@@ -46,6 +47,8 @@
|
||||
#include "extprofile.h"
|
||||
#include "string_util.h"
|
||||
#include "database_schema.h"
|
||||
#include "http/httplib.h"
|
||||
#include "http/uri.h"
|
||||
|
||||
extern Client client;
|
||||
|
||||
@@ -906,6 +909,26 @@ std::string Database::GetNPCNameByID(uint32 npc_id) {
|
||||
return res;
|
||||
}
|
||||
|
||||
std::string Database::GetCleanNPCNameByID(uint32 npc_id) {
|
||||
std::string query = fmt::format("SELECT `name` FROM `npc_types` WHERE id = {}", npc_id);
|
||||
auto results = QueryDatabase(query);
|
||||
std::string res;
|
||||
std::string mob_name;
|
||||
|
||||
if (!results.Success()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
return res;
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
mob_name = row[0];
|
||||
CleanMobName(mob_name.begin(), mob_name.end(), std::back_inserter(res));
|
||||
return res;
|
||||
}
|
||||
|
||||
bool Database::LoadVariables() {
|
||||
auto results = QueryDatabase(StringFormat("SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= %d", varcache.last_update));
|
||||
|
||||
@@ -2021,70 +2044,62 @@ void Database::ClearRaidLeader(uint32 gid, uint32 rid)
|
||||
|
||||
void Database::UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win, bool remove)
|
||||
{
|
||||
|
||||
std::string field;
|
||||
|
||||
switch(theme)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
switch(theme) {
|
||||
case LDoNThemes::GUK: {
|
||||
field = "guk_";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
case LDoNThemes::MIR: {
|
||||
field = "mir_";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
case LDoNThemes::MMC: {
|
||||
field = "mmc_";
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
case LDoNThemes::RUJ: {
|
||||
field = "ruj_";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
case LDoNThemes::TAK: {
|
||||
field = "tak_";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
default: {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (win) {
|
||||
field += "wins";
|
||||
} else {
|
||||
field += "losses";
|
||||
}
|
||||
field += win ? "wins" : "losses";
|
||||
std::string field_operation = remove ? "-" : "+";
|
||||
|
||||
std::string modification;
|
||||
|
||||
if (remove){
|
||||
modification = "-1";
|
||||
} else {
|
||||
modification = "+1";
|
||||
}
|
||||
|
||||
std::string query = StringFormat("UPDATE `adventure_stats` SET %s=%s%s WHERE player_id=%u",field.c_str(), field.c_str(), modification.c_str(), char_id);
|
||||
std::string query = fmt::format(
|
||||
"UPDATE `adventure_stats` SET {} = {} {} 1 WHERE player_id = {}",
|
||||
field,
|
||||
field,
|
||||
field_operation,
|
||||
char_id
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (results.RowsAffected() != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
query = StringFormat("INSERT INTO `adventure_stats` SET %s=1, player_id=%u", field.c_str(), char_id);
|
||||
QueryDatabase(query);
|
||||
if (!remove) {
|
||||
query = fmt::format(
|
||||
"INSERT INTO `adventure_stats` SET {} = 1, player_id = {}",
|
||||
field,
|
||||
char_id
|
||||
);
|
||||
QueryDatabase(query);
|
||||
}
|
||||
}
|
||||
|
||||
bool Database::GetAdventureStats(uint32 char_id, AdventureStats_Struct *as)
|
||||
{
|
||||
std::string query = StringFormat(
|
||||
std::string query = fmt::format(
|
||||
"SELECT "
|
||||
"`guk_wins`, "
|
||||
"`mir_wins`, "
|
||||
@@ -2099,7 +2114,7 @@ bool Database::GetAdventureStats(uint32 char_id, AdventureStats_Struct *as)
|
||||
"FROM "
|
||||
"`adventure_stats` "
|
||||
"WHERE "
|
||||
"player_id = %u ",
|
||||
"player_id = {}",
|
||||
char_id
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
@@ -2181,95 +2196,6 @@ uint32 Database::GetRaidIDByCharID(uint32 character_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param log_settings
|
||||
*/
|
||||
void Database::LoadLogSettings(EQEmuLogSys::LogSettings *log_settings)
|
||||
{
|
||||
std::string query =
|
||||
"SELECT "
|
||||
"log_category_id, "
|
||||
"log_category_description, "
|
||||
"log_to_console, "
|
||||
"log_to_file, "
|
||||
"log_to_gmsay "
|
||||
"FROM "
|
||||
"logsys_categories "
|
||||
"ORDER BY log_category_id";
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
int log_category_id = 0;
|
||||
|
||||
int *categories_in_database = new int[1000];
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
log_category_id = atoi(row[0]);
|
||||
if (log_category_id <= Logs::None || log_category_id >= Logs::MaxCategoryID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
log_settings[log_category_id].log_to_console = static_cast<uint8>(atoi(row[2]));
|
||||
log_settings[log_category_id].log_to_file = static_cast<uint8>(atoi(row[3]));
|
||||
log_settings[log_category_id].log_to_gmsay = static_cast<uint8>(atoi(row[4]));
|
||||
|
||||
/**
|
||||
* Determine if any output method is enabled for the category
|
||||
* and set it to 1 so it can used to check if category is enabled
|
||||
*/
|
||||
const bool log_to_console = log_settings[log_category_id].log_to_console > 0;
|
||||
const bool log_to_file = log_settings[log_category_id].log_to_file > 0;
|
||||
const bool log_to_gmsay = log_settings[log_category_id].log_to_gmsay > 0;
|
||||
const bool is_category_enabled = log_to_console || log_to_file || log_to_gmsay;
|
||||
|
||||
if (is_category_enabled) {
|
||||
log_settings[log_category_id].is_category_enabled = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* This determines whether or not the process needs to actually file log anything.
|
||||
* If we go through this whole loop and nothing is set to any debug level, there is no point to create a file or keep anything open
|
||||
*/
|
||||
if (log_settings[log_category_id].log_to_file > 0) {
|
||||
LogSys.file_logs_enabled = true;
|
||||
}
|
||||
|
||||
categories_in_database[log_category_id] = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto inject categories that don't exist in the database...
|
||||
*/
|
||||
for (int log_index = Logs::AA; log_index != Logs::MaxCategoryID; log_index++) {
|
||||
if (categories_in_database[log_index] != 1) {
|
||||
|
||||
LogInfo(
|
||||
"New Log Category [{0}] doesn't exist... Automatically adding to [logsys_categories] table...",
|
||||
Logs::LogCategoryName[log_index]
|
||||
);
|
||||
|
||||
auto inject_query = fmt::format(
|
||||
"INSERT INTO logsys_categories "
|
||||
"(log_category_id, "
|
||||
"log_category_description, "
|
||||
"log_to_console, "
|
||||
"log_to_file, "
|
||||
"log_to_gmsay) "
|
||||
"VALUES "
|
||||
"({0}, '{1}', {2}, {3}, {4})",
|
||||
log_index,
|
||||
EscapeString(Logs::LogCategoryName[log_index]),
|
||||
std::to_string(log_settings[log_index].log_to_console),
|
||||
std::to_string(log_settings[log_index].log_to_file),
|
||||
std::to_string(log_settings[log_index].log_to_gmsay)
|
||||
);
|
||||
|
||||
QueryDatabase(inject_query);
|
||||
}
|
||||
}
|
||||
|
||||
delete[] categories_in_database;
|
||||
}
|
||||
|
||||
int Database::CountInvSnapshots() {
|
||||
std::string query = StringFormat("SELECT COUNT(*) FROM (SELECT * FROM `inventory_snapshots` a GROUP BY `charid`, `time_index`) b");
|
||||
auto results = QueryDatabase(query);
|
||||
@@ -2347,6 +2273,35 @@ int Database::GetIPExemption(std::string account_ip) {
|
||||
return RuleI(World, MaxClientsPerIP);
|
||||
}
|
||||
|
||||
void Database::SetIPExemption(std::string account_ip, int exemption_amount) {
|
||||
std::string query = fmt::format(
|
||||
"SELECT `exemption_id` FROM `ip_exemptions` WHERE `exemption_ip` = '{}'",
|
||||
account_ip
|
||||
);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
uint32 exemption_id = 0;
|
||||
if (results.Success() && results.RowCount() > 0) {
|
||||
auto row = results.begin();
|
||||
exemption_id = atoi(row[0]);
|
||||
}
|
||||
|
||||
query = fmt::format(
|
||||
"INSERT INTO `ip_exemptions` (`exemption_ip`, `exemption_amount`) VALUES ('{}', {})",
|
||||
account_ip,
|
||||
exemption_amount
|
||||
);
|
||||
|
||||
if (exemption_id != 0) {
|
||||
query = fmt::format(
|
||||
"UPDATE `ip_exemptions` SET `exemption_amount` = {} WHERE `exemption_ip` = '{}'",
|
||||
exemption_amount,
|
||||
account_ip
|
||||
);
|
||||
}
|
||||
QueryDatabase(query);
|
||||
}
|
||||
|
||||
int Database::GetInstanceID(uint32 char_id, uint32 zone_id) {
|
||||
std::string query = StringFormat("SELECT instance_list.id FROM instance_list INNER JOIN instance_list_player ON instance_list.id = instance_list_player.id WHERE instance_list.zone = '%i' AND instance_list_player.charid = '%i'", zone_id, char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
@@ -2497,3 +2452,67 @@ bool Database::CopyCharacter(
|
||||
return true;
|
||||
}
|
||||
|
||||
void Database::SourceDatabaseTableFromUrl(std::string table_name, std::string url)
|
||||
{
|
||||
try {
|
||||
uri request_uri(url);
|
||||
|
||||
LogHTTP(
|
||||
"[SourceDatabaseTableFromUrl] parsing url [{}] path [{}] host [{}] query_string [{}] protocol [{}] port [{}]",
|
||||
url,
|
||||
request_uri.get_path(),
|
||||
request_uri.get_host(),
|
||||
request_uri.get_query(),
|
||||
request_uri.get_scheme(),
|
||||
request_uri.get_port()
|
||||
);
|
||||
|
||||
if (!DoesTableExist(table_name)) {
|
||||
LogMySQLQuery("Table [{}] does not exist. Downloading from Github and installing...", table_name);
|
||||
|
||||
// http get request
|
||||
httplib::Client cli(
|
||||
fmt::format(
|
||||
"{}://{}",
|
||||
request_uri.get_scheme(),
|
||||
request_uri.get_host()
|
||||
).c_str()
|
||||
);
|
||||
|
||||
cli.set_connection_timeout(0, 60000000); // 60 sec
|
||||
cli.set_read_timeout(60, 0); // 60 seconds
|
||||
cli.set_write_timeout(60, 0); // 60 seconds
|
||||
|
||||
int sourced_queries = 0;
|
||||
|
||||
if (auto res = cli.Get(request_uri.get_path().c_str())) {
|
||||
if (res->status == 200) {
|
||||
for (auto &s: SplitString(res->body, ';')) {
|
||||
if (!trim(s).empty()) {
|
||||
auto results = QueryDatabase(s);
|
||||
if (!results.ErrorMessage().empty()) {
|
||||
LogError("Error sourcing SQL [{}]", results.ErrorMessage());
|
||||
return;
|
||||
}
|
||||
sourced_queries++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogError("Error retrieving URL [{}]", url);
|
||||
}
|
||||
|
||||
LogMySQLQuery(
|
||||
"Table [{}] installed. Sourced [{}] queries",
|
||||
table_name,
|
||||
sourced_queries
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::invalid_argument iae) {
|
||||
LogError("[SourceDatabaseTableFromUrl] URI parser error [{}]", iae.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-4
@@ -78,6 +78,7 @@ class PTimerList;
|
||||
|
||||
#define SQL(...) #__VA_ARGS__
|
||||
|
||||
class LogSettings;
|
||||
class Database : public DBcore {
|
||||
public:
|
||||
Database();
|
||||
@@ -140,6 +141,7 @@ public:
|
||||
void GetCharName(uint32 char_id, char* name);
|
||||
std::string GetCharNameByID(uint32 char_id);
|
||||
std::string GetNPCNameByID(uint32 npc_id);
|
||||
std::string GetCleanNPCNameByID(uint32 npc_id);
|
||||
void LoginIP(uint32 AccountID, const char* LoginIP);
|
||||
|
||||
/* Instancing */
|
||||
@@ -174,7 +176,7 @@ public:
|
||||
|
||||
/* Adventure related. */
|
||||
|
||||
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win, bool remove = false);
|
||||
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win = false, bool remove = false);
|
||||
bool GetAdventureStats(uint32 char_id, AdventureStats_Struct *as);
|
||||
|
||||
/* Account Related */
|
||||
@@ -196,7 +198,8 @@ public:
|
||||
void GetAccountFromID(uint32 id, char* oAccountName, int16* oStatus);
|
||||
void SetAgreementFlag(uint32 acctid);
|
||||
|
||||
int GetIPExemption(std::string account_ip);
|
||||
int GetIPExemption(std::string account_ip);
|
||||
void SetIPExemption(std::string account_ip, int exemption_amount);
|
||||
|
||||
int GetInstanceID(uint32 char_id, uint32 zone_id);
|
||||
|
||||
@@ -267,8 +270,8 @@ public:
|
||||
int CountInvSnapshots();
|
||||
void ClearInvSnapshots(bool from_now = false);
|
||||
|
||||
/* EQEmuLogSys */
|
||||
void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings);
|
||||
void SourceDatabaseTableFromUrl(std::string table_name, std::string url);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace DatabaseSchema {
|
||||
{"character_expedition_lockouts", "character_id"},
|
||||
{"character_exp_modifiers", "character_id"},
|
||||
{"character_inspect_messages", "id"},
|
||||
{"character_instance_safereturns", "character_id"},
|
||||
{"character_item_recast", "id"},
|
||||
{"character_languages", "id"},
|
||||
{"character_leadership_abilities", "id"},
|
||||
@@ -64,6 +65,7 @@ namespace DatabaseSchema {
|
||||
{"character_potionbelt", "id"},
|
||||
{"character_skills", "id"},
|
||||
{"character_spells", "id"},
|
||||
{"character_task_timers", "character_id"},
|
||||
{"character_tasks", "charid"},
|
||||
{"character_tribute", "id"},
|
||||
{"completed_tasks", "charid"},
|
||||
@@ -119,6 +121,7 @@ namespace DatabaseSchema {
|
||||
"character_expedition_lockouts",
|
||||
"character_exp_modifiers",
|
||||
"character_inspect_messages",
|
||||
"character_instance_safereturns",
|
||||
"character_item_recast",
|
||||
"character_languages",
|
||||
"character_leadership_abilities",
|
||||
@@ -130,6 +133,7 @@ namespace DatabaseSchema {
|
||||
"character_potionbelt",
|
||||
"character_skills",
|
||||
"character_spells",
|
||||
"character_task_timers",
|
||||
"character_tasks",
|
||||
"character_tribute",
|
||||
"completed_tasks",
|
||||
@@ -217,6 +221,7 @@ namespace DatabaseSchema {
|
||||
"npc_types_tint",
|
||||
"object",
|
||||
"pets",
|
||||
"pets_beastlord_data",
|
||||
"pets_equipmentset",
|
||||
"pets_equipmentset_entries",
|
||||
"proximities",
|
||||
@@ -309,6 +314,9 @@ namespace DatabaseSchema {
|
||||
"banned_ips",
|
||||
"bug_reports",
|
||||
"bugs",
|
||||
"completed_shared_task_activity_state",
|
||||
"completed_shared_task_members",
|
||||
"completed_shared_tasks",
|
||||
"dynamic_zone_members",
|
||||
"dynamic_zones",
|
||||
"eventlog",
|
||||
@@ -318,8 +326,8 @@ namespace DatabaseSchema {
|
||||
"group_id",
|
||||
"group_leaders",
|
||||
"hackers",
|
||||
"ip_exemptions",
|
||||
"instance_list",
|
||||
"ip_exemptions",
|
||||
"item_tick",
|
||||
"lfguild",
|
||||
"merchantlist_temp",
|
||||
@@ -331,6 +339,10 @@ namespace DatabaseSchema {
|
||||
"respawn_times",
|
||||
"saylink",
|
||||
"server_scheduled_events",
|
||||
"shared_task_activity_state",
|
||||
"shared_task_dynamic_zones",
|
||||
"shared_task_members",
|
||||
"shared_tasks",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+216
-47
@@ -5,6 +5,7 @@
|
||||
#include "repositories/instance_list_player_repository.h"
|
||||
#include "rulesys.h"
|
||||
#include "servertalk.h"
|
||||
#include "util/uuid.h"
|
||||
|
||||
DynamicZoneBase::DynamicZoneBase(DynamicZonesRepository::DynamicZoneInstance&& entry)
|
||||
{
|
||||
@@ -13,16 +14,12 @@ DynamicZoneBase::DynamicZoneBase(DynamicZonesRepository::DynamicZoneInstance&& e
|
||||
|
||||
uint32_t DynamicZoneBase::Create()
|
||||
{
|
||||
if (m_id != 0)
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
if (GetInstanceID() == 0)
|
||||
{
|
||||
CreateInstance();
|
||||
}
|
||||
|
||||
m_uuid = EQ::Util::UUID::Generate().ToString();
|
||||
m_id = SaveToDatabase();
|
||||
|
||||
return m_id;
|
||||
@@ -75,6 +72,11 @@ uint32_t DynamicZoneBase::CreateInstance()
|
||||
void DynamicZoneBase::LoadRepositoryResult(DynamicZonesRepository::DynamicZoneInstance&& dz_entry)
|
||||
{
|
||||
m_id = dz_entry.id;
|
||||
m_uuid = std::move(dz_entry.uuid);
|
||||
m_name = std::move(dz_entry.name);
|
||||
m_leader.id = dz_entry.leader_id;
|
||||
m_min_players = dz_entry.min_players;
|
||||
m_max_players = dz_entry.max_players;
|
||||
m_instance_id = dz_entry.instance_id;
|
||||
m_type = static_cast<DynamicZoneType>(dz_entry.type);
|
||||
m_compass.zone_id = dz_entry.compass_zone_id;
|
||||
@@ -104,6 +106,12 @@ void DynamicZoneBase::AddMemberFromRepositoryResult(
|
||||
DynamicZoneMembersRepository::MemberWithName&& entry)
|
||||
{
|
||||
auto status = DynamicZoneMemberStatus::Unknown;
|
||||
|
||||
if (m_leader.id == entry.character_id)
|
||||
{
|
||||
m_leader.name = entry.character_name;
|
||||
}
|
||||
|
||||
AddInternalMember({ entry.character_id, std::move(entry.character_name), status });
|
||||
}
|
||||
|
||||
@@ -114,6 +122,11 @@ uint32_t DynamicZoneBase::SaveToDatabase()
|
||||
if (m_instance_id != 0)
|
||||
{
|
||||
auto insert_dz = DynamicZonesRepository::NewEntity();
|
||||
insert_dz.uuid = m_uuid;
|
||||
insert_dz.name = m_name;
|
||||
insert_dz.leader_id = m_leader.id;
|
||||
insert_dz.min_players = m_min_players;
|
||||
insert_dz.max_players = m_max_players;
|
||||
insert_dz.instance_id = m_instance_id,
|
||||
insert_dz.type = static_cast<int>(m_type);
|
||||
insert_dz.compass_zone_id = m_compass.zone_id;
|
||||
@@ -137,34 +150,80 @@ uint32_t DynamicZoneBase::SaveToDatabase()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DynamicZoneBase::AddCharacter(uint32_t character_id)
|
||||
bool DynamicZoneBase::AddMember(const DynamicZoneMember& add_member)
|
||||
{
|
||||
DynamicZoneMembersRepository::AddMember(GetDatabase(), m_id, character_id);
|
||||
GetDatabase().AddClientToInstance(m_instance_id, character_id);
|
||||
SendInstanceAddRemoveCharacter(character_id, false); // stops client kick timer
|
||||
}
|
||||
|
||||
void DynamicZoneBase::RemoveCharacter(uint32_t character_id)
|
||||
{
|
||||
DynamicZoneMembersRepository::RemoveMember(GetDatabase(), m_id, character_id);
|
||||
GetDatabase().RemoveClientFromInstance(m_instance_id, character_id);
|
||||
SendInstanceAddRemoveCharacter(character_id, true); // start client kick timer
|
||||
}
|
||||
|
||||
void DynamicZoneBase::RemoveAllCharacters(bool enable_removal_timers)
|
||||
{
|
||||
if (GetInstanceID() == 0)
|
||||
if (HasMember(add_member.id))
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enable_removal_timers)
|
||||
DynamicZoneMembersRepository::AddMember(GetDatabase(), m_id, add_member.id);
|
||||
GetDatabase().AddClientToInstance(m_instance_id, add_member.id);
|
||||
|
||||
ProcessMemberAddRemove(add_member, false);
|
||||
SendServerPacket(CreateServerMemberAddRemovePacket(add_member, false).get());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DynamicZoneBase::RemoveMember(uint32_t character_id)
|
||||
{
|
||||
auto remove_member = GetMemberData(character_id);
|
||||
return RemoveMember(remove_member);
|
||||
}
|
||||
|
||||
bool DynamicZoneBase::RemoveMember(const std::string& character_name)
|
||||
{
|
||||
auto remove_member = GetMemberData(character_name);
|
||||
return RemoveMember(remove_member);
|
||||
}
|
||||
|
||||
bool DynamicZoneBase::RemoveMember(const DynamicZoneMember& remove_member)
|
||||
{
|
||||
if (remove_member.id == 0)
|
||||
{
|
||||
SendInstanceRemoveAllCharacters();
|
||||
return false;
|
||||
}
|
||||
|
||||
DynamicZoneMembersRepository::RemoveMember(GetDatabase(), m_id, remove_member.id);
|
||||
GetDatabase().RemoveClientFromInstance(m_instance_id, remove_member.id);
|
||||
|
||||
ProcessMemberAddRemove(remove_member, true);
|
||||
SendServerPacket(CreateServerMemberAddRemovePacket(remove_member, true).get());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DynamicZoneBase::SwapMember(
|
||||
const DynamicZoneMember& add_member, const std::string& remove_char_name)
|
||||
{
|
||||
auto remove_member = GetMemberData(remove_char_name);
|
||||
if (!add_member.IsValid() || !remove_member.IsValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// make remove and add atomic to avoid racing with separate world messages
|
||||
DynamicZoneMembersRepository::RemoveMember(GetDatabase(), m_id, remove_member.id);
|
||||
GetDatabase().RemoveClientFromInstance(m_instance_id, remove_member.id);
|
||||
|
||||
DynamicZoneMembersRepository::AddMember(GetDatabase(), m_id, add_member.id);
|
||||
GetDatabase().AddClientToInstance(m_instance_id, add_member.id);
|
||||
|
||||
ProcessMemberAddRemove(remove_member, true);
|
||||
ProcessMemberAddRemove(add_member, false);
|
||||
SendServerPacket(CreateServerMemberSwapPacket(remove_member, add_member).get());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void DynamicZoneBase::RemoveAllMembers()
|
||||
{
|
||||
DynamicZoneMembersRepository::RemoveAllMembers(GetDatabase(), m_id);
|
||||
GetDatabase().RemoveClientsFromInstance(GetInstanceID());
|
||||
|
||||
ProcessRemoveAllMembers();
|
||||
SendServerPacket(CreateServerRemoveAllMembersPacket().get());
|
||||
}
|
||||
|
||||
void DynamicZoneBase::SaveMembers(const std::vector<DynamicZoneMember>& members)
|
||||
@@ -181,7 +240,6 @@ void DynamicZoneBase::SaveMembers(const std::vector<DynamicZoneMember>& members)
|
||||
DynamicZoneMembersRepository::DynamicZoneMembers member_entry{};
|
||||
member_entry.dynamic_zone_id = m_id;
|
||||
member_entry.character_id = member.id;
|
||||
member_entry.is_current_member = true;
|
||||
insert_members.emplace_back(member_entry);
|
||||
|
||||
InstanceListPlayerRepository::InstanceListPlayer player_entry;
|
||||
@@ -206,7 +264,7 @@ void DynamicZoneBase::SetCompass(const DynamicZoneLocation& location, bool updat
|
||||
DynamicZonesRepository::UpdateCompass(GetDatabase(),
|
||||
m_id, m_compass.zone_id, m_compass.x, m_compass.y, m_compass.z);
|
||||
|
||||
SendGlobalLocationChange(ServerOP_DzSetCompass, location);
|
||||
SendServerPacket(CreateServerDzLocationPacket(ServerOP_DzSetCompass, location).get());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +285,7 @@ void DynamicZoneBase::SetSafeReturn(const DynamicZoneLocation& location, bool up
|
||||
DynamicZonesRepository::UpdateSafeReturn(GetDatabase(), m_id, m_safereturn.zone_id,
|
||||
m_safereturn.x, m_safereturn.y, m_safereturn.z, m_safereturn.heading);
|
||||
|
||||
SendGlobalLocationChange(ServerOP_DzSetSafeReturn, location);
|
||||
SendServerPacket(CreateServerDzLocationPacket(ServerOP_DzSetSafeReturn, location).get());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +307,7 @@ void DynamicZoneBase::SetZoneInLocation(const DynamicZoneLocation& location, boo
|
||||
DynamicZonesRepository::UpdateZoneIn(GetDatabase(), m_id, m_zone_id,
|
||||
m_zonein.x, m_zonein.y, m_zonein.z, m_zonein.heading, m_has_zonein);
|
||||
|
||||
SendGlobalLocationChange(ServerOP_DzSetZoneIn, location);
|
||||
SendServerPacket(CreateServerDzLocationPacket(ServerOP_DzSetZoneIn, location).get());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,35 +316,71 @@ void DynamicZoneBase::SetZoneInLocation(float x, float y, float z, float heading
|
||||
SetZoneInLocation({ 0, x, y, z, heading }, update_db);
|
||||
}
|
||||
|
||||
void DynamicZoneBase::SetLeader(const DynamicZoneMember& new_leader, bool update_db)
|
||||
{
|
||||
m_leader = new_leader;
|
||||
|
||||
if (update_db)
|
||||
{
|
||||
DynamicZonesRepository::UpdateLeaderID(GetDatabase(), m_id, new_leader.id);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t DynamicZoneBase::GetSecondsRemaining() const
|
||||
{
|
||||
auto remaining = std::chrono::duration_cast<std::chrono::seconds>(GetDurationRemaining()).count();
|
||||
return std::max(0, static_cast<int>(remaining));
|
||||
}
|
||||
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerAddRemoveCharacterPacket(
|
||||
uint32_t character_id, bool removed)
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerMemberAddRemovePacket(
|
||||
const DynamicZoneMember& member, bool removed)
|
||||
{
|
||||
constexpr uint32_t pack_size = sizeof(ServerDzCharacter_Struct);
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzAddRemoveCharacter, pack_size);
|
||||
auto buf = reinterpret_cast<ServerDzCharacter_Struct*>(pack->pBuffer);
|
||||
buf->zone_id = GetZoneID();
|
||||
buf->instance_id = GetInstanceID();
|
||||
buf->remove = removed;
|
||||
buf->character_id = character_id;
|
||||
constexpr uint32_t pack_size = sizeof(ServerDzMember_Struct);
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzAddRemoveMember, pack_size);
|
||||
auto buf = reinterpret_cast<ServerDzMember_Struct*>(pack->pBuffer);
|
||||
buf->dz_id = GetID();
|
||||
buf->dz_zone_id = GetZoneID();
|
||||
buf->dz_instance_id = GetInstanceID();
|
||||
buf->sender_zone_id = GetCurrentZoneID();
|
||||
buf->sender_instance_id = GetCurrentInstanceID();
|
||||
buf->removed = removed;
|
||||
buf->character_id = member.id;
|
||||
buf->character_status = static_cast<uint8_t>(member.status);
|
||||
strn0cpy(buf->character_name, member.name.c_str(), sizeof(buf->character_name));
|
||||
|
||||
return pack;
|
||||
}
|
||||
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerRemoveAllCharactersPacket()
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerMemberSwapPacket(
|
||||
const DynamicZoneMember& remove_member, const DynamicZoneMember& add_member)
|
||||
{
|
||||
constexpr uint32_t pack_size = sizeof(ServerDzCharacter_Struct);
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzRemoveAllCharacters, pack_size);
|
||||
auto buf = reinterpret_cast<ServerDzCharacter_Struct*>(pack->pBuffer);
|
||||
buf->zone_id = GetZoneID();
|
||||
buf->instance_id = GetInstanceID();
|
||||
buf->remove = true;
|
||||
buf->character_id = 0;
|
||||
constexpr uint32_t pack_size = sizeof(ServerDzMemberSwap_Struct);
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzSwapMembers, pack_size);
|
||||
auto buf = reinterpret_cast<ServerDzMemberSwap_Struct*>(pack->pBuffer);
|
||||
buf->dz_id = GetID();
|
||||
buf->dz_zone_id = GetZoneID();
|
||||
buf->dz_instance_id = GetInstanceID();
|
||||
buf->sender_zone_id = GetCurrentZoneID();
|
||||
buf->sender_instance_id = GetCurrentInstanceID();
|
||||
buf->add_character_status = static_cast<uint8_t>(add_member.status);
|
||||
buf->add_character_id = add_member.id;
|
||||
buf->remove_character_id = remove_member.id;
|
||||
strn0cpy(buf->add_character_name, add_member.name.c_str(), sizeof(buf->add_character_name));
|
||||
strn0cpy(buf->remove_character_name, remove_member.name.c_str(), sizeof(buf->remove_character_name));
|
||||
|
||||
return pack;
|
||||
}
|
||||
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerRemoveAllMembersPacket()
|
||||
{
|
||||
constexpr uint32_t pack_size = sizeof(ServerDzID_Struct);
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzRemoveAllMembers, pack_size);
|
||||
auto buf = reinterpret_cast<ServerDzID_Struct*>(pack->pBuffer);
|
||||
buf->dz_id = GetID();
|
||||
buf->dz_zone_id = GetZoneID();
|
||||
buf->dz_instance_id = GetInstanceID();
|
||||
buf->sender_zone_id = GetCurrentZoneID();
|
||||
buf->sender_instance_id = GetCurrentInstanceID();
|
||||
|
||||
return pack;
|
||||
}
|
||||
@@ -309,10 +403,25 @@ std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerDzLocationPacket(
|
||||
return pack;
|
||||
}
|
||||
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerMemberStatusPacket(
|
||||
uint32_t character_id, DynamicZoneMemberStatus status)
|
||||
{
|
||||
constexpr uint32_t pack_size = sizeof(ServerDzMemberStatus_Struct);
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzUpdateMemberStatus, pack_size);
|
||||
auto buf = reinterpret_cast<ServerDzMemberStatus_Struct*>(pack->pBuffer);
|
||||
buf->dz_id = GetID();
|
||||
buf->sender_zone_id = GetCurrentZoneID();
|
||||
buf->sender_instance_id = GetCurrentInstanceID();
|
||||
buf->status = static_cast<uint8_t>(status);
|
||||
buf->character_id = character_id;
|
||||
|
||||
return pack;
|
||||
}
|
||||
|
||||
uint32_t DynamicZoneBase::GetDatabaseMemberCount()
|
||||
{
|
||||
return DynamicZoneMembersRepository::GetCountWhere(GetDatabase(),
|
||||
fmt::format("dynamic_zone_id = {} AND is_current_member = TRUE", m_id));
|
||||
fmt::format("dynamic_zone_id = {}", m_id));
|
||||
}
|
||||
|
||||
bool DynamicZoneBase::HasDatabaseMember(uint32_t character_id)
|
||||
@@ -323,7 +432,7 @@ bool DynamicZoneBase::HasDatabaseMember(uint32_t character_id)
|
||||
}
|
||||
|
||||
auto entries = DynamicZoneMembersRepository::GetWhere(GetDatabase(), fmt::format(
|
||||
"dynamic_zone_id = {} AND character_id = {} AND is_current_member = TRUE",
|
||||
"dynamic_zone_id = {} AND character_id = {}",
|
||||
m_id, character_id
|
||||
));
|
||||
|
||||
@@ -411,6 +520,33 @@ bool DynamicZoneBase::SetInternalMemberStatus(uint32_t character_id, DynamicZone
|
||||
return false;
|
||||
}
|
||||
|
||||
void DynamicZoneBase::SetMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status)
|
||||
{
|
||||
auto update_member = GetMemberData(character_id);
|
||||
if (update_member.IsValid())
|
||||
{
|
||||
ProcessMemberStatusChange(character_id, status);
|
||||
SendServerPacket(CreateServerMemberStatusPacket(character_id, status).get());
|
||||
}
|
||||
}
|
||||
|
||||
void DynamicZoneBase::ProcessMemberAddRemove(const DynamicZoneMember& member, bool removed)
|
||||
{
|
||||
if (!removed)
|
||||
{
|
||||
AddInternalMember(member);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveInternalMember(member.id);
|
||||
}
|
||||
}
|
||||
|
||||
bool DynamicZoneBase::ProcessMemberStatusChange(uint32_t character_id, DynamicZoneMemberStatus status)
|
||||
{
|
||||
return SetInternalMemberStatus(character_id, status);
|
||||
}
|
||||
|
||||
std::string DynamicZoneBase::GetDynamicZoneTypeName(DynamicZoneType dz_type)
|
||||
{
|
||||
switch (dz_type)
|
||||
@@ -428,3 +564,36 @@ std::string DynamicZoneBase::GetDynamicZoneTypeName(DynamicZoneType dz_type)
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
EQ::Net::DynamicPacket DynamicZoneBase::GetSerializedDzPacket()
|
||||
{
|
||||
EQ::Net::DynamicPacket dyn_pack;
|
||||
dyn_pack.PutSerialize(0, *this);
|
||||
|
||||
LogDynamicZonesDetail("Serialized server dz size [{}]", dyn_pack.Length());
|
||||
return dyn_pack;
|
||||
}
|
||||
|
||||
std::unique_ptr<ServerPacket> DynamicZoneBase::CreateServerDzCreatePacket(
|
||||
uint16_t origin_zone_id, uint16_t origin_instance_id)
|
||||
{
|
||||
EQ::Net::DynamicPacket dyn_pack = GetSerializedDzPacket();
|
||||
|
||||
auto pack_size = sizeof(ServerDzCreateSerialized_Struct) + dyn_pack.Length();
|
||||
auto pack = std::make_unique<ServerPacket>(ServerOP_DzCreated, static_cast<uint32_t>(pack_size));
|
||||
auto buf = reinterpret_cast<ServerDzCreateSerialized_Struct*>(pack->pBuffer);
|
||||
buf->origin_zone_id = origin_zone_id;
|
||||
buf->origin_instance_id = origin_instance_id;
|
||||
buf->cereal_size = static_cast<uint32_t>(dyn_pack.Length());
|
||||
memcpy(buf->cereal_data, dyn_pack.Data(), dyn_pack.Length());
|
||||
|
||||
return pack;
|
||||
}
|
||||
|
||||
void DynamicZoneBase::LoadSerializedDzPacket(char* cereal_data, uint32_t cereal_size)
|
||||
{
|
||||
LogDynamicZonesDetail("Deserializing server dz size [{}]", cereal_size);
|
||||
EQ::Util::MemoryStreamReader ss(cereal_data, cereal_size);
|
||||
cereal::BinaryInputArchive archive(ss);
|
||||
archive(*this);
|
||||
}
|
||||
|
||||
+72
-15
@@ -2,6 +2,7 @@
|
||||
#define COMMON_DYNAMIC_ZONE_BASE_H
|
||||
|
||||
#include "eq_constants.h"
|
||||
#include "net/packet.h"
|
||||
#include "repositories/dynamic_zones_repository.h"
|
||||
#include "repositories/dynamic_zone_members_repository.h"
|
||||
#include <algorithm>
|
||||
@@ -18,7 +19,7 @@ struct DynamicZoneMember
|
||||
{
|
||||
uint32_t id = 0;
|
||||
std::string name;
|
||||
DynamicZoneMemberStatus status = DynamicZoneMemberStatus::Online;
|
||||
DynamicZoneMemberStatus status = DynamicZoneMemberStatus::Unknown;
|
||||
|
||||
DynamicZoneMember() = default;
|
||||
DynamicZoneMember(uint32_t id, std::string name_)
|
||||
@@ -29,6 +30,12 @@ struct DynamicZoneMember
|
||||
bool IsOnline() const { return status == DynamicZoneMemberStatus::Online ||
|
||||
status == DynamicZoneMemberStatus::InDynamicZone; }
|
||||
bool IsValid() const { return id != 0 && !name.empty(); }
|
||||
|
||||
template<class Archive>
|
||||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(id, name, status);
|
||||
}
|
||||
};
|
||||
|
||||
struct DynamicZoneLocation
|
||||
@@ -42,6 +49,12 @@ struct DynamicZoneLocation
|
||||
DynamicZoneLocation() = default;
|
||||
DynamicZoneLocation(uint32_t zone_id_, float x_, float y_, float z_, float heading_)
|
||||
: zone_id(zone_id_), x(x_), y(y_), z(z_), heading(heading_) {}
|
||||
|
||||
template<class Archive>
|
||||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(zone_id, x, y, z, heading);
|
||||
}
|
||||
};
|
||||
|
||||
class DynamicZoneBase
|
||||
@@ -64,6 +77,7 @@ public:
|
||||
uint64_t GetExpireTime() const { return std::chrono::system_clock::to_time_t(m_expire_time); }
|
||||
uint32_t GetID() const { return m_id; }
|
||||
uint16_t GetInstanceID() const { return static_cast<uint16_t>(m_instance_id); }
|
||||
uint32_t GetLeaderID() const { return m_leader.id; }
|
||||
uint32_t GetMaxPlayers() const { return m_max_players; }
|
||||
uint32_t GetMemberCount() const { return static_cast<uint32_t>(m_members.size()); }
|
||||
uint32_t GetMinPlayers() const { return m_min_players; }
|
||||
@@ -74,6 +88,7 @@ public:
|
||||
DynamicZoneType GetType() const { return m_type; }
|
||||
const std::string& GetLeaderName() const { return m_leader.name; }
|
||||
const std::string& GetName() const { return m_name; }
|
||||
const std::string& GetUUID() const { return m_uuid; }
|
||||
const DynamicZoneMember& GetLeader() const { return m_leader; }
|
||||
const std::vector<DynamicZoneMember>& GetMembers() const { return m_members; }
|
||||
const DynamicZoneLocation& GetCompassLocation() const { return m_compass; }
|
||||
@@ -81,14 +96,12 @@ public:
|
||||
const DynamicZoneLocation& GetZoneInLocation() const { return m_zonein; }
|
||||
std::chrono::system_clock::duration GetDurationRemaining() const { return m_expire_time - std::chrono::system_clock::now(); }
|
||||
|
||||
void AddCharacter(uint32_t character_id);
|
||||
void AddInternalMember(const DynamicZoneMember& member);
|
||||
bool AddMember(const DynamicZoneMember& add_member);
|
||||
void AddMemberFromRepositoryResult(DynamicZoneMembersRepository::MemberWithName&& entry);
|
||||
void ClearInternalMembers() { m_members.clear(); }
|
||||
uint32_t Create();
|
||||
uint32_t GetDatabaseMemberCount();
|
||||
DynamicZoneMember GetMemberData(uint32_t character_id);
|
||||
DynamicZoneMember GetMemberData(const std::string& character_name);
|
||||
EQ::Net::DynamicPacket GetSerializedDzPacket();
|
||||
bool HasDatabaseMember(uint32_t character_id);
|
||||
bool HasMember(uint32_t character_id);
|
||||
bool HasMember(const std::string& character_name);
|
||||
@@ -98,38 +111,52 @@ public:
|
||||
bool IsInstanceID(uint32_t instance_id) const { return (m_instance_id != 0 && m_instance_id == instance_id); }
|
||||
bool IsValid() const { return m_instance_id != 0; }
|
||||
bool IsSameDz(uint32_t zone_id, uint32_t instance_id) const { return zone_id == m_zone_id && instance_id == m_instance_id; }
|
||||
void RemoveAllCharacters(bool enable_removal_timers = true);
|
||||
void RemoveCharacter(uint32_t character_id);
|
||||
void RemoveInternalMember(uint32_t character_id);
|
||||
void LoadSerializedDzPacket(char* cereal_data, uint32_t cereal_size);
|
||||
void RemoveAllMembers();
|
||||
bool RemoveMember(uint32_t character_id);
|
||||
bool RemoveMember(const std::string& character_name);
|
||||
bool RemoveMember(const DynamicZoneMember& remove_member);
|
||||
void SaveMembers(const std::vector<DynamicZoneMember>& members);
|
||||
void SetCompass(const DynamicZoneLocation& location, bool update_db = false);
|
||||
void SetCompass(uint32_t zone_id, float x, float y, float z, bool update_db = false);
|
||||
bool SetInternalMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status);
|
||||
void SetLeader(const DynamicZoneMember& leader) { m_leader = leader; }
|
||||
void SetDuration(uint32_t seconds) { m_duration = std::chrono::seconds(seconds); }
|
||||
void SetLeader(const DynamicZoneMember& leader, bool update_db = false);
|
||||
void SetMaxPlayers(uint32_t max_players) { m_max_players = max_players; }
|
||||
void SetMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status);
|
||||
void SetMinPlayers(uint32_t min_players) { m_min_players = min_players; }
|
||||
void SetName(const std::string& name) { m_name = name; }
|
||||
void SetSafeReturn(const DynamicZoneLocation& location, bool update_db = false);
|
||||
void SetSafeReturn(uint32_t zone_id, float x, float y, float z, float heading, bool update_db = false);
|
||||
void SetType(DynamicZoneType type) { m_type = type; }
|
||||
void SetUUID(std::string uuid) { m_uuid = std::move(uuid); }
|
||||
void SetZoneInLocation(const DynamicZoneLocation& location, bool update_db = false);
|
||||
void SetZoneInLocation(float x, float y, float z, float heading, bool update_db = false);
|
||||
bool SwapMember(const DynamicZoneMember& add_member, const std::string& remove_char_name);
|
||||
|
||||
protected:
|
||||
virtual uint16_t GetCurrentInstanceID() { return 0; }
|
||||
virtual uint16_t GetCurrentZoneID() { return 0; }
|
||||
virtual Database& GetDatabase() = 0;
|
||||
virtual void ProcessCompassChange(const DynamicZoneLocation& location) { m_compass = location; }
|
||||
virtual void SendInstanceAddRemoveCharacter(uint32_t character_id, bool remove) = 0;
|
||||
virtual void SendInstanceRemoveAllCharacters() = 0;
|
||||
virtual void SendGlobalLocationChange(uint16_t server_opcode, const DynamicZoneLocation& location) = 0;
|
||||
virtual void ProcessMemberAddRemove(const DynamicZoneMember& member, bool removed);
|
||||
virtual bool ProcessMemberStatusChange(uint32_t member_id, DynamicZoneMemberStatus status);
|
||||
virtual void ProcessRemoveAllMembers(bool silent = false) { m_members.clear(); }
|
||||
virtual bool SendServerPacket(ServerPacket* packet) = 0;
|
||||
|
||||
void AddInternalMember(const DynamicZoneMember& member);
|
||||
uint32_t Create();
|
||||
uint32_t CreateInstance();
|
||||
void LoadRepositoryResult(DynamicZonesRepository::DynamicZoneInstance&& dz_entry);
|
||||
void RemoveInternalMember(uint32_t character_id);
|
||||
uint32_t SaveToDatabase();
|
||||
bool SetInternalMemberStatus(uint32_t character_id, DynamicZoneMemberStatus status);
|
||||
|
||||
std::unique_ptr<ServerPacket> CreateServerAddRemoveCharacterPacket(uint32_t character_id, bool removed);
|
||||
std::unique_ptr<ServerPacket> CreateServerRemoveAllCharactersPacket();
|
||||
std::unique_ptr<ServerPacket> CreateServerDzCreatePacket(uint16_t origin_zone_id, uint16_t origin_instance_id);
|
||||
std::unique_ptr<ServerPacket> CreateServerDzLocationPacket(uint16_t server_opcode, const DynamicZoneLocation& location);
|
||||
std::unique_ptr<ServerPacket> CreateServerMemberAddRemovePacket(const DynamicZoneMember& member, bool removed);
|
||||
std::unique_ptr<ServerPacket> CreateServerMemberStatusPacket(uint32_t character_id, DynamicZoneMemberStatus status);
|
||||
std::unique_ptr<ServerPacket> CreateServerMemberSwapPacket(const DynamicZoneMember& remove_member, const DynamicZoneMember& add_member);
|
||||
std::unique_ptr<ServerPacket> CreateServerRemoveAllMembersPacket();
|
||||
|
||||
uint32_t m_id = 0;
|
||||
uint32_t m_zone_id = 0;
|
||||
@@ -139,7 +166,9 @@ protected:
|
||||
uint32_t m_max_players = 0;
|
||||
bool m_never_expires = false;
|
||||
bool m_has_zonein = false;
|
||||
bool m_has_member_statuses = false;
|
||||
std::string m_name;
|
||||
std::string m_uuid;
|
||||
DynamicZoneMember m_leader;
|
||||
DynamicZoneType m_type{ DynamicZoneType::None };
|
||||
DynamicZoneLocation m_compass;
|
||||
@@ -149,6 +178,34 @@ protected:
|
||||
std::chrono::time_point<std::chrono::system_clock> m_start_time;
|
||||
std::chrono::time_point<std::chrono::system_clock> m_expire_time;
|
||||
std::vector<DynamicZoneMember> m_members;
|
||||
|
||||
public:
|
||||
template<class Archive>
|
||||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
m_id,
|
||||
m_zone_id,
|
||||
m_instance_id,
|
||||
m_zone_version,
|
||||
m_min_players,
|
||||
m_max_players,
|
||||
m_never_expires,
|
||||
m_has_zonein,
|
||||
m_has_member_statuses,
|
||||
m_name,
|
||||
m_uuid,
|
||||
m_leader,
|
||||
m_type,
|
||||
m_compass,
|
||||
m_safereturn,
|
||||
m_zonein,
|
||||
m_duration,
|
||||
m_start_time,
|
||||
m_expire_time,
|
||||
m_members
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "emu_constants.h"
|
||||
#include "languages.h"
|
||||
|
||||
|
||||
int16 EQ::invtype::GetInvTypeSize(int16 inv_type) {
|
||||
@@ -152,3 +153,47 @@ int EQ::constants::ConvertStanceTypeToIndex(StanceType stance_type) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const std::map<int, std::string>& EQ::constants::GetLanguageMap()
|
||||
{
|
||||
static const std::map<int, std::string> language_map = {
|
||||
{ LANG_COMMON_TONGUE, "Common Tongue" },
|
||||
{ LANG_BARBARIAN, "Barbarian" },
|
||||
{ LANG_ERUDIAN, "Erudian" },
|
||||
{ LANG_ELVISH, "Elvish" },
|
||||
{ LANG_DARK_ELVISH, "Dark Elvish" },
|
||||
{ LANG_DWARVISH, "Dwarvish" },
|
||||
{ LANG_TROLL, "Troll" },
|
||||
{ LANG_OGRE, "Ogre" },
|
||||
{ LANG_GNOMISH, "Gnomish" },
|
||||
{ LANG_HALFLING, "Halfling" },
|
||||
{ LANG_THIEVES_CANT, "Thieves Cant" },
|
||||
{ LANG_OLD_ERUDIAN, "Old Erudian" },
|
||||
{ LANG_ELDER_ELVISH, "Elder Elvish" },
|
||||
{ LANG_FROGLOK, "Froglok" },
|
||||
{ LANG_GOBLIN, "Goblin" },
|
||||
{ LANG_GNOLL, "Gnoll" },
|
||||
{ LANG_COMBINE_TONGUE, "Combine Tongue" },
|
||||
{ LANG_ELDER_TEIRDAL, "Elder Teirdal" },
|
||||
{ LANG_LIZARDMAN, "Lizardman" },
|
||||
{ LANG_ORCISH, "Orcish" },
|
||||
{ LANG_FAERIE, "Faerie" },
|
||||
{ LANG_DRAGON, "Dragon" },
|
||||
{ LANG_ELDER_DRAGON, "Elder Dragon" },
|
||||
{ LANG_DARK_SPEECH, "Dark Speech" },
|
||||
{ LANG_VAH_SHIR, "Vah Shir" },
|
||||
{ LANG_ALARAN, "Alaran" },
|
||||
{ LANG_HADAL, "Hadal" },
|
||||
{ LANG_UNKNOWN, "Unknown" }
|
||||
};
|
||||
return language_map;
|
||||
}
|
||||
|
||||
std::string EQ::constants::GetLanguageName(int language_id)
|
||||
{
|
||||
if (language_id >= LANG_COMMON_TONGUE && language_id <= LANG_UNKNOWN) {
|
||||
auto languages = EQ::constants::GetLanguageMap();
|
||||
return languages[language_id];
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
|
||||
@@ -223,6 +223,9 @@ namespace EQ
|
||||
const char *GetStanceName(StanceType stance_type);
|
||||
int ConvertStanceTypeToIndex(StanceType stance_type);
|
||||
|
||||
extern const std::map<int, std::string>& GetLanguageMap();
|
||||
std::string GetLanguageName(int language_id);
|
||||
|
||||
const int STANCE_TYPE_FIRST = stancePassive;
|
||||
const int STANCE_TYPE_LAST = stanceBurnAE;
|
||||
const int STANCE_TYPE_COUNT = stanceBurnAE;
|
||||
|
||||
+16
-2
@@ -355,7 +355,6 @@ N(OP_OpenContainer),
|
||||
N(OP_OpenDiscordMerchant),
|
||||
N(OP_OpenGuildTributeMaster),
|
||||
N(OP_OpenInventory),
|
||||
N(OP_OpenNewTasksWindow),
|
||||
N(OP_OpenTributeMaster),
|
||||
N(OP_PDeletePetition),
|
||||
N(OP_PetBuffWindow),
|
||||
@@ -464,6 +463,19 @@ N(OP_SetServerFilter),
|
||||
N(OP_SetStartCity),
|
||||
N(OP_SetTitle),
|
||||
N(OP_SetTitleReply),
|
||||
N(OP_SharedTaskMemberList),
|
||||
N(OP_SharedTaskAddPlayer),
|
||||
N(OP_SharedTaskRemovePlayer),
|
||||
N(OP_SharedTaskMakeLeader),
|
||||
N(OP_SharedTaskMemberInvite),
|
||||
N(OP_SharedTaskInvite),
|
||||
N(OP_SharedTaskInviteResponse),
|
||||
N(OP_SharedTaskAcceptNew),
|
||||
N(OP_SharedTaskMemberChange),
|
||||
N(OP_SharedTaskPlayerList),
|
||||
N(OP_SharedTaskSelectWindow),
|
||||
N(OP_SharedTaskQuit),
|
||||
N(OP_TaskTimers),
|
||||
N(OP_Shielding),
|
||||
N(OP_ShopDelItem),
|
||||
N(OP_ShopEnd),
|
||||
@@ -499,7 +511,8 @@ N(OP_TaskActivityComplete),
|
||||
N(OP_TaskDescription),
|
||||
N(OP_TaskHistoryReply),
|
||||
N(OP_TaskHistoryRequest),
|
||||
N(OP_TaskMemberList),
|
||||
N(OP_TaskRequestTimer),
|
||||
N(OP_TaskSelectWindow),
|
||||
N(OP_Taunt),
|
||||
N(OP_TestBuff),
|
||||
N(OP_TGB),
|
||||
@@ -567,4 +580,5 @@ N(OP_ZoneServerReady),
|
||||
N(OP_ZoneSpawns),
|
||||
N(OP_ZoneUnavail),
|
||||
N(OP_ResetAA),
|
||||
N(OP_UnderWorld),
|
||||
// mail and chat opcodes located in ../mail_oplist.h
|
||||
|
||||
+525
-6
@@ -65,6 +65,7 @@
|
||||
#define AT_FindBits 46 // set FindBits, whatever those are!
|
||||
#define AT_TextureType 48 // TextureType
|
||||
#define AT_FacePick 49 // Turns off face pick window? maybe ...
|
||||
#define AT_AntiCheat 51 // sent by the client randomly telling the server how long since last action has occured
|
||||
#define AT_GuildShow 52 // this is what MQ2 call sit, not sure
|
||||
#define AT_Offline 53 // Offline mode
|
||||
|
||||
@@ -197,6 +198,492 @@ namespace Chat {
|
||||
const uint16 Stun = 340;
|
||||
};
|
||||
|
||||
// generation SQL:
|
||||
// SELECT CONCAT(' constexpr uint16 ', UPPER(short_name), ' = ' , zoneidnumber, '; // ', long_name) from zone group by zoneidnumber ORDER BY zoneidnumber;
|
||||
namespace Zones {
|
||||
constexpr uint16 QEYNOS = 1; // South Qeynos
|
||||
constexpr uint16 QEYNOS2 = 2; // North Qeynos
|
||||
constexpr uint16 QRG = 3; // The Surefall Glade
|
||||
constexpr uint16 QEYTOQRG = 4; // The Qeynos Hills
|
||||
constexpr uint16 HIGHPASS = 5; // Highpass Hold
|
||||
constexpr uint16 HIGHKEEP = 6; // High Keep
|
||||
constexpr uint16 FREPORTN = 8; // North Freeport
|
||||
constexpr uint16 FREPORTW = 9; // West Freeport
|
||||
constexpr uint16 FREPORTE = 10; // East Freeport
|
||||
constexpr uint16 RUNNYEYE = 11; // The Liberated Citadel of Runnyeye
|
||||
constexpr uint16 QEY2HH1 = 12; // The Western Plains of Karana
|
||||
constexpr uint16 NORTHKARANA = 13; // The Northern Plains of Karana
|
||||
constexpr uint16 SOUTHKARANA = 14; // The Southern Plains of Karana
|
||||
constexpr uint16 EASTKARANA = 15; // Eastern Plains of Karana
|
||||
constexpr uint16 BEHOLDER = 16; // Gorge of King Xorbb
|
||||
constexpr uint16 BLACKBURROW = 17; // Blackburrow
|
||||
constexpr uint16 PAW = 18; // The Lair of the Splitpaw
|
||||
constexpr uint16 RIVERVALE = 19; // Rivervale
|
||||
constexpr uint16 KITHICOR = 20; // Kithicor Forest
|
||||
constexpr uint16 COMMONS = 21; // West Commonlands
|
||||
constexpr uint16 ECOMMONS = 22; // East Commonlands
|
||||
constexpr uint16 ERUDNINT = 23; // The Erudin Palace
|
||||
constexpr uint16 ERUDNEXT = 24; // Erudin
|
||||
constexpr uint16 NEKTULOS = 25; // The Nektulos Forest
|
||||
constexpr uint16 CSHOME = 26; // Sunset Home
|
||||
constexpr uint16 LAVASTORM = 27; // The Lavastorm Mountains
|
||||
constexpr uint16 NEKTROPOS = 28; // Nektropos
|
||||
constexpr uint16 HALAS = 29; // Halas
|
||||
constexpr uint16 EVERFROST = 30; // Everfrost Peaks
|
||||
constexpr uint16 SOLDUNGA = 31; // Solusek's Eye
|
||||
constexpr uint16 SOLDUNGB = 32; // Nagafen's Lair
|
||||
constexpr uint16 MISTY = 33; // Misty Thicket
|
||||
constexpr uint16 NRO = 34; // Northern Desert of Ro
|
||||
constexpr uint16 SRO = 35; // Southern Desert of Ro
|
||||
constexpr uint16 BEFALLEN = 36; // Befallen
|
||||
constexpr uint16 OASIS = 37; // Oasis of Marr
|
||||
constexpr uint16 TOX = 38; // Toxxulia Forest
|
||||
constexpr uint16 HOLE = 39; // The Hole
|
||||
constexpr uint16 NERIAKA = 40; // Neriak - Foreign Quarter
|
||||
constexpr uint16 NERIAKB = 41; // Neriak - Commons
|
||||
constexpr uint16 NERIAKC = 42; // Neriak - 3rd Gate
|
||||
constexpr uint16 NERIAKD = 43; // Neriak Palace
|
||||
constexpr uint16 NAJENA = 44; // Najena
|
||||
constexpr uint16 QCAT = 45; // The Qeynos Aqueduct System
|
||||
constexpr uint16 INNOTHULE = 46; // Innothule Swamp
|
||||
constexpr uint16 FEERROTT = 47; // The Feerrott
|
||||
constexpr uint16 CAZICTHULE = 48; // Accursed Temple of CazicThule
|
||||
constexpr uint16 OGGOK = 49; // Oggok
|
||||
constexpr uint16 RATHEMTN = 50; // The Rathe Mountains
|
||||
constexpr uint16 LAKERATHE = 51; // Lake Rathetear
|
||||
constexpr uint16 GROBB = 52; // Grobb
|
||||
constexpr uint16 AVIAK = 53; // Aviak Village
|
||||
constexpr uint16 GFAYDARK = 54; // The Greater Faydark
|
||||
constexpr uint16 AKANON = 55; // Ak'Anon
|
||||
constexpr uint16 STEAMFONT = 56; // Steamfont Mountains
|
||||
constexpr uint16 LFAYDARK = 57; // The Lesser Faydark
|
||||
constexpr uint16 CRUSHBONE = 58; // Crushbone
|
||||
constexpr uint16 MISTMOORE = 59; // The Castle of Mistmoore
|
||||
constexpr uint16 KALADIMA = 60; // South Kaladim
|
||||
constexpr uint16 FELWITHEA = 61; // Northern Felwithe
|
||||
constexpr uint16 FELWITHEB = 62; // Southern Felwithe
|
||||
constexpr uint16 UNREST = 63; // The Estate of Unrest
|
||||
constexpr uint16 KEDGE = 64; // Kedge Keep
|
||||
constexpr uint16 GUKTOP = 65; // The City of Guk
|
||||
constexpr uint16 GUKBOTTOM = 66; // The Ruins of Old Guk
|
||||
constexpr uint16 KALADIMB = 67; // North Kaladim
|
||||
constexpr uint16 BUTCHER = 68; // Butcherblock Mountains
|
||||
constexpr uint16 OOT = 69; // Ocean of Tears
|
||||
constexpr uint16 CAULDRON = 70; // Dagnor's Cauldron
|
||||
constexpr uint16 AIRPLANE = 71; // The Plane of Sky
|
||||
constexpr uint16 FEARPLANE = 72; // The Plane of Fear
|
||||
constexpr uint16 PERMAFROST = 73; // The Permafrost Caverns
|
||||
constexpr uint16 KERRARIDGE = 74; // Kerra Isle
|
||||
constexpr uint16 PAINEEL = 75; // Paineel
|
||||
constexpr uint16 HATEPLANE = 76; // Plane of Hate
|
||||
constexpr uint16 ARENA = 77; // The Arena
|
||||
constexpr uint16 FIELDOFBONE = 78; // The Field of Bone
|
||||
constexpr uint16 WARSLIKSWOOD = 79; // The Warsliks Woods
|
||||
constexpr uint16 SOLTEMPLE = 80; // The Temple of Solusek Ro
|
||||
constexpr uint16 DROGA = 81; // The Temple of Droga
|
||||
constexpr uint16 CABWEST = 82; // Cabilis West
|
||||
constexpr uint16 SWAMPOFNOHOPE = 83; // The Swamp of No Hope
|
||||
constexpr uint16 FIRIONA = 84; // Firiona Vie
|
||||
constexpr uint16 LAKEOFILLOMEN = 85; // Lake of Ill Omen
|
||||
constexpr uint16 DREADLANDS = 86; // The Dreadlands
|
||||
constexpr uint16 BURNINGWOOD = 87; // The Burning Wood
|
||||
constexpr uint16 KAESORA = 88; // Kaesora
|
||||
constexpr uint16 SEBILIS = 89; // The Ruins of Sebilis
|
||||
constexpr uint16 CITYMIST = 90; // The City of Mist
|
||||
constexpr uint16 SKYFIRE = 91; // The Skyfire Mountains
|
||||
constexpr uint16 FRONTIERMTNS = 92; // Frontier Mountains
|
||||
constexpr uint16 OVERTHERE = 93; // The Overthere
|
||||
constexpr uint16 EMERALDJUNGLE = 94; // The Emerald Jungle
|
||||
constexpr uint16 TRAKANON = 95; // Trakanon's Teeth
|
||||
constexpr uint16 TIMOROUS = 96; // Timorous Deep
|
||||
constexpr uint16 KURN = 97; // Kurn's Tower
|
||||
constexpr uint16 ERUDSXING = 98; // Erud's Crossing
|
||||
constexpr uint16 STONEBRUNT = 100; // The Stonebrunt Mountains
|
||||
constexpr uint16 WARRENS = 101; // The Warrens
|
||||
constexpr uint16 KARNOR = 102; // Karnor's Castle
|
||||
constexpr uint16 CHARDOK = 103; // Chardok
|
||||
constexpr uint16 DALNIR = 104; // The Crypt of Dalnir
|
||||
constexpr uint16 CHARASIS = 105; // The Howling Stones
|
||||
constexpr uint16 CABEAST = 106; // Cabilis East
|
||||
constexpr uint16 NURGA = 107; // The Mines of Nurga
|
||||
constexpr uint16 VEESHAN = 108; // Veeshan's Peak
|
||||
constexpr uint16 VEKSAR = 109; // Veksar
|
||||
constexpr uint16 ICECLAD = 110; // The Iceclad Ocean
|
||||
constexpr uint16 FROZENSHADOW = 111; // The Tower of Frozen Shadow
|
||||
constexpr uint16 VELKETOR = 112; // Velketor's Labyrinth
|
||||
constexpr uint16 KAEL = 113; // Kael Drakkel
|
||||
constexpr uint16 SKYSHRINE = 114; // Skyshrine
|
||||
constexpr uint16 THURGADINA = 115; // The City of Thurgadin
|
||||
constexpr uint16 EASTWASTES = 116; // Eastern Wastes
|
||||
constexpr uint16 COBALTSCAR = 117; // Cobaltscar
|
||||
constexpr uint16 GREATDIVIDE = 118; // The Great Divide
|
||||
constexpr uint16 WAKENING = 119; // The Wakening Land
|
||||
constexpr uint16 WESTWASTES = 120; // The Western Wastes
|
||||
constexpr uint16 CRYSTAL = 121; // The Crystal Caverns
|
||||
constexpr uint16 NECROPOLIS = 123; // Dragon Necropolis
|
||||
constexpr uint16 TEMPLEVEESHAN = 124; // The Temple of Veeshan
|
||||
constexpr uint16 SIRENS = 125; // Siren's Grotto
|
||||
constexpr uint16 MISCHIEFPLANE = 126; // The Plane of Mischief
|
||||
constexpr uint16 GROWTHPLANE = 127; // The Plane of Growth
|
||||
constexpr uint16 SLEEPER = 128; // The Sleeper's Tomb
|
||||
constexpr uint16 THURGADINB = 129; // Icewell Keep
|
||||
constexpr uint16 ERUDSXING2 = 130; // Marauders Mire
|
||||
constexpr uint16 SHADOWHAVEN = 150; // Shadow Haven
|
||||
constexpr uint16 BAZAAR = 151; // The Bazaar
|
||||
constexpr uint16 NEXUS = 152; // Nexus
|
||||
constexpr uint16 ECHO_ = 153; // The Echo Caverns
|
||||
constexpr uint16 ACRYLIA = 154; // The Acrylia Caverns
|
||||
constexpr uint16 SHARVAHL = 155; // The City of Shar Vahl
|
||||
constexpr uint16 PALUDAL = 156; // The Paludal Caverns
|
||||
constexpr uint16 FUNGUSGROVE = 157; // The Fungus Grove
|
||||
constexpr uint16 VEXTHAL = 158; // Vex Thal
|
||||
constexpr uint16 SSERU = 159; // Sanctus Seru
|
||||
constexpr uint16 KATTA = 160; // Katta Castellum
|
||||
constexpr uint16 NETHERBIAN = 161; // Netherbian Lair
|
||||
constexpr uint16 SSRATEMPLE = 162; // Ssraeshza Temple
|
||||
constexpr uint16 GRIEGSEND = 163; // Grieg's End
|
||||
constexpr uint16 THEDEEP = 164; // The Deep
|
||||
constexpr uint16 SHADEWEAVER = 165; // Shadeweaver's Thicket
|
||||
constexpr uint16 HOLLOWSHADE = 166; // Hollowshade Moor
|
||||
constexpr uint16 GRIMLING = 167; // Grimling Forest
|
||||
constexpr uint16 MSERU = 168; // Marus Seru
|
||||
constexpr uint16 LETALIS = 169; // Mons Letalis
|
||||
constexpr uint16 TWILIGHT = 170; // The Twilight Sea
|
||||
constexpr uint16 THEGREY = 171; // The Grey
|
||||
constexpr uint16 TENEBROUS = 172; // The Tenebrous Mountains
|
||||
constexpr uint16 MAIDEN = 173; // The Maiden's Eye
|
||||
constexpr uint16 DAWNSHROUD = 174; // The Dawnshroud Peaks
|
||||
constexpr uint16 SCARLET = 175; // The Scarlet Desert
|
||||
constexpr uint16 UMBRAL = 176; // The Umbral Plains
|
||||
constexpr uint16 AKHEVA = 179; // The Akheva Ruins
|
||||
constexpr uint16 ARENA2 = 180; // The Arena Two
|
||||
constexpr uint16 JAGGEDPINE = 181; // The Jaggedpine Forest
|
||||
constexpr uint16 NEDARIA = 182; // Nedaria's Landing
|
||||
constexpr uint16 TUTORIAL = 183; // EverQuest Tutorial
|
||||
constexpr uint16 LOAD = 184; // Loading Zone
|
||||
constexpr uint16 LOAD2 = 185; // New Loading Zone
|
||||
constexpr uint16 HATEPLANEB = 186; // The Plane of Hate
|
||||
constexpr uint16 SHADOWREST = 187; // Shadowrest
|
||||
constexpr uint16 TUTORIALA = 188; // The Mines of Gloomingdeep
|
||||
constexpr uint16 TUTORIALB = 189; // The Mines of Gloomingdeep
|
||||
constexpr uint16 CLZ = 190; // Loading
|
||||
constexpr uint16 CODECAY = 200; // The Crypt of Decay
|
||||
constexpr uint16 POJUSTICE = 201; // The Plane of Justice
|
||||
constexpr uint16 POKNOWLEDGE = 202; // The Plane of Knowledge
|
||||
constexpr uint16 POTRANQUILITY = 203; // The Plane of Tranquility
|
||||
constexpr uint16 PONIGHTMARE = 204; // The Plane of Nightmares
|
||||
constexpr uint16 PODISEASE = 205; // The Plane of Disease
|
||||
constexpr uint16 POINNOVATION = 206; // The Plane of Innovation
|
||||
constexpr uint16 POTORMENT = 207; // Torment, the Plane of Pain
|
||||
constexpr uint16 POVALOR = 208; // The Plane of Valor
|
||||
constexpr uint16 BOTHUNDER = 209; // Bastion of Thunder
|
||||
constexpr uint16 POSTORMS = 210; // The Plane of Storms
|
||||
constexpr uint16 HOHONORA = 211; // The Halls of Honor
|
||||
constexpr uint16 SOLROTOWER = 212; // The Tower of Solusek Ro
|
||||
constexpr uint16 POWAR = 213; // Plane of War
|
||||
constexpr uint16 POTACTICS = 214; // Drunder, the Fortress of Zek
|
||||
constexpr uint16 POAIR = 215; // The Plane of Air
|
||||
constexpr uint16 POWATER = 216; // The Plane of Water
|
||||
constexpr uint16 POFIRE = 217; // The Plane of Fire
|
||||
constexpr uint16 POEARTHA = 218; // The Plane of Earth
|
||||
constexpr uint16 POTIMEA = 219; // The Plane of Time
|
||||
constexpr uint16 HOHONORB = 220; // The Temple of Marr
|
||||
constexpr uint16 NIGHTMAREB = 221; // The Lair of Terris Thule
|
||||
constexpr uint16 POEARTHB = 222; // The Plane of Earth
|
||||
constexpr uint16 POTIMEB = 223; // The Plane of Time
|
||||
constexpr uint16 GUNTHAK = 224; // The Gulf of Gunthak
|
||||
constexpr uint16 DULAK = 225; // Dulak's Harbor
|
||||
constexpr uint16 TORGIRAN = 226; // The Torgiran Mines
|
||||
constexpr uint16 NADOX = 227; // The Crypt of Nadox
|
||||
constexpr uint16 HATESFURY = 228; // Hate's Fury
|
||||
constexpr uint16 GUKA = 229; // Deepest Guk: Cauldron of Lost Souls
|
||||
constexpr uint16 RUJA = 230; // The Rujarkian Hills: Bloodied Quarries
|
||||
constexpr uint16 TAKA = 231; // Takish-Hiz: Sunken Library
|
||||
constexpr uint16 MIRA = 232; // Miragul's Menagerie: Silent Gallery
|
||||
constexpr uint16 MMCA = 233; // Mistmoore's Catacombs: Forlorn Caverns
|
||||
constexpr uint16 GUKB = 234; // The Drowning Crypt
|
||||
constexpr uint16 RUJB = 235; // The Rujarkian Hills: Halls of War
|
||||
constexpr uint16 TAKB = 236; // Takish-Hiz: Shifting Tower
|
||||
constexpr uint16 MIRB = 237; // Miragul's Menagerie: Frozen Nightmare
|
||||
constexpr uint16 MMCB = 238; // Mistmoore's Catacombs: Dreary Grotto
|
||||
constexpr uint16 GUKC = 239; // Deepest Guk: Ancient Aqueducts
|
||||
constexpr uint16 RUJC = 240; // The Rujarkian Hills: Wind Bridges
|
||||
constexpr uint16 TAKC = 241; // Takish-Hiz: Within the Compact
|
||||
constexpr uint16 MIRC = 242; // The Spider Den
|
||||
constexpr uint16 MMCC = 243; // Mistmoore's Catacombs: Struggles within the Progeny
|
||||
constexpr uint16 GUKD = 244; // The Mushroom Grove
|
||||
constexpr uint16 RUJD = 245; // The Rujarkian Hills: Prison Break
|
||||
constexpr uint16 TAKD = 246; // Takish-Hiz: Royal Observatory
|
||||
constexpr uint16 MIRD = 247; // Miragul's Menagerie: Hushed Banquet
|
||||
constexpr uint16 MMCD = 248; // Mistmoore's Catacombs: Chambers of Eternal Affliction
|
||||
constexpr uint16 GUKE = 249; // Deepest Guk: The Curse Reborn
|
||||
constexpr uint16 RUJE = 250; // The Rujarkian Hills: Drudge Hollows
|
||||
constexpr uint16 TAKE = 251; // Takish-Hiz: River of Recollection
|
||||
constexpr uint16 MIRE = 252; // The Frosted Halls
|
||||
constexpr uint16 MMCE = 253; // Mistmoore's Catacombs: Sepulcher of the Damned
|
||||
constexpr uint16 GUKF = 254; // Deepest Guk: Chapel of the Witnesses
|
||||
constexpr uint16 RUJF = 255; // The Rujarkian Hills: Fortified Lair of the Taskmasters
|
||||
constexpr uint16 TAKF = 256; // Takish-Hiz: Sandfall Corridors
|
||||
constexpr uint16 MIRF = 257; // The Forgotten Wastes
|
||||
constexpr uint16 MMCF = 258; // Mistmoore's Catacombs: Scion Lair of Fury
|
||||
constexpr uint16 GUKG = 259; // The Root Garden
|
||||
constexpr uint16 RUJG = 260; // The Rujarkian Hills: Hidden Vale of Deceit
|
||||
constexpr uint16 TAKG = 261; // Takish-Hiz: Balancing Chamber
|
||||
constexpr uint16 MIRG = 262; // Miragul's Menagerie: Heart of the Menagerie
|
||||
constexpr uint16 MMCG = 263; // Mistmoore's Catacombs: Cesspits of Putrescence
|
||||
constexpr uint16 GUKH = 264; // Deepest Guk: Accursed Sanctuary
|
||||
constexpr uint16 RUJH = 265; // The Rujarkian Hills: Blazing Forge
|
||||
constexpr uint16 TAKH = 266; // Takish-Hiz: Sweeping Tides
|
||||
constexpr uint16 MIRH = 267; // The Morbid Laboratory
|
||||
constexpr uint16 MMCH = 268; // Mistmoore's Catacombs: Aisles of Blood
|
||||
constexpr uint16 RUJI = 269; // The Rujarkian Hills: Arena of Chance
|
||||
constexpr uint16 TAKI = 270; // Takish-Hiz: Antiquated Palace
|
||||
constexpr uint16 MIRI = 271; // The Theater of Imprisoned Horror
|
||||
constexpr uint16 MMCI = 272; // Mistmoore's Catacombs: Halls of Sanguinary Rites
|
||||
constexpr uint16 RUJJ = 273; // The Rujarkian Hills: Barracks of War
|
||||
constexpr uint16 TAKJ = 274; // Takish-Hiz: Prismatic Corridors
|
||||
constexpr uint16 MIRJ = 275; // Miragul's Menagerie: Grand Library
|
||||
constexpr uint16 MMCJ = 276; // Mistmoore's Catacombs: Infernal Sanctuary
|
||||
constexpr uint16 CHARDOKB = 277; // Chardok: The Halls of Betrayal
|
||||
constexpr uint16 SOLDUNGC = 278; // The Caverns of Exile
|
||||
constexpr uint16 ABYSMAL = 279; // The Abysmal Sea
|
||||
constexpr uint16 NATIMBI = 280; // Natimbi, the Broken Shores
|
||||
constexpr uint16 QINIMI = 281; // Qinimi, Court of Nihilia
|
||||
constexpr uint16 RIWWI = 282; // Riwwi, Coliseum of Games
|
||||
constexpr uint16 BARINDU = 283; // Barindu, Hanging Gardens
|
||||
constexpr uint16 FERUBI = 284; // Ferubi, Forgotten Temple of Taelosia
|
||||
constexpr uint16 SNPOOL = 285; // Sewers of Nihilia, Pool of Sludg
|
||||
constexpr uint16 SNLAIR = 286; // Sewers of Nihilia, Lair of Trapp
|
||||
constexpr uint16 SNPLANT = 287; // Sewers of Nihilia, Purifying Pla
|
||||
constexpr uint16 SNCREMATORY = 288; // Sewers of Nihilia, Emanating Cre
|
||||
constexpr uint16 TIPT = 289; // Tipt, Treacherous Crags
|
||||
constexpr uint16 VXED = 290; // Vxed, the Crumbling Caverns
|
||||
constexpr uint16 YXTTA = 291; // Yxtta, Pulpit of Exiles
|
||||
constexpr uint16 UQUA = 292; // Uqua, the Ocean God Chantry
|
||||
constexpr uint16 KODTAZ = 293; // Kod'Taz, Broken Trial Grounds
|
||||
constexpr uint16 IKKINZ = 294; // Ikkinz, Chambers of Transcendence
|
||||
constexpr uint16 QVIC = 295; // Qvic, Prayer Grounds of Calling
|
||||
constexpr uint16 INKTUTA = 296; // Inktu'Ta, the Unmasked Chapel
|
||||
constexpr uint16 TXEVU = 297; // Txevu, Lair of the Elite
|
||||
constexpr uint16 TACVI = 298; // Tacvi, The Broken Temple
|
||||
constexpr uint16 QVICB = 299; // Qvic, the Hidden Vault
|
||||
constexpr uint16 WALLOFSLAUGHTER = 300; // Wall of Slaughter
|
||||
constexpr uint16 BLOODFIELDS = 301; // The Bloodfields
|
||||
constexpr uint16 DRANIKSSCAR = 302; // Dranik's Scar
|
||||
constexpr uint16 CAUSEWAY = 303; // Nobles' Causeway
|
||||
constexpr uint16 CHAMBERSA = 304; // Muramite Proving Grounds
|
||||
constexpr uint16 CHAMBERSB = 305; // Muramite Proving Grounds
|
||||
constexpr uint16 CHAMBERSC = 306; // Muramite Proving Grounds
|
||||
constexpr uint16 CHAMBERSD = 307; // Muramite Proving Grounds
|
||||
constexpr uint16 CHAMBERSE = 308; // Muramite Proving Grounds
|
||||
constexpr uint16 CHAMBERSF = 309; // Muramite Proving Grounds
|
||||
constexpr uint16 PROVINGGROUNDS = 316; // Muramite Proving Grounds
|
||||
constexpr uint16 ANGUISH = 317; // Anguish, the Fallen Palace
|
||||
constexpr uint16 DRANIKHOLLOWSA = 318; // Dranik's Hollows
|
||||
constexpr uint16 DRANIKHOLLOWSB = 319; // Dranik's Hollows
|
||||
constexpr uint16 DRANIKHOLLOWSC = 320; // Dranik's Hollows
|
||||
constexpr uint16 DRANIKCATACOMBSA = 328; // Catacombs of Dranik
|
||||
constexpr uint16 DRANIKCATACOMBSB = 329; // Catacombs of Dranik
|
||||
constexpr uint16 DRANIKCATACOMBSC = 330; // Catacombs of Dranik
|
||||
constexpr uint16 DRANIKSEWERSA = 331; // Sewers of Dranik
|
||||
constexpr uint16 DRANIKSEWERSB = 332; // Sewers of Dranik
|
||||
constexpr uint16 DRANIKSEWERSC = 333; // Sewers of Dranik
|
||||
constexpr uint16 RIFTSEEKERS = 334; // Riftseekers' Sanctum
|
||||
constexpr uint16 HARBINGERS = 335; // Harbinger's Spire
|
||||
constexpr uint16 DRANIK = 336; // The Ruined City of Dranik
|
||||
constexpr uint16 BROODLANDS = 337; // The Broodlands
|
||||
constexpr uint16 STILLMOONA = 338; // Stillmoon Temple
|
||||
constexpr uint16 STILLMOONB = 339; // The Ascent
|
||||
constexpr uint16 THUNDERCREST = 340; // Thundercrest Isles
|
||||
constexpr uint16 DELVEA = 341; // Lavaspinner's Lair
|
||||
constexpr uint16 DELVEB = 342; // Tirranun's Delve
|
||||
constexpr uint16 THENEST = 343; // The Nest
|
||||
constexpr uint16 GUILDLOBBY = 344; // Guild Lobby
|
||||
constexpr uint16 GUILDHALL = 345; // Guild Hall
|
||||
constexpr uint16 BARTER = 346; // The Barter Hall
|
||||
constexpr uint16 ILLSALIN = 347; // Ruins of Illsalin
|
||||
constexpr uint16 ILLSALINA = 348; // Illsalin Marketplace
|
||||
constexpr uint16 ILLSALINB = 349; // Temple of Korlach
|
||||
constexpr uint16 ILLSALINC = 350; // The Nargil Pits
|
||||
constexpr uint16 DREADSPIRE = 351; // Dreadspire Keep
|
||||
constexpr uint16 DRACHNIDHIVE = 354; // The Hive
|
||||
constexpr uint16 DRACHNIDHIVEA = 355; // The Hatchery
|
||||
constexpr uint16 DRACHNIDHIVEB = 356; // The Cocoons
|
||||
constexpr uint16 DRACHNIDHIVEC = 357; // Queen Sendaii`s Lair
|
||||
constexpr uint16 WESTKORLACH = 358; // Stoneroot Falls
|
||||
constexpr uint16 WESTKORLACHA = 359; // Prince's Manor
|
||||
constexpr uint16 WESTKORLACHB = 360; // Caverns of the Lost
|
||||
constexpr uint16 WESTKORLACHC = 361; // Lair of the Korlach
|
||||
constexpr uint16 EASTKORLACH = 362; // The Undershore
|
||||
constexpr uint16 EASTKORLACHA = 363; // Snarlstone Dens
|
||||
constexpr uint16 SHADOWSPINE = 364; // Shadow Spine
|
||||
constexpr uint16 CORATHUS = 365; // Corathus Creep
|
||||
constexpr uint16 CORATHUSA = 366; // Sporali Caverns
|
||||
constexpr uint16 CORATHUSB = 367; // The Corathus Mines
|
||||
constexpr uint16 NEKTULOSA = 368; // Shadowed Grove
|
||||
constexpr uint16 ARCSTONE = 369; // Arcstone, Isle of Spirits
|
||||
constexpr uint16 RELIC = 370; // Relic, the Artifact City
|
||||
constexpr uint16 SKYLANCE = 371; // Skylance
|
||||
constexpr uint16 DEVASTATION = 372; // The Devastation
|
||||
constexpr uint16 DEVASTATIONA = 373; // The Seething Wall
|
||||
constexpr uint16 RAGE = 374; // Sverag, Stronghold of Rage
|
||||
constexpr uint16 RAGEA = 375; // Razorthorn, Tower of Sullon Zek
|
||||
constexpr uint16 TAKISHRUINS = 376; // Ruins of Takish-Hiz
|
||||
constexpr uint16 TAKISHRUINSA = 377; // The Root of Ro
|
||||
constexpr uint16 ELDDAR = 378; // The Elddar Forest
|
||||
constexpr uint16 ELDDARA = 379; // Tunare's Shrine
|
||||
constexpr uint16 THEATER = 380; // Theater of Blood
|
||||
constexpr uint16 THEATERA = 381; // Deathknell, Tower of Dissonance
|
||||
constexpr uint16 FREEPORTEAST = 382; // East Freeport
|
||||
constexpr uint16 FREEPORTWEST = 383; // West Freeport
|
||||
constexpr uint16 FREEPORTSEWERS = 384; // Freeport Sewers
|
||||
constexpr uint16 FREEPORTACADEMY = 385; // Academy of Arcane Sciences
|
||||
constexpr uint16 FREEPORTTEMPLE = 386; // Temple of Marr
|
||||
constexpr uint16 FREEPORTMILITIA = 387; // Freeport Militia House: My Precious
|
||||
constexpr uint16 FREEPORTARENA = 388; // Arena
|
||||
constexpr uint16 FREEPORTCITYHALL = 389; // City Hall
|
||||
constexpr uint16 FREEPORTTHEATER = 390; // Theater of the Tranquil
|
||||
constexpr uint16 FREEPORTHALL = 391; // Hall of Truth: Bounty
|
||||
constexpr uint16 NORTHRO = 392; // North Desert of Ro
|
||||
constexpr uint16 SOUTHRO = 393; // South Desert of Ro
|
||||
constexpr uint16 CRESCENT = 394; // Crescent Reach
|
||||
constexpr uint16 MOORS = 395; // Blightfire Moors
|
||||
constexpr uint16 STONEHIVE = 396; // Stone Hive
|
||||
constexpr uint16 MESA = 397; // Goru`kar Mesa
|
||||
constexpr uint16 ROOST = 398; // Blackfeather Roost
|
||||
constexpr uint16 STEPPES = 399; // The Steppes
|
||||
constexpr uint16 ICEFALL = 400; // Icefall Glacier
|
||||
constexpr uint16 VALDEHOLM = 401; // Valdeholm
|
||||
constexpr uint16 FROSTCRYPT = 402; // Frostcrypt, Throne of the Shade King
|
||||
constexpr uint16 SUNDEROCK = 403; // Sunderock Springs
|
||||
constexpr uint16 VERGALID = 404; // Vergalid Mines
|
||||
constexpr uint16 DIREWIND = 405; // Direwind Cliffs
|
||||
constexpr uint16 ASHENGATE = 406; // Ashengate, Reliquary of the Scale
|
||||
constexpr uint16 HIGHPASSHOLD = 407; // Highpass Hold
|
||||
constexpr uint16 COMMONLANDS = 408; // The Commonlands
|
||||
constexpr uint16 OCEANOFTEARS = 409; // The Ocean of Tears
|
||||
constexpr uint16 KITHFOREST = 410; // Kithicor Forest
|
||||
constexpr uint16 BEFALLENB = 411; // Befallen
|
||||
constexpr uint16 HIGHPASSKEEP = 412; // HighKeep
|
||||
constexpr uint16 INNOTHULEB = 413; // The Innothule Swamp
|
||||
constexpr uint16 TOXXULIA = 414; // Toxxulia Forest
|
||||
constexpr uint16 MISTYTHICKET = 415; // The Misty Thicket
|
||||
constexpr uint16 KATTACASTRUM = 416; // Katta Castrum
|
||||
constexpr uint16 THALASSIUS = 417; // Thalassius, the Coral Keep
|
||||
constexpr uint16 ATIIKI = 418; // Jewel of Atiiki
|
||||
constexpr uint16 ZHISZA = 419; // Zhisza, the Shissar Sanctuary
|
||||
constexpr uint16 SILYSSAR = 420; // Silyssar, New Chelsith
|
||||
constexpr uint16 SOLTERIS = 421; // Solteris, the Throne of Ro
|
||||
constexpr uint16 BARREN = 422; // Barren Coast
|
||||
constexpr uint16 BURIEDSEA = 423; // The Buried Sea
|
||||
constexpr uint16 JARDELSHOOK = 424; // Jardel's Hook
|
||||
constexpr uint16 MONKEYROCK = 425; // Monkey Rock
|
||||
constexpr uint16 SUNCREST = 426; // Suncrest Isle
|
||||
constexpr uint16 DEADBONE = 427; // Deadbone Reef
|
||||
constexpr uint16 BLACKSAIL = 428; // Blacksail Folly
|
||||
constexpr uint16 MAIDENSGRAVE = 429; // Maiden's Grave
|
||||
constexpr uint16 REDFEATHER = 430; // Redfeather Isle
|
||||
constexpr uint16 SHIPMVP = 431; // The Open Sea
|
||||
constexpr uint16 SHIPMVU = 432; // The Open Sea
|
||||
constexpr uint16 SHIPPVU = 433; // The Open Sea
|
||||
constexpr uint16 SHIPUVU = 434; // The Open Sea
|
||||
constexpr uint16 SHIPMVM = 435; // The Open Sea
|
||||
constexpr uint16 MECHANOTUS = 436; // Fortress Mechanotus
|
||||
constexpr uint16 MANSION = 437; // Meldrath's Majestic Mansion
|
||||
constexpr uint16 STEAMFACTORY = 438; // The Steam Factory
|
||||
constexpr uint16 SHIPWORKSHOP = 439; // S.H.I.P. Workshop
|
||||
constexpr uint16 GYROSPIREB = 440; // Gyrospire Beza
|
||||
constexpr uint16 GYROSPIREZ = 441; // Gyrospire Zeka
|
||||
constexpr uint16 DRAGONSCALE = 442; // Dragonscale Hills
|
||||
constexpr uint16 LOPINGPLAINS = 443; // Loping Plains
|
||||
constexpr uint16 HILLSOFSHADE = 444; // Hills of Shade
|
||||
constexpr uint16 BLOODMOON = 445; // Bloodmoon Keep
|
||||
constexpr uint16 CRYSTALLOS = 446; // Crystallos, Lair of the Awakened
|
||||
constexpr uint16 GUARDIAN = 447; // The Mechamatic Guardian
|
||||
constexpr uint16 STEAMFONTMTS = 448; // The Steamfont Mountains
|
||||
constexpr uint16 CRYPTOFSHADE = 449; // Crypt of Shade
|
||||
constexpr uint16 DRAGONSCALEB = 451; // Deepscar's Den
|
||||
constexpr uint16 OLDFIELDOFBONE = 452; // Field of Scale
|
||||
constexpr uint16 OLDKAESORAA = 453; // Kaesora Library
|
||||
constexpr uint16 OLDKAESORAB = 454; // Kaesora Hatchery
|
||||
constexpr uint16 OLDKURN = 455; // Kurn's Tower
|
||||
constexpr uint16 OLDKITHICOR = 456; // Bloody Kithicor
|
||||
constexpr uint16 OLDCOMMONS = 457; // Old Commonlands
|
||||
constexpr uint16 OLDHIGHPASS = 458; // Highpass Hold
|
||||
constexpr uint16 THEVOIDA = 459; // The Void
|
||||
constexpr uint16 THEVOIDB = 460; // The Void
|
||||
constexpr uint16 THEVOIDC = 461; // The Void
|
||||
constexpr uint16 THEVOIDD = 462; // The Void
|
||||
constexpr uint16 THEVOIDE = 463; // The Void
|
||||
constexpr uint16 THEVOIDF = 464; // The Void
|
||||
constexpr uint16 THEVOIDG = 465; // The Void
|
||||
constexpr uint16 OCEANGREENHILLS = 466; // Oceangreen Hills
|
||||
constexpr uint16 OCEANGREENVILLAGE = 467; // Oceangreen Village
|
||||
constexpr uint16 OLDBLACKBURROW = 468; // BlackBurrow
|
||||
constexpr uint16 BERTOXTEMPLE = 469; // Temple of Bertoxxulous
|
||||
constexpr uint16 DISCORD = 470; // Korafax, Home of the Riders
|
||||
constexpr uint16 DISCORDTOWER = 471; // Citadel of the Worldslayer
|
||||
constexpr uint16 OLDBLOODFIELD = 472; // Old Bloodfields
|
||||
constexpr uint16 PRECIPICEOFWAR = 473; // The Precipice of War
|
||||
constexpr uint16 OLDDRANIK = 474; // City of Dranik
|
||||
constexpr uint16 TOSKIRAKK = 475; // Toskirakk
|
||||
constexpr uint16 KORASCIAN = 476; // Korascian Warrens
|
||||
constexpr uint16 RATHECHAMBER = 477; // Rathe Council Chamber
|
||||
constexpr uint16 BRELLSREST = 480; // Brell's Rest
|
||||
constexpr uint16 FUNGALFOREST = 481; // Fungal Forest
|
||||
constexpr uint16 UNDERQUARRY = 482; // The Underquarry
|
||||
constexpr uint16 COOLINGCHAMBER = 483; // The Cooling Chamber
|
||||
constexpr uint16 SHININGCITY = 484; // Kernagir, the Shining City
|
||||
constexpr uint16 ARTHICREX = 485; // Arthicrex
|
||||
constexpr uint16 FOUNDATION = 486; // The Foundation
|
||||
constexpr uint16 LICHENCREEP = 487; // Lichen Creep
|
||||
constexpr uint16 PELLUCID = 488; // Pellucid Grotto
|
||||
constexpr uint16 STONESNAKE = 489; // Volska's Husk
|
||||
constexpr uint16 BRELLSTEMPLE = 490; // Brell's Temple
|
||||
constexpr uint16 CONVORTEUM = 491; // The Convorteum
|
||||
constexpr uint16 BRELLSARENA = 492; // Brell's Arena
|
||||
constexpr uint16 WEDDINGCHAPEL = 493; // Wedding Chapel
|
||||
constexpr uint16 WEDDINGCHAPELDARK = 494; // Wedding Chapel
|
||||
constexpr uint16 DRAGONCRYPT = 495; // Lair of the Risen
|
||||
constexpr uint16 FEERROTT2 = 700; // The Feerrott
|
||||
constexpr uint16 THULEHOUSE1 = 701; // House of Thule
|
||||
constexpr uint16 THULEHOUSE2 = 702; // House of Thule, Upper Floors
|
||||
constexpr uint16 HOUSEGARDEN = 703; // The Grounds
|
||||
constexpr uint16 THULELIBRARY = 704; // The Library
|
||||
constexpr uint16 WELL = 705; // The Well
|
||||
constexpr uint16 FALLEN = 706; // Erudin Burning
|
||||
constexpr uint16 MORELLCASTLE = 707; // Morell's Castle
|
||||
constexpr uint16 SOMNIUM = 708; // Sanctum Somnium
|
||||
constexpr uint16 ALKABORMARE = 709; // Al'Kabor's Nightmare
|
||||
constexpr uint16 MIRAGULMARE = 710; // Miragul's Nightmare
|
||||
constexpr uint16 THULEDREAM = 711; // Fear Itself
|
||||
constexpr uint16 NEIGHBORHOOD = 712; // Sunrise Hills
|
||||
constexpr uint16 ARGATH = 724; // Argath, Bastion of Illdaera
|
||||
constexpr uint16 ARELIS = 725; // Valley of Lunanyn
|
||||
constexpr uint16 SARITHCITY = 726; // Sarith, City of Tides
|
||||
constexpr uint16 RUBAK = 727; // Rubak Oseka, Temple of the Sea
|
||||
constexpr uint16 BEASTDOMAIN = 728; // Beasts' Domain
|
||||
constexpr uint16 RESPLENDENT = 729; // The Resplendent Temple
|
||||
constexpr uint16 PILLARSALRA = 730; // Pillars of Alra
|
||||
constexpr uint16 WINDSONG = 731; // Windsong Sanctuary
|
||||
constexpr uint16 CITYOFBRONZE = 732; // Erillion, City of Bronze
|
||||
constexpr uint16 SEPULCHER = 733; // Sepulcher of Order
|
||||
constexpr uint16 EASTSEPULCHER = 734; // Sepulcher East
|
||||
constexpr uint16 WESTSEPULCHER = 735; // Sepulcher West
|
||||
constexpr uint16 SHARDSLANDING = 752; // Shard's Landing
|
||||
constexpr uint16 XORBB = 753; // Valley of King Xorbb
|
||||
constexpr uint16 KAELSHARD = 754; // Kael Drakkel: The King's Madness
|
||||
constexpr uint16 EASTWASTESSHARD = 755; // East Wastes: Zeixshi-Kar's Awakening
|
||||
constexpr uint16 CRYSTALSHARD = 756; // The Crystal Caverns: Fragment of Fear
|
||||
constexpr uint16 BREEDINGGROUNDS = 757; // The Breeding Grounds
|
||||
constexpr uint16 EVILTREE = 758; // Evantil, the Vile Oak
|
||||
constexpr uint16 GRELLETH = 759; // Grelleth's Palace, the Chateau of Filth
|
||||
constexpr uint16 CHAPTERHOUSE = 760; // Chapterhouse of the Fallen
|
||||
constexpr uint16 ARTTEST = 996; // Art Testing Domain
|
||||
constexpr uint16 FHALLS = 998; // The Forgotten Halls
|
||||
constexpr uint16 APPRENTICE = 999; // Designer Apprentice
|
||||
}
|
||||
|
||||
//ZoneChange_Struct->success values
|
||||
#define ZONE_ERROR_NOMSG 0
|
||||
#define ZONE_ERROR_NOTREADY -1
|
||||
@@ -438,12 +925,9 @@ static const uint8 SkillDamageTypes[EQ::skills::HIGHEST_SKILL + 1] = // change t
|
||||
|
||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||
|
||||
static const uint32 DB_SPELL_CAZIC_TOUCH = 982;
|
||||
static const uint32 DB_SPELL_TOUCH_OF_VINITRAS = 2859;
|
||||
|
||||
static const uint32 DB_FACTION_GEM_CHOPPERS = 255;
|
||||
static const uint32 DB_FACTION_HERETICS = 265;
|
||||
static const uint32 DB_FACTION_KING_AKANON = 333;
|
||||
static const uint32 DB_FACTION_GEM_CHOPPERS = 255;
|
||||
static const uint32 DB_FACTION_HERETICS = 265;
|
||||
static const uint32 DB_FACTION_KING_AKANON = 333;
|
||||
|
||||
enum ChatChannelNames : uint16
|
||||
{
|
||||
@@ -490,4 +974,39 @@ enum class DynamicZoneMemberStatus : uint8_t
|
||||
LinkDead
|
||||
};
|
||||
|
||||
enum LDoNThemes {
|
||||
Unused = 0,
|
||||
GUK,
|
||||
MIR,
|
||||
MMC,
|
||||
RUJ,
|
||||
TAK
|
||||
};
|
||||
|
||||
enum LDoNThemeBits {
|
||||
UnusedBit = 0,
|
||||
GUKBit = 1,
|
||||
MIRBit = 2,
|
||||
MMCBit = 4,
|
||||
RUJBit = 8,
|
||||
TAKBit = 16
|
||||
};
|
||||
|
||||
enum StartZoneIndex {
|
||||
Odus = 0,
|
||||
Qeynos,
|
||||
Halas,
|
||||
Rivervale,
|
||||
Freeport,
|
||||
Neriak,
|
||||
Grobb,
|
||||
Oggok,
|
||||
Kaladim,
|
||||
GreaterFaydark,
|
||||
Felwithe,
|
||||
Akanon,
|
||||
Cabilis,
|
||||
SharVahl
|
||||
};
|
||||
|
||||
#endif /*COMMON_EQ_CONSTANTS_H*/
|
||||
|
||||
+105
-37
@@ -384,7 +384,9 @@ struct NewZone_Struct {
|
||||
/*0716*/ uint32 FastRegenEndurance;
|
||||
/*0720*/ uint32 NPCAggroMaxDist;
|
||||
/*0724*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, if this value is 0, it prevents you from running off edges that would end up underworld
|
||||
/*0728*/
|
||||
/*0728*/ uint32 LavaDamage; // Seen 50
|
||||
/*0732*/ uint32 MinLavaDamage; // Seen 10
|
||||
/*0736*/
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2131,31 +2133,31 @@ struct AdventureLeaderboard_Struct
|
||||
};*/
|
||||
|
||||
struct Illusion_Struct { //size: 256 - SoF
|
||||
/*000*/ uint32 spawnid;
|
||||
/*004*/ char charname[64]; //
|
||||
/*068*/ uint16 race; //
|
||||
/*070*/ char unknown006[2];
|
||||
/*072*/ uint8 gender;
|
||||
/*073*/ uint8 texture;
|
||||
/*074*/ uint8 unknown008; //
|
||||
/*075*/ uint8 unknown009; //
|
||||
/*076*/ uint8 helmtexture; //
|
||||
/*077*/ uint8 unknown010; //
|
||||
/*078*/ uint8 unknown011; //
|
||||
/*079*/ uint8 unknown012; //
|
||||
/*080*/ uint32 face; //
|
||||
/*084*/ uint8 hairstyle; //
|
||||
/*085*/ uint8 haircolor; //
|
||||
/*086*/ uint8 beard; //
|
||||
/*087*/ uint8 beardcolor; //
|
||||
/*088*/ float size; //
|
||||
/*092*/ uint32 drakkin_heritage; //
|
||||
/*096*/ uint32 drakkin_tattoo; //
|
||||
/*100*/ uint32 drakkin_details; //
|
||||
/*104*/ EQ::TintProfile armor_tint; //
|
||||
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
||||
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
||||
/*142*/ uint8 unknown138[114]; //
|
||||
/*000*/ uint32 spawnid;
|
||||
/*004*/ char charname[64]; //
|
||||
/*068*/ uint16 race; //
|
||||
/*070*/ char unknown006[2];
|
||||
/*072*/ uint8 gender;
|
||||
/*073*/ uint8 texture;
|
||||
/*074*/ uint8 unknown008; //
|
||||
/*075*/ uint8 unknown009; //
|
||||
/*076*/ uint8 helmtexture; //
|
||||
/*077*/ uint8 unknown010; //
|
||||
/*078*/ uint8 unknown011; //
|
||||
/*079*/ uint8 unknown012; //
|
||||
/*080*/ uint32 face; //
|
||||
/*084*/ uint8 hairstyle; //
|
||||
/*085*/ uint8 haircolor; //
|
||||
/*086*/ uint8 beard; //
|
||||
/*087*/ uint8 beardcolor; //
|
||||
/*088*/ float size; //
|
||||
/*092*/ uint32 drakkin_heritage; //
|
||||
/*096*/ uint32 drakkin_tattoo; //
|
||||
/*100*/ uint32 drakkin_details; //
|
||||
/*104*/ EQ::TintProfile armor_tint; //
|
||||
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
||||
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
||||
/*142*/ uint8 unknown138[114]; //
|
||||
/*256*/
|
||||
};
|
||||
|
||||
@@ -3714,17 +3716,66 @@ struct SetTitleReply_Struct {
|
||||
uint32 entity_id;
|
||||
};
|
||||
|
||||
struct TaskMemberList_Struct {
|
||||
/*00*/ uint32 gopher_id;
|
||||
/*04*/ uint32 unknown04;
|
||||
/*08*/ uint32 member_count; //1 less than the number of members
|
||||
/*12*/ char list_pointer[0];
|
||||
struct SharedTaskMemberList_Struct {
|
||||
/*00*/ uint32 gopher_id;
|
||||
/*04*/ uint32 unknown04;
|
||||
/*08*/ uint32 member_count; //1 less than the number of members
|
||||
///*12*/ char list_pointer[0];
|
||||
char member_name[1]; //null terminated string
|
||||
uint32 monster_mission; // class chosen
|
||||
uint8 task_leader; //boolean flag
|
||||
|
||||
/* list is of the form:
|
||||
char member_name[1] //null terminated string
|
||||
uint8 task_leader //boolean flag
|
||||
*/
|
||||
};
|
||||
|
||||
struct SharedTaskQuit_Struct {
|
||||
int32 field1;
|
||||
int32 field2;
|
||||
int32 field3;
|
||||
};
|
||||
|
||||
struct SharedTaskAddPlayer_Struct {
|
||||
int32 field1;
|
||||
int32 field2;
|
||||
char player_name[64];
|
||||
};
|
||||
|
||||
struct SharedTaskMakeLeader_Struct {
|
||||
int32 field1;
|
||||
int32 field2;
|
||||
char player_name[64];
|
||||
};
|
||||
|
||||
struct SharedTaskRemovePlayer_Struct {
|
||||
int32 field1;
|
||||
int32 field2;
|
||||
char player_name[64];
|
||||
};
|
||||
|
||||
struct SharedTaskInvite_Struct {
|
||||
int32_t unknown00; // probably the unique character id sent in some packets
|
||||
int32_t invite_id; // invite id sent back in response
|
||||
char task_name[64];
|
||||
char inviter_name[64];
|
||||
};
|
||||
|
||||
struct SharedTaskInviteResponse_Struct {
|
||||
int32_t unknown00; // 0
|
||||
int32_t invite_id; // same id sent in the invite, probably for server verification
|
||||
int8_t accepted; // 0: declined 1: accepted
|
||||
int8_t padding[3]; // padding garbage probably
|
||||
};
|
||||
|
||||
struct SharedTaskAccept_Struct {
|
||||
int32_t unknown00;
|
||||
int32_t unknown04;
|
||||
uint32_t npc_entity_id; // npc task giver entity id (sent in selection window)
|
||||
uint32_t task_id;
|
||||
float reward_multiplier; // added after titanium (sent in selection window)
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
||||
// Old struct not used by Task System implementation but left for reference
|
||||
@@ -3817,7 +3868,7 @@ struct TaskHistory_Struct {
|
||||
#endif
|
||||
|
||||
struct AcceptNewTask_Struct {
|
||||
uint32 unknown00;
|
||||
uint32 task_type; // type sent in selection window
|
||||
uint32 task_id; //set to 0 for 'decline'
|
||||
uint32 task_master_id; //entity ID
|
||||
};
|
||||
@@ -4291,8 +4342,8 @@ struct AARankPrereq_Struct
|
||||
struct AARankEffect_Struct
|
||||
{
|
||||
int32 effect_id;
|
||||
int32 base1;
|
||||
int32 base2;
|
||||
int32 base_value;
|
||||
int32 limit_value;
|
||||
int32 slot;
|
||||
};
|
||||
|
||||
@@ -4300,8 +4351,8 @@ struct AARankEffect_Struct
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
};
|
||||
|
||||
@@ -5530,6 +5581,23 @@ struct SayLinkBodyFrame_Struct {
|
||||
/*056*/
|
||||
};
|
||||
|
||||
struct UpdateMovementEntry {
|
||||
/* 00 */ float Y;
|
||||
/* 04 */ float X;
|
||||
/* 08 */ float Z;
|
||||
/* 12 */ uint8 type;
|
||||
/* 13 */ unsigned int timestamp;
|
||||
/* 17 */
|
||||
};
|
||||
|
||||
struct UnderWorld {
|
||||
/* 00 */ int spawn_id;
|
||||
/* 04 */ float y;
|
||||
/* 08 */ float x;
|
||||
/* 12 */ float z;
|
||||
/* 16 */
|
||||
};
|
||||
|
||||
// Restore structure packing to default
|
||||
#pragma pack()
|
||||
|
||||
|
||||
+14
-1
@@ -44,6 +44,12 @@ void EQEmuConfig::parse_config()
|
||||
if (_root["server"]["world"]["loginserver"].get("legacy", "0").asString() == "1") { LoginLegacy = true; }
|
||||
LoginAccount = _root["server"]["world"]["loginserver"].get("account", "").asString();
|
||||
LoginPassword = _root["server"]["world"]["loginserver"].get("password", "").asString();
|
||||
|
||||
// at least today, this is wrong a majority of the time
|
||||
// remove this if eqemulator ever upgrades its loginserver
|
||||
if (LoginHost.find("login.eqemulator.net") != std::string::npos) {
|
||||
LoginLegacy = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
char str[32];
|
||||
@@ -62,12 +68,19 @@ void EQEmuConfig::parse_config()
|
||||
|
||||
loginconfig->LoginLegacy = false;
|
||||
if (_root["server"]["world"][str].get("legacy", "0").asString() == "1") { loginconfig->LoginLegacy = true; }
|
||||
|
||||
// at least today, this is wrong a majority of the time
|
||||
// remove this if eqemulator ever upgrades its loginserver
|
||||
if (loginconfig->LoginHost.find("login.eqemulator.net") != std::string::npos) {
|
||||
loginconfig->LoginLegacy = true;
|
||||
}
|
||||
|
||||
loginlist.Insert(loginconfig);
|
||||
} while (LoginCount < 100);
|
||||
}
|
||||
|
||||
|
||||
//<locked> from xml converts to json as locked: "", so i default to "false".
|
||||
//<locked> from xml converts to json as locked: "", so i default to "false".
|
||||
//The only way to enable locked is by switching to true, meaning this value is always false until manually set true
|
||||
Locked = false;
|
||||
if (_root["server"]["world"].get("locked", "false").asString() == "true") { Locked = true; }
|
||||
|
||||
+85
-4
@@ -22,8 +22,8 @@
|
||||
#include "rulesys.h"
|
||||
#include "platform.h"
|
||||
#include "string_util.h"
|
||||
#include "database.h"
|
||||
#include "misc.h"
|
||||
#include "repositories/logsys_categories_repository.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <iomanip>
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <algorithm>
|
||||
|
||||
std::ofstream process_log;
|
||||
|
||||
@@ -96,7 +97,7 @@ EQEmuLogSys::EQEmuLogSys()
|
||||
*/
|
||||
EQEmuLogSys::~EQEmuLogSys() = default;
|
||||
|
||||
void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
EQEmuLogSys *EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
{
|
||||
/**
|
||||
* Get Executable platform currently running this code (Zone/World/etc)
|
||||
@@ -128,6 +129,9 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
log_settings[Logs::HotReload].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Loot].log_to_gmsay = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Scheduler].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Cheat].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::HTTP].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::HTTP].log_to_gmsay = static_cast<uint8>(Logs::General);
|
||||
|
||||
/**
|
||||
* RFC 5424
|
||||
@@ -177,6 +181,8 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformHC) {
|
||||
platform_file_name = "hc";
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,9 +237,11 @@ void EQEmuLogSys::ProcessGMSay(
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if the process that actually ran this is zone
|
||||
* Processes that actually support hooks
|
||||
*/
|
||||
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone) {
|
||||
if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformZone ||
|
||||
EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformWorld
|
||||
) {
|
||||
on_log_gmsay_hook(log_category, message);
|
||||
}
|
||||
}
|
||||
@@ -601,3 +609,76 @@ void EQEmuLogSys::EnableConsoleLogging()
|
||||
log_settings[log_index].is_category_enabled = 1;
|
||||
}
|
||||
}
|
||||
|
||||
EQEmuLogSys *EQEmuLogSys::LoadLogDatabaseSettings()
|
||||
{
|
||||
auto categories = LogsysCategoriesRepository::GetWhere(
|
||||
*m_database,
|
||||
"TRUE ORDER BY log_category_id"
|
||||
);
|
||||
|
||||
// keep track of categories
|
||||
std::vector<int> db_categories{};
|
||||
db_categories.reserve(categories.size());
|
||||
|
||||
// loop through database categories
|
||||
for (auto &c: categories) {
|
||||
if (c.log_category_id <= Logs::None || c.log_category_id >= Logs::MaxCategoryID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
log_settings[c.log_category_id].log_to_console = static_cast<uint8>(c.log_to_console);
|
||||
log_settings[c.log_category_id].log_to_file = static_cast<uint8>(c.log_to_file);
|
||||
log_settings[c.log_category_id].log_to_gmsay = static_cast<uint8>(c.log_to_gmsay);
|
||||
|
||||
// Determine if any output method is enabled for the category
|
||||
// and set it to 1 so it can used to check if category is enabled
|
||||
const bool log_to_console = log_settings[c.log_category_id].log_to_console > 0;
|
||||
const bool log_to_file = log_settings[c.log_category_id].log_to_file > 0;
|
||||
const bool log_to_gmsay = log_settings[c.log_category_id].log_to_gmsay > 0;
|
||||
const bool is_category_enabled = log_to_console || log_to_file || log_to_gmsay;
|
||||
|
||||
if (is_category_enabled) {
|
||||
log_settings[c.log_category_id].is_category_enabled = 1;
|
||||
}
|
||||
|
||||
// This determines whether or not the process needs to actually file log anything.
|
||||
// If we go through this whole loop and nothing is set to any debug level, there
|
||||
// is no point to create a file or keep anything open
|
||||
if (log_settings[c.log_category_id].log_to_file > 0) {
|
||||
LogSys.file_logs_enabled = true;
|
||||
}
|
||||
|
||||
db_categories.emplace_back(c.log_category_id);
|
||||
}
|
||||
|
||||
// Auto inject categories that don't exist in the database...
|
||||
for (int i = Logs::AA; i != Logs::MaxCategoryID; i++) {
|
||||
if (std::find(db_categories.begin(), db_categories.end(), i) == db_categories.end()) {
|
||||
LogInfo(
|
||||
"Automatically adding new log category [{0}]",
|
||||
Logs::LogCategoryName[i]
|
||||
);
|
||||
|
||||
auto new_category = LogsysCategoriesRepository::NewEntity();
|
||||
new_category.log_category_id = i;
|
||||
new_category.log_category_description = EscapeString(Logs::LogCategoryName[i]);
|
||||
new_category.log_to_console = log_settings[i].log_to_console;
|
||||
new_category.log_to_gmsay = log_settings[i].log_to_gmsay;
|
||||
new_category.log_to_file = log_settings[i].log_to_file;
|
||||
|
||||
LogsysCategoriesRepository::InsertOne(*m_database, new_category);
|
||||
}
|
||||
}
|
||||
|
||||
LogInfo("Loaded [{}] log categories", categories.size());
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
EQEmuLogSys *EQEmuLogSys::SetDatabase(Database *db)
|
||||
{
|
||||
m_database = db;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
+45
-79
@@ -23,8 +23,9 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef utf16_to_utf8
|
||||
@@ -37,9 +38,9 @@
|
||||
|
||||
namespace Logs {
|
||||
enum DebugLevel {
|
||||
General = 1, /* 1 - Low-Level general debugging, useful info on single line */
|
||||
Moderate, /* 2 - Informational based, used in functions, when particular things load */
|
||||
Detail /* 3 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication */
|
||||
General = 1, // 1 - Low-Level general debugging, useful info on single line
|
||||
Moderate, // 2 - Informational based, used in functions, when particular things load
|
||||
Detail // 3 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -121,13 +122,18 @@ namespace Logs {
|
||||
Expeditions,
|
||||
DynamicZones,
|
||||
Scheduler,
|
||||
Cheat,
|
||||
ClientList,
|
||||
DiaWind,
|
||||
HTTP,
|
||||
Saylink,
|
||||
MaxCategoryID /* Don't Remove this */
|
||||
};
|
||||
|
||||
/**
|
||||
* If you add to this, make sure you update LogCategory
|
||||
*/
|
||||
static const char* LogCategoryName[LogCategory::MaxCategoryID] = {
|
||||
static const char *LogCategoryName[LogCategory::MaxCategoryID] = {
|
||||
"",
|
||||
"AA",
|
||||
"AI",
|
||||
@@ -201,11 +207,18 @@ namespace Logs {
|
||||
"Expeditions",
|
||||
"DynamicZones",
|
||||
"Scheduler",
|
||||
"Cheat",
|
||||
"ClientList",
|
||||
"DialogueWindow",
|
||||
"HTTP",
|
||||
"Saylink",
|
||||
};
|
||||
}
|
||||
|
||||
#include "eqemu_logsys_log_aliases.h"
|
||||
|
||||
class Database;
|
||||
|
||||
class EQEmuLogSys {
|
||||
public:
|
||||
EQEmuLogSys();
|
||||
@@ -216,7 +229,8 @@ public:
|
||||
* This should be handled on deconstructor but to be safe we use it anyways.
|
||||
*/
|
||||
void CloseFileLogs();
|
||||
void LoadLogSettingsDefaults();
|
||||
EQEmuLogSys *LoadLogSettingsDefaults();
|
||||
EQEmuLogSys *LoadLogDatabaseSettings();
|
||||
|
||||
/**
|
||||
* @param directory_name
|
||||
@@ -246,7 +260,7 @@ public:
|
||||
* Used in file logs to prepend a timestamp entry for logs
|
||||
* @param time_stamp
|
||||
*/
|
||||
void SetCurrentTimeStamp(char* time_stamp);
|
||||
void SetCurrentTimeStamp(char *time_stamp);
|
||||
|
||||
/**
|
||||
* @param log_name
|
||||
@@ -273,101 +287,53 @@ public:
|
||||
/**
|
||||
* Internally used memory reference for all log settings per category
|
||||
* These are loaded via DB and have defaults loaded in LoadLogSettingsDefaults
|
||||
* Database loaded via Database::LoadLogSettings(log_settings)
|
||||
* Database loaded via LogSys.SetDatabase(&database)->LoadLogDatabaseSettings();
|
||||
*/
|
||||
LogSettings log_settings[Logs::LogCategory::MaxCategoryID]{};
|
||||
|
||||
bool file_logs_enabled = false;
|
||||
|
||||
/**
|
||||
* Sets Executable platform (Zone/World/UCS) etc.
|
||||
*/
|
||||
int log_platform = 0;
|
||||
int log_platform = 0;
|
||||
std::string platform_file_name;
|
||||
|
||||
/**
|
||||
* File name used in writing logs
|
||||
*/
|
||||
std::string platform_file_name;
|
||||
|
||||
/**
|
||||
* GMSay Client Message colors mapped by category
|
||||
*
|
||||
* @param log_category
|
||||
* @return
|
||||
*/
|
||||
// gmsay
|
||||
uint16 GetGMSayColorFromCategory(uint16 log_category);
|
||||
|
||||
/**
|
||||
* @param f
|
||||
*/
|
||||
void SetGMSayHandler(std::function<void(uint16 log_type, const std::string&)> f) { on_log_gmsay_hook = f; }
|
||||
EQEmuLogSys * SetGMSayHandler(std::function<void(uint16 log_type, const std::string &)> f) {
|
||||
on_log_gmsay_hook = f;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param f
|
||||
*/
|
||||
void SetConsoleHandler(std::function<void(uint16 debug_level, uint16 log_type, const std::string&)> f) { on_log_console_hook = f; }
|
||||
|
||||
/**
|
||||
* Silence console logging
|
||||
*/
|
||||
// console
|
||||
void SetConsoleHandler(
|
||||
std::function<void(
|
||||
uint16 debug_level,
|
||||
uint16 log_type,
|
||||
const std::string &
|
||||
)> f
|
||||
) { on_log_console_hook = f; }
|
||||
void SilenceConsoleLogging();
|
||||
|
||||
/**
|
||||
* Turn on all console logging
|
||||
*/
|
||||
void EnableConsoleLogging();
|
||||
|
||||
// database
|
||||
EQEmuLogSys *SetDatabase(Database *db);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Callback pointer to zone process for hooking logs to zone using GMSay
|
||||
*/
|
||||
std::function<void(uint16 log_category, const std::string&)> on_log_gmsay_hook;
|
||||
std::function<void(uint16 debug_level, uint16 log_category, const std::string&)> on_log_console_hook;
|
||||
// reference to database
|
||||
Database *m_database;
|
||||
|
||||
std::function<void(uint16 log_category, const std::string &)> on_log_gmsay_hook;
|
||||
std::function<void(uint16 debug_level, uint16 log_category, const std::string &)> on_log_console_hook;
|
||||
|
||||
/**
|
||||
* Formats log messages like '[Category] This is a log message'
|
||||
*/
|
||||
std::string FormatOutMessageString(uint16 log_category, const std::string &in_message);
|
||||
|
||||
/**
|
||||
* Linux console color messages mapped by category
|
||||
*
|
||||
* @param log_category
|
||||
* @return
|
||||
*/
|
||||
std::string GetLinuxConsoleColorFromCategory(uint16 log_category);
|
||||
|
||||
/**
|
||||
* Windows console color messages mapped by category
|
||||
*/
|
||||
uint16 GetWindowsConsoleColorFromCategory(uint16 log_category);
|
||||
|
||||
/**
|
||||
* @param debug_level
|
||||
* @param log_category
|
||||
* @param message
|
||||
*/
|
||||
void ProcessConsoleMessage(uint16 debug_level, uint16 log_category, const std::string &message);
|
||||
|
||||
/**
|
||||
* @param debug_level
|
||||
* @param log_category
|
||||
* @param message
|
||||
*/
|
||||
void ProcessGMSay(uint16 debug_level, uint16 log_category, const std::string &message);
|
||||
|
||||
/**
|
||||
* @param debug_level
|
||||
* @param log_category
|
||||
* @param message
|
||||
*/
|
||||
void ProcessLogWrite(uint16 debug_level, uint16 log_category, const std::string &message);
|
||||
|
||||
/**
|
||||
* @param log_category
|
||||
* @return
|
||||
*/
|
||||
bool IsRfc5424LogCategory(uint16 log_category);
|
||||
};
|
||||
|
||||
|
||||
@@ -646,6 +646,56 @@
|
||||
OutF(LogSys, Logs::Detail, Logs::Scheduler, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCheat(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Cheat].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Cheat, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCheatDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Cheat].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Cheat, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogClientList(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::ClientList].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::ClientList, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogClientListDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::ClientList].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::ClientList, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDiaWind(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::DiaWind].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::DiaWind, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDiaWindDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::DiaWind].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::DiaWind, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogHTTP(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::HTTP].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::HTTP, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogHTTPDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::HTTP].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::HTTP, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSaylink(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Saylink].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Saylink, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSaylinkDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Saylink].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Saylink, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define Log(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
@@ -1018,6 +1068,30 @@
|
||||
#define LogDynamicZonesDetail(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogCheatList(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogCheatDetail(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogClientList(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogClientListDetail(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogDiaWind(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogDiaWindDetail(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogHTTP(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define LogHTTPDetail(message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
#define Log(debug_level, log_category, message, ...) do {\
|
||||
} while (0)
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#include "expedition_base.h"
|
||||
#include "repositories/expeditions_repository.h"
|
||||
|
||||
ExpeditionBase::ExpeditionBase(uint32_t id, const std::string& uuid,
|
||||
const std::string& expedition_name, const DynamicZoneMember& leader
|
||||
) :
|
||||
m_id(id),
|
||||
m_uuid(uuid),
|
||||
m_expedition_name(expedition_name),
|
||||
m_leader(leader)
|
||||
{
|
||||
}
|
||||
|
||||
void ExpeditionBase::LoadRepositoryResult(ExpeditionsRepository::ExpeditionWithLeader&& entry)
|
||||
{
|
||||
m_id = entry.id;
|
||||
m_uuid = std::move(entry.uuid);
|
||||
m_expedition_name = std::move(entry.expedition_name);
|
||||
m_add_replay_on_join = entry.add_replay_on_join;
|
||||
m_is_locked = entry.is_locked;
|
||||
m_leader.id = entry.leader_id;
|
||||
m_leader.name = std::move(entry.leader_name);
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
#ifndef COMMON_EXPEDITION_BASE_H
|
||||
#define COMMON_EXPEDITION_BASE_H
|
||||
|
||||
#include "dynamic_zone_base.h"
|
||||
#include "repositories/expeditions_repository.h"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class ExpeditionBase
|
||||
{
|
||||
public:
|
||||
virtual ~ExpeditionBase() = default;
|
||||
ExpeditionBase(const ExpeditionBase&) = default;
|
||||
ExpeditionBase(ExpeditionBase&&) = default;
|
||||
ExpeditionBase& operator=(const ExpeditionBase&) = default;
|
||||
ExpeditionBase& operator=(ExpeditionBase&&) = default;
|
||||
|
||||
uint32_t GetID() const { return m_id; }
|
||||
uint32_t GetLeaderID() const { return m_leader.id; }
|
||||
const std::string& GetName() const { return m_expedition_name; }
|
||||
const std::string& GetLeaderName() const { return m_leader.name; }
|
||||
const std::string& GetUUID() const { return m_uuid; }
|
||||
const DynamicZoneMember& GetLeader() const { return m_leader; }
|
||||
|
||||
void LoadRepositoryResult(ExpeditionsRepository::ExpeditionWithLeader&& entry);
|
||||
|
||||
protected:
|
||||
ExpeditionBase() = default;
|
||||
ExpeditionBase(uint32_t id, const std::string& uuid, const std::string& expedition_name,
|
||||
const DynamicZoneMember& leader);
|
||||
|
||||
uint32_t m_id = 0;
|
||||
bool m_is_locked = false;
|
||||
bool m_add_replay_on_join = true;
|
||||
std::string m_uuid;
|
||||
std::string m_expedition_name;
|
||||
DynamicZoneMember m_leader;
|
||||
};
|
||||
|
||||
#endif
|
||||
+4
-4
@@ -50,8 +50,8 @@ struct NPCFactionList {
|
||||
struct FactionMods
|
||||
{
|
||||
int32 base;
|
||||
int16 min; // The lowest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int16 max; // The highest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int16 min; // The lowest your personal earned faction can go - before race/class/deity adjustments.
|
||||
int16 max; // The highest your personal earned faction can go - before race/class/deity adjustments.
|
||||
int32 class_mod;
|
||||
int32 race_mod;
|
||||
int32 deity_mod;
|
||||
@@ -61,8 +61,8 @@ struct Faction {
|
||||
int32 id;
|
||||
std::map<std::string, int16> mods;
|
||||
int16 base;
|
||||
int16 min; // The lowest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int16 max; // The highest your personal earned faction can go - before race/class/diety adjustments.
|
||||
int16 min; // The lowest your personal earned faction can go - before race/class/deity adjustments.
|
||||
int16 max; // The highest your personal earned faction can go - before race/class/deity adjustments.
|
||||
char name[50];
|
||||
};
|
||||
|
||||
|
||||
+6518
-1549
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,633 @@
|
||||
// Copyright (C) 2015 Ben Lewis <benjf5+github@gmail.com>
|
||||
// Licensed under the MIT license.
|
||||
// https://github.com/ben-zen/uri-library
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cctype>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
class uri {
|
||||
/* URIs are broadly divided into two categories: hierarchical and
|
||||
* non-hierarchical. Both hierarchical URIs and non-hierarchical URIs have a
|
||||
* few elements in common; all URIs have a scheme of one or more alphanumeric
|
||||
* characters followed by a colon, and they all may optionally have a query
|
||||
* component preceded by a question mark, and a fragment component preceded by
|
||||
* an octothorpe (hash mark: '#'). The query consists of stanzas separated by
|
||||
* either ampersands ('&') or semicolons (';') (but only one or the other),
|
||||
* and each stanza consists of a key and an optional value; if the value
|
||||
* exists, the key and value must be divided by an equals sign.
|
||||
*
|
||||
* The following is an example from Wikipedia of a hierarchical URI:
|
||||
* scheme:[//[user:password@]domain[:port]][/]path[?query][#fragment]
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
enum class scheme_category {
|
||||
Hierarchical,
|
||||
NonHierarchical
|
||||
};
|
||||
|
||||
enum class component {
|
||||
Scheme,
|
||||
Content,
|
||||
Username,
|
||||
Password,
|
||||
Host,
|
||||
Port,
|
||||
Path,
|
||||
Query,
|
||||
Fragment
|
||||
};
|
||||
|
||||
enum class query_argument_separator {
|
||||
ampersand,
|
||||
semicolon
|
||||
};
|
||||
|
||||
uri(
|
||||
char const *uri_text, scheme_category category = scheme_category::Hierarchical,
|
||||
query_argument_separator separator = query_argument_separator::ampersand
|
||||
) :
|
||||
m_category(category),
|
||||
m_path_is_rooted(false),
|
||||
m_port(0),
|
||||
m_separator(separator)
|
||||
{
|
||||
setup(std::string(uri_text), category);
|
||||
};
|
||||
|
||||
uri(
|
||||
std::string const &uri_text, scheme_category category = scheme_category::Hierarchical,
|
||||
query_argument_separator separator = query_argument_separator::ampersand
|
||||
) :
|
||||
m_category(category),
|
||||
m_path_is_rooted(false),
|
||||
m_port(0),
|
||||
m_separator(separator)
|
||||
{
|
||||
setup(uri_text, category);
|
||||
};
|
||||
|
||||
uri(
|
||||
std::map<component, std::string> const &components,
|
||||
scheme_category category,
|
||||
bool rooted_path,
|
||||
query_argument_separator separator = query_argument_separator::ampersand
|
||||
) :
|
||||
m_category(category),
|
||||
m_path_is_rooted(rooted_path),
|
||||
m_separator(separator)
|
||||
{
|
||||
if (components.count(component::Scheme)) {
|
||||
if (components.at(component::Scheme).length() == 0) {
|
||||
throw std::invalid_argument("Scheme cannot be empty.");
|
||||
}
|
||||
m_scheme = components.at(component::Scheme);
|
||||
}
|
||||
else {
|
||||
throw std::invalid_argument("A URI must have a scheme.");
|
||||
}
|
||||
|
||||
if (category == scheme_category::Hierarchical) {
|
||||
if (components.count(component::Content)) {
|
||||
throw std::invalid_argument("The content component is only for use in non-hierarchical URIs.");
|
||||
}
|
||||
|
||||
bool has_username = components.count(component::Username);
|
||||
bool has_password = components.count(component::Password);
|
||||
if (has_username && has_password) {
|
||||
m_username = components.at(component::Username);
|
||||
m_password = components.at(component::Password);
|
||||
}
|
||||
else if ((has_username && !has_password) || (!has_username && has_password)) {
|
||||
throw std::invalid_argument("If a username or password is supplied, both must be provided.");
|
||||
}
|
||||
|
||||
if (components.count(component::Host)) {
|
||||
m_host = components.at(component::Host);
|
||||
}
|
||||
|
||||
if (components.count(component::Port)) {
|
||||
m_port = std::stoul(components.at(component::Port));
|
||||
}
|
||||
|
||||
if (components.count(component::Path)) {
|
||||
m_path = components.at(component::Path);
|
||||
}
|
||||
else {
|
||||
throw std::invalid_argument("A path is required on a hierarchical URI, even an empty path.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (components.count(component::Username)
|
||||
|| components.count(component::Password)
|
||||
|| components.count(component::Host)
|
||||
|| components.count(component::Port)
|
||||
|| components.count(component::Path)) {
|
||||
throw std::invalid_argument("None of the hierarchical components are allowed in a non-hierarchical URI.");
|
||||
}
|
||||
|
||||
if (components.count(component::Content)) {
|
||||
m_content = components.at(component::Content);
|
||||
}
|
||||
else {
|
||||
throw std::invalid_argument(
|
||||
"Content is a required component for a non-hierarchical URI, even an empty string."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (components.count(component::Query)) {
|
||||
m_query = components.at(component::Query);
|
||||
}
|
||||
|
||||
if (components.count(component::Fragment)) {
|
||||
m_fragment = components.at(component::Fragment);
|
||||
}
|
||||
}
|
||||
|
||||
uri(uri const &other, std::map<component, std::string> const &replacements) :
|
||||
m_category(other.m_category),
|
||||
m_path_is_rooted(other.m_path_is_rooted),
|
||||
m_separator(other.m_separator)
|
||||
{
|
||||
m_scheme = (replacements.count(component::Scheme))
|
||||
? replacements.at(component::Scheme) : other.m_scheme;
|
||||
|
||||
if (m_category == scheme_category::Hierarchical) {
|
||||
m_username = (replacements.count(component::Username))
|
||||
? replacements.at(component::Username) : other.m_username;
|
||||
|
||||
m_password = (replacements.count(component::Password))
|
||||
? replacements.at(component::Password) : other.m_password;
|
||||
|
||||
m_host = (replacements.count(component::Host))
|
||||
? replacements.at(component::Host) : other.m_host;
|
||||
|
||||
m_port = (replacements.count(component::Port))
|
||||
? std::stoul(replacements.at(component::Port)) : other.m_port;
|
||||
|
||||
m_path = (replacements.count(component::Path))
|
||||
? replacements.at(component::Path) : other.m_path;
|
||||
}
|
||||
else {
|
||||
m_content = (replacements.count(component::Content))
|
||||
? replacements.at(component::Content) : other.m_content;
|
||||
}
|
||||
|
||||
m_query = (replacements.count(component::Query))
|
||||
? replacements.at(component::Query) : other.m_query;
|
||||
|
||||
m_fragment = (replacements.count(component::Fragment))
|
||||
? replacements.at(component::Fragment) : other.m_fragment;
|
||||
}
|
||||
|
||||
// Copy constructor; just use the copy assignment operator internally.
|
||||
uri(uri const &other)
|
||||
{
|
||||
*this = other;
|
||||
};
|
||||
|
||||
// Copy assignment operator
|
||||
uri &operator=(uri const &other)
|
||||
{
|
||||
if (this != &other) {
|
||||
m_scheme = other.m_scheme;
|
||||
m_content = other.m_content;
|
||||
m_username = other.m_username;
|
||||
m_password = other.m_password;
|
||||
m_host = other.m_host;
|
||||
m_path = other.m_path;
|
||||
m_query = other.m_query;
|
||||
m_fragment = other.m_fragment;
|
||||
m_query_dict = other.m_query_dict;
|
||||
m_category = other.m_category;
|
||||
m_port = other.m_port;
|
||||
m_path_is_rooted = other.m_path_is_rooted;
|
||||
m_separator = other.m_separator;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
~uri() {};
|
||||
|
||||
std::string const &get_scheme() const
|
||||
{
|
||||
return m_scheme;
|
||||
};
|
||||
|
||||
scheme_category get_scheme_category() const
|
||||
{
|
||||
return m_category;
|
||||
};
|
||||
|
||||
std::string const &get_content() const
|
||||
{
|
||||
if (m_category != scheme_category::NonHierarchical) {
|
||||
throw std::domain_error("The content component is only valid for non-hierarchical URIs.");
|
||||
}
|
||||
return m_content;
|
||||
};
|
||||
|
||||
std::string const &get_username() const
|
||||
{
|
||||
if (m_category != scheme_category::Hierarchical) {
|
||||
throw std::domain_error("The username component is only valid for hierarchical URIs.");
|
||||
}
|
||||
return m_username;
|
||||
};
|
||||
|
||||
std::string const &get_password() const
|
||||
{
|
||||
if (m_category != scheme_category::Hierarchical) {
|
||||
throw std::domain_error("The password component is only valid for hierarchical URIs.");
|
||||
}
|
||||
return m_password;
|
||||
};
|
||||
|
||||
std::string const &get_host() const
|
||||
{
|
||||
if (m_category != scheme_category::Hierarchical) {
|
||||
throw std::domain_error("The host component is only valid for hierarchical URIs.");
|
||||
}
|
||||
return m_host;
|
||||
};
|
||||
|
||||
unsigned long get_port() const
|
||||
{
|
||||
if (m_category != scheme_category::Hierarchical) {
|
||||
throw std::domain_error("The port component is only valid for hierarchical URIs.");
|
||||
}
|
||||
return m_port;
|
||||
};
|
||||
|
||||
std::string const &get_path() const
|
||||
{
|
||||
if (m_category != scheme_category::Hierarchical) {
|
||||
throw std::domain_error("The path component is only valid for hierarchical URIs.");
|
||||
}
|
||||
return m_path;
|
||||
};
|
||||
|
||||
std::string const &get_query() const
|
||||
{
|
||||
return m_query;
|
||||
};
|
||||
|
||||
std::map<std::string, std::string> const &get_query_dictionary() const
|
||||
{
|
||||
return m_query_dict;
|
||||
};
|
||||
|
||||
std::string const &get_fragment() const
|
||||
{
|
||||
return m_fragment;
|
||||
};
|
||||
|
||||
std::string to_string() const
|
||||
{
|
||||
std::string full_uri;
|
||||
full_uri.append(m_scheme);
|
||||
full_uri.append(":");
|
||||
|
||||
if (m_content.length() > m_path.length()) {
|
||||
full_uri.append("//");
|
||||
if (!(m_username.empty() || m_password.empty())) {
|
||||
full_uri.append(m_username);
|
||||
full_uri.append(":");
|
||||
full_uri.append(m_password);
|
||||
full_uri.append("@");
|
||||
}
|
||||
|
||||
full_uri.append(m_host);
|
||||
|
||||
if (m_port != 0) {
|
||||
full_uri.append(":");
|
||||
full_uri.append(std::to_string(m_port));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_path_is_rooted) {
|
||||
full_uri.append("/");
|
||||
}
|
||||
full_uri.append(m_path);
|
||||
|
||||
if (!m_query.empty()) {
|
||||
full_uri.append("?");
|
||||
full_uri.append(m_query);
|
||||
}
|
||||
|
||||
if (!m_fragment.empty()) {
|
||||
full_uri.append("#");
|
||||
full_uri.append(m_fragment);
|
||||
}
|
||||
|
||||
return full_uri;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
void setup(std::string const &uri_text, scheme_category category)
|
||||
{
|
||||
size_t const uri_length = uri_text.length();
|
||||
|
||||
if (uri_length == 0) {
|
||||
throw std::invalid_argument("URIs cannot be of zero length.");
|
||||
}
|
||||
|
||||
std::string::const_iterator cursor = parse_scheme(
|
||||
uri_text,
|
||||
uri_text.begin());
|
||||
// After calling parse_scheme, *cursor == ':'; none of the following parsers
|
||||
// expect a separator character, so we advance the cursor upon calling them.
|
||||
cursor = parse_content(uri_text, (cursor + 1));
|
||||
|
||||
if ((cursor != uri_text.end()) && (*cursor == '?')) {
|
||||
cursor = parse_query(uri_text, (cursor + 1));
|
||||
}
|
||||
|
||||
if ((cursor != uri_text.end()) && (*cursor == '#')) {
|
||||
cursor = parse_fragment(uri_text, (cursor + 1));
|
||||
}
|
||||
|
||||
init_query_dictionary(); // If the query string is empty, this will be empty too.
|
||||
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_scheme(
|
||||
std::string const &uri_text,
|
||||
std::string::const_iterator scheme_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator scheme_end = scheme_start;
|
||||
while ((scheme_end != uri_text.end()) && (*scheme_end != ':')) {
|
||||
if (!(std::isalnum(*scheme_end) || (*scheme_end == '-')
|
||||
|| (*scheme_end == '+') || (*scheme_end == '.'))) {
|
||||
throw std::invalid_argument(
|
||||
"Invalid character found in the scheme component. Supplied URI was: \""
|
||||
+ uri_text + "\"."
|
||||
);
|
||||
}
|
||||
++scheme_end;
|
||||
}
|
||||
|
||||
if (scheme_end == uri_text.end()) {
|
||||
throw std::invalid_argument(
|
||||
"End of URI found while parsing the scheme. Supplied URI was: \""
|
||||
+ uri_text + "\"."
|
||||
);
|
||||
}
|
||||
|
||||
if (scheme_start == scheme_end) {
|
||||
throw std::invalid_argument(
|
||||
"Scheme component cannot be zero-length. Supplied URI was: \""
|
||||
+ uri_text + "\"."
|
||||
);
|
||||
}
|
||||
|
||||
m_scheme = std::move(std::string(scheme_start, scheme_end));
|
||||
return scheme_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_content(
|
||||
std::string const &uri_text,
|
||||
std::string::const_iterator content_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator content_end = content_start;
|
||||
while ((content_end != uri_text.end()) && (*content_end != '?') && (*content_end != '#')) {
|
||||
++content_end;
|
||||
}
|
||||
|
||||
m_content = std::move(std::string(content_start, content_end));
|
||||
|
||||
if ((m_category == scheme_category::Hierarchical) && (m_content.length() > 0)) {
|
||||
// If it's a hierarchical URI, the content should be parsed for the hierarchical components.
|
||||
std::string::const_iterator path_start = m_content.begin();
|
||||
std::string::const_iterator path_end = m_content.end();
|
||||
if (!m_content.compare(0, 2, "//")) {
|
||||
// In this case an authority component is present.
|
||||
std::string::const_iterator authority_cursor = (m_content.begin() + 2);
|
||||
if (m_content.find_first_of('@') != std::string::npos) {
|
||||
std::string::const_iterator userpass_divider = parse_username(
|
||||
uri_text,
|
||||
m_content,
|
||||
authority_cursor
|
||||
);
|
||||
authority_cursor = parse_password(uri_text, m_content, (userpass_divider + 1));
|
||||
// After this call, *authority_cursor == '@', so we skip over it.
|
||||
++authority_cursor;
|
||||
}
|
||||
|
||||
authority_cursor = parse_host(uri_text, m_content, authority_cursor);
|
||||
|
||||
if ((authority_cursor != m_content.end()) && (*authority_cursor == ':')) {
|
||||
authority_cursor = parse_port(uri_text, m_content, (authority_cursor + 1));
|
||||
}
|
||||
|
||||
if ((authority_cursor != m_content.end()) && (*authority_cursor == '/')) {
|
||||
// Then the path is rooted, and we should note this.
|
||||
m_path_is_rooted = true;
|
||||
path_start = authority_cursor + 1;
|
||||
}
|
||||
|
||||
// If we've reached the end and no path is present then set path_start
|
||||
// to the end.
|
||||
if (authority_cursor == m_content.end()) {
|
||||
path_start = m_content.end();
|
||||
}
|
||||
}
|
||||
else if (!m_content.compare(0, 1, "/")) {
|
||||
m_path_is_rooted = true;
|
||||
++path_start;
|
||||
}
|
||||
|
||||
// We can now build the path based on what remains in the content string,
|
||||
// since that's all that exists after the host and optional port component.
|
||||
m_path = std::move(std::string(path_start, path_end));
|
||||
}
|
||||
return content_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_username(
|
||||
std::string const &uri_text,
|
||||
std::string const &content,
|
||||
std::string::const_iterator username_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator username_end = username_start;
|
||||
// Since this is only reachable when '@' was in the content string, we can
|
||||
// ignore the end-of-string case.
|
||||
while (*username_end != ':') {
|
||||
if (*username_end == '@') {
|
||||
throw std::invalid_argument(
|
||||
"Username must be followed by a password. Supplied URI was: \""
|
||||
+ uri_text + "\"."
|
||||
);
|
||||
}
|
||||
++username_end;
|
||||
}
|
||||
m_username = std::move(std::string(username_start, username_end));
|
||||
return username_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_password(
|
||||
std::string const &uri_text,
|
||||
std::string const &content,
|
||||
std::string::const_iterator password_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator password_end = password_start;
|
||||
while (*password_end != '@') {
|
||||
++password_end;
|
||||
}
|
||||
|
||||
m_password = std::move(std::string(password_start, password_end));
|
||||
return password_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_host(
|
||||
std::string const &uri_text,
|
||||
std::string const &content,
|
||||
std::string::const_iterator host_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator host_end = host_start;
|
||||
// So, the host can contain a few things. It can be a domain, it can be an
|
||||
// IPv4 address, it can be an IPv6 address, or an IPvFuture literal. In the
|
||||
// case of those last two, it's of the form [...] where what's between the
|
||||
// brackets is a matter of which IPv?? version it is.
|
||||
while (host_end != content.end()) {
|
||||
if (*host_end == '[') {
|
||||
// We're parsing an IPv6 or IPvFuture address, so we should handle that
|
||||
// instead of the normal procedure.
|
||||
while ((host_end != content.end()) && (*host_end != ']')) {
|
||||
++host_end;
|
||||
}
|
||||
|
||||
if (host_end == content.end()) {
|
||||
throw std::invalid_argument(
|
||||
"End of content component encountered "
|
||||
"while parsing the host component. "
|
||||
"Supplied URI was: \""
|
||||
+ uri_text + "\"."
|
||||
);
|
||||
}
|
||||
|
||||
++host_end;
|
||||
break;
|
||||
// We can stop looping, we found the end of the IP literal, which is the
|
||||
// whole of the host component when one's in use.
|
||||
}
|
||||
else if ((*host_end == ':') || (*host_end == '/')) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
++host_end;
|
||||
}
|
||||
}
|
||||
|
||||
m_host = std::move(std::string(host_start, host_end));
|
||||
return host_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_port(
|
||||
std::string const &uri_text,
|
||||
std::string const &content,
|
||||
std::string::const_iterator port_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator port_end = port_start;
|
||||
while ((port_end != content.end()) && (*port_end != '/')) {
|
||||
if (!std::isdigit(*port_end)) {
|
||||
throw std::invalid_argument(
|
||||
"Invalid character while parsing the port. "
|
||||
"Supplied URI was: \"" + uri_text + "\"."
|
||||
);
|
||||
}
|
||||
|
||||
++port_end;
|
||||
}
|
||||
|
||||
m_port = std::stoul(std::string(port_start, port_end));
|
||||
return port_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_query(
|
||||
std::string const &uri_text,
|
||||
std::string::const_iterator query_start
|
||||
)
|
||||
{
|
||||
std::string::const_iterator query_end = query_start;
|
||||
while ((query_end != uri_text.end()) && (*query_end != '#')) {
|
||||
// Queries can contain almost any character except hash, which is reserved
|
||||
// for the start of the fragment.
|
||||
++query_end;
|
||||
}
|
||||
m_query = std::move(std::string(query_start, query_end));
|
||||
return query_end;
|
||||
};
|
||||
|
||||
std::string::const_iterator parse_fragment(
|
||||
std::string const &uri_text,
|
||||
std::string::const_iterator fragment_start
|
||||
)
|
||||
{
|
||||
m_fragment = std::move(std::string(fragment_start, uri_text.end()));
|
||||
return uri_text.end();
|
||||
};
|
||||
|
||||
void init_query_dictionary()
|
||||
{
|
||||
if (!m_query.empty()) {
|
||||
// Loop over the query string looking for '&'s, then check each one for
|
||||
// an '=' to find keys and values; if there's not an '=' then the key
|
||||
// will have an empty value in the map.
|
||||
char separator = (m_separator == query_argument_separator::ampersand) ? '&' : ';';
|
||||
size_t carat = 0;
|
||||
size_t stanza_end = m_query.find_first_of(separator);
|
||||
do {
|
||||
std::string stanza = m_query.substr(
|
||||
carat,
|
||||
((stanza_end != std::string::npos) ? (stanza_end - carat) : std::string::npos));
|
||||
size_t key_value_divider = stanza.find_first_of('=');
|
||||
std::string key = stanza.substr(0, key_value_divider);
|
||||
std::string value;
|
||||
if (key_value_divider != std::string::npos) {
|
||||
value = stanza.substr((key_value_divider + 1));
|
||||
}
|
||||
|
||||
if (m_query_dict.count(key) != 0) {
|
||||
throw std::invalid_argument("Bad key in the query string!");
|
||||
}
|
||||
|
||||
m_query_dict.emplace(key, value);
|
||||
carat = ((stanza_end != std::string::npos) ? (stanza_end + 1)
|
||||
: std::string::npos);
|
||||
stanza_end = m_query.find_first_of(separator, carat);
|
||||
} while ((stanza_end != std::string::npos)
|
||||
|| (carat != std::string::npos));
|
||||
}
|
||||
}
|
||||
|
||||
std::string m_scheme;
|
||||
std::string m_content;
|
||||
std::string m_username;
|
||||
std::string m_password;
|
||||
std::string m_host;
|
||||
std::string m_path;
|
||||
std::string m_query;
|
||||
std::string m_fragment;
|
||||
|
||||
std::map<std::string, std::string> m_query_dict;
|
||||
|
||||
scheme_category m_category;
|
||||
unsigned long m_port;
|
||||
bool m_path_is_rooted;
|
||||
query_argument_separator m_separator;
|
||||
};
|
||||
@@ -224,7 +224,7 @@ EQ::ItemInstance* EQ::InventoryProfile::GetItem(int16 slot_id, uint8 bagidx) con
|
||||
return GetItem(InventoryProfile::CalcSlotId(slot_id, bagidx));
|
||||
}
|
||||
|
||||
// Put an item snto specified slot
|
||||
// Put an item into specified slot
|
||||
int16 EQ::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst)
|
||||
{
|
||||
if (slot_id <= EQ::invslot::POSSESSIONS_END && slot_id >= EQ::invslot::POSSESSIONS_BEGIN) {
|
||||
|
||||
@@ -190,6 +190,7 @@ namespace EQ
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
|
||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
|
||||
std::string GetCustomItemData(int16 slot_id, std::string identifier);
|
||||
static int GetItemStatValue(uint32 item_id, const char* identifier);
|
||||
protected:
|
||||
///////////////////////////////
|
||||
// Protected Methods
|
||||
|
||||
+1
-1
@@ -482,7 +482,7 @@ namespace EQ
|
||||
uint32 Haste;
|
||||
uint32 DamageShield;
|
||||
uint32 RecastDelay;
|
||||
uint32 RecastType;
|
||||
int RecastType;
|
||||
uint32 AugDistiller;
|
||||
bool Attuneable;
|
||||
bool NoPet;
|
||||
|
||||
@@ -21,32 +21,16 @@ EQ::Net::ServertalkClient::~ServertalkClient()
|
||||
|
||||
void EQ::Net::ServertalkClient::Send(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
// pad zero size packets
|
||||
if (p.Length() == 0) {
|
||||
p.PutUInt8(0, 0);
|
||||
}
|
||||
|
||||
EQ::Net::DynamicPacket out;
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (m_encrypted) {
|
||||
if (p.Length() == 0) {
|
||||
p.PutUInt8(0, 0);
|
||||
}
|
||||
|
||||
out.PutUInt32(0, p.Length() + crypto_secretbox_MACBYTES);
|
||||
out.PutUInt16(4, opcode);
|
||||
|
||||
std::unique_ptr<unsigned char[]> cipher(new unsigned char[p.Length() + crypto_secretbox_MACBYTES]);
|
||||
|
||||
crypto_box_easy_afternm(&cipher[0], (unsigned char*)p.Data(), p.Length(), m_nonce_ours, m_shared_key);
|
||||
(*(uint64_t*)&m_nonce_ours[0])++;
|
||||
out.PutData(6, &cipher[0], p.Length() + crypto_secretbox_MACBYTES);
|
||||
}
|
||||
else {
|
||||
out.PutUInt32(0, p.Length());
|
||||
out.PutUInt16(4, opcode);
|
||||
out.PutPacket(6, p);
|
||||
}
|
||||
#else
|
||||
out.PutUInt32(0, p.Length());
|
||||
out.PutUInt16(4, opcode);
|
||||
out.PutPacket(6, p);
|
||||
#endif
|
||||
|
||||
InternalSend(ServertalkMessage, out);
|
||||
}
|
||||
|
||||
@@ -87,14 +71,18 @@ void EQ::Net::ServertalkClient::Connect()
|
||||
m_connection = connection;
|
||||
m_connection->OnDisconnect([this](EQ::Net::TCPConnection *c) {
|
||||
LogF(Logs::General, Logs::TCPConnection, "Connection lost to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
m_encrypted = false;
|
||||
m_connection.reset();
|
||||
});
|
||||
|
||||
m_connection->OnRead(std::bind(&EQ::Net::ServertalkClient::ProcessData, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
m_connection->Start();
|
||||
|
||||
SendHello();
|
||||
SendHandshake();
|
||||
|
||||
if (m_on_connect_cb) {
|
||||
m_on_connect_cb(this);
|
||||
}
|
||||
|
||||
m_connecting = false;
|
||||
});
|
||||
}
|
||||
@@ -188,67 +176,11 @@ void EQ::Net::ServertalkClient::ProcessReadBuffer()
|
||||
|
||||
void EQ::Net::ServertalkClient::ProcessHello(EQ::Net::Packet &p)
|
||||
{
|
||||
#ifdef ENABLE_SECURITY
|
||||
memset(m_public_key_ours, 0, crypto_box_PUBLICKEYBYTES);
|
||||
memset(m_public_key_theirs, 0, crypto_box_PUBLICKEYBYTES);
|
||||
memset(m_private_key_ours, 0, crypto_box_SECRETKEYBYTES);
|
||||
memset(m_nonce_ours, 0, crypto_box_NONCEBYTES);
|
||||
memset(m_nonce_theirs, 0, crypto_box_NONCEBYTES);
|
||||
memset(m_shared_key, 0, crypto_box_BEFORENMBYTES);
|
||||
m_encrypted = false;
|
||||
|
||||
try {
|
||||
bool enc = p.GetInt8(0) == 1 ? true : false;
|
||||
|
||||
if (enc) {
|
||||
if (p.Length() == (1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES)) {
|
||||
memcpy(m_public_key_theirs, (char*)p.Data() + 1, crypto_box_PUBLICKEYBYTES);
|
||||
memcpy(m_nonce_theirs, (char*)p.Data() + 1 + crypto_box_PUBLICKEYBYTES, crypto_box_NONCEBYTES);
|
||||
m_encrypted = true;
|
||||
|
||||
SendHandshake();
|
||||
|
||||
if (m_on_connect_cb) {
|
||||
m_on_connect_cb(this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogError("Could not process hello, size != {0}", 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SendHandshake();
|
||||
|
||||
if (m_on_connect_cb) {
|
||||
m_on_connect_cb(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
LogError("Error parsing hello from server: {0}", ex.what());
|
||||
m_connection->Disconnect();
|
||||
SendHandshake();
|
||||
|
||||
if (m_on_connect_cb) {
|
||||
m_on_connect_cb(nullptr);
|
||||
}
|
||||
}
|
||||
#else
|
||||
try {
|
||||
bool enc = p.GetInt8(0) == 1 ? true : false;
|
||||
|
||||
if (enc) {
|
||||
SendHandshake(true);
|
||||
|
||||
if (m_on_connect_cb) {
|
||||
m_on_connect_cb(this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SendHandshake();
|
||||
|
||||
if (m_on_connect_cb) {
|
||||
m_on_connect_cb(this);
|
||||
}
|
||||
m_on_connect_cb(this);
|
||||
}
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
@@ -259,7 +191,6 @@ void EQ::Net::ServertalkClient::ProcessHello(EQ::Net::Packet &p)
|
||||
m_on_connect_cb(nullptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkClient::ProcessMessage(EQ::Net::Packet &p)
|
||||
@@ -269,45 +200,7 @@ void EQ::Net::ServertalkClient::ProcessMessage(EQ::Net::Packet &p)
|
||||
auto opcode = p.GetUInt16(4);
|
||||
if (length > 0) {
|
||||
auto data = p.GetString(6, length);
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (m_encrypted) {
|
||||
size_t message_len = length - crypto_secretbox_MACBYTES;
|
||||
std::unique_ptr<unsigned char[]> decrypted_text(new unsigned char[message_len]);
|
||||
if (crypto_box_open_easy_afternm(&decrypted_text[0], (unsigned char*)&data[0], length, m_nonce_theirs, m_shared_key))
|
||||
{
|
||||
LogError("Error decrypting message from server");
|
||||
(*(uint64_t*)&m_nonce_theirs[0])++;
|
||||
return;
|
||||
}
|
||||
|
||||
EQ::Net::StaticPacket decrypted_packet(&decrypted_text[0], message_len);
|
||||
|
||||
(*(uint64_t*)&m_nonce_theirs[0])++;
|
||||
|
||||
auto cb = m_message_callbacks.find(opcode);
|
||||
if (cb != m_message_callbacks.end()) {
|
||||
cb->second(opcode, decrypted_packet);
|
||||
}
|
||||
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, decrypted_packet);
|
||||
}
|
||||
}
|
||||
else {
|
||||
size_t message_len = length;
|
||||
EQ::Net::StaticPacket packet(&data[0], message_len);
|
||||
|
||||
auto cb = m_message_callbacks.find(opcode);
|
||||
if (cb != m_message_callbacks.end()) {
|
||||
cb->second(opcode, packet);
|
||||
}
|
||||
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, packet);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
size_t message_len = length;
|
||||
EQ::Net::StaticPacket packet(&data[0], message_len);
|
||||
|
||||
@@ -319,7 +212,6 @@ void EQ::Net::ServertalkClient::ProcessMessage(EQ::Net::Packet &p)
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, packet);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
@@ -327,54 +219,11 @@ void EQ::Net::ServertalkClient::ProcessMessage(EQ::Net::Packet &p)
|
||||
}
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkClient::SendHandshake(bool downgrade)
|
||||
void EQ::Net::ServertalkClient::SendHandshake()
|
||||
{
|
||||
EQ::Net::DynamicPacket handshake;
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (m_encrypted) {
|
||||
crypto_box_keypair(m_public_key_ours, m_private_key_ours);
|
||||
randombytes_buf(m_nonce_ours, crypto_box_NONCEBYTES);
|
||||
|
||||
crypto_box_beforenm(m_shared_key, m_public_key_theirs, m_private_key_ours);
|
||||
|
||||
handshake.PutData(0, m_public_key_ours, crypto_box_PUBLICKEYBYTES);
|
||||
handshake.PutData(crypto_box_PUBLICKEYBYTES, m_nonce_ours, crypto_box_NONCEBYTES);
|
||||
|
||||
memset(m_public_key_ours, 0, crypto_box_PUBLICKEYBYTES);
|
||||
memset(m_public_key_theirs, 0, crypto_box_PUBLICKEYBYTES);
|
||||
memset(m_private_key_ours, 0, crypto_box_SECRETKEYBYTES);
|
||||
|
||||
size_t cipher_length = m_identifier.length() + 1 + m_credentials.length() + 1 + crypto_secretbox_MACBYTES;
|
||||
size_t data_length = m_identifier.length() + 1 + m_credentials.length() + 1;
|
||||
|
||||
std::unique_ptr<unsigned char[]> signed_buffer(new unsigned char[cipher_length]);
|
||||
std::unique_ptr<unsigned char[]> data_buffer(new unsigned char[data_length]);
|
||||
|
||||
memset(&data_buffer[0], 0, data_length);
|
||||
memcpy(&data_buffer[0], m_identifier.c_str(), m_identifier.length());
|
||||
memcpy(&data_buffer[1 + m_identifier.length()], m_credentials.c_str(), m_credentials.length());
|
||||
|
||||
crypto_box_easy_afternm(&signed_buffer[0], &data_buffer[0], data_length, m_nonce_ours, m_shared_key);
|
||||
|
||||
(*(uint64_t*)&m_nonce_ours[0])++;
|
||||
|
||||
handshake.PutData(crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES, &signed_buffer[0], cipher_length);
|
||||
}
|
||||
else {
|
||||
handshake.PutString(0, m_identifier);
|
||||
handshake.PutString(m_identifier.length() + 1, m_credentials);
|
||||
handshake.PutUInt8(m_identifier.length() + 1 + m_credentials.length(), 0);
|
||||
}
|
||||
#else
|
||||
handshake.PutString(0, m_identifier);
|
||||
handshake.PutString(m_identifier.length() + 1, m_credentials);
|
||||
handshake.PutUInt8(m_identifier.length() + 1 + m_credentials.length(), 0);
|
||||
#endif
|
||||
|
||||
if (downgrade) {
|
||||
InternalSend(ServertalkClientDowngradeSecurityHandshake, handshake);
|
||||
}
|
||||
else {
|
||||
InternalSend(ServertalkClientHandshake, handshake);
|
||||
}
|
||||
InternalSend(ServertalkClientDowngradeSecurityHandshake, handshake);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
#include "../event/timer.h"
|
||||
#include "servertalk_common.h"
|
||||
#include "packet.h"
|
||||
#ifdef ENABLE_SECURITY
|
||||
#include <sodium.h>
|
||||
#endif
|
||||
|
||||
namespace EQ
|
||||
{
|
||||
@@ -34,8 +31,7 @@ namespace EQ
|
||||
void ProcessReadBuffer();
|
||||
void ProcessHello(EQ::Net::Packet &p);
|
||||
void ProcessMessage(EQ::Net::Packet &p);
|
||||
void SendHandshake() { SendHandshake(false); }
|
||||
void SendHandshake(bool downgrade);
|
||||
void SendHandshake();
|
||||
|
||||
std::unique_ptr<EQ::Timer> m_timer;
|
||||
|
||||
@@ -45,23 +41,11 @@ namespace EQ
|
||||
bool m_connecting;
|
||||
int m_port;
|
||||
bool m_ipv6;
|
||||
bool m_encrypted;
|
||||
std::shared_ptr<EQ::Net::TCPConnection> m_connection;
|
||||
std::vector<char> m_buffer;
|
||||
std::unordered_map<uint16_t, std::function<void(uint16_t, EQ::Net::Packet&)>> m_message_callbacks;
|
||||
std::function<void(uint16_t, EQ::Net::Packet&)> m_message_callback;
|
||||
std::function<void(ServertalkClient*)> m_on_connect_cb;
|
||||
|
||||
#ifdef ENABLE_SECURITY
|
||||
unsigned char m_public_key_ours[crypto_box_PUBLICKEYBYTES];
|
||||
unsigned char m_private_key_ours[crypto_box_SECRETKEYBYTES];
|
||||
unsigned char m_nonce_ours[crypto_box_NONCEBYTES];
|
||||
|
||||
unsigned char m_public_key_theirs[crypto_box_PUBLICKEYBYTES];
|
||||
unsigned char m_nonce_theirs[crypto_box_NONCEBYTES];
|
||||
|
||||
unsigned char m_shared_key[crypto_box_BEFORENMBYTES];
|
||||
#endif
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@ namespace EQ
|
||||
ServertalkMessage,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,10 @@ EQ::Net::ServertalkServer::~ServertalkServer()
|
||||
|
||||
void EQ::Net::ServertalkServer::Listen(const ServertalkServerOptions& opts)
|
||||
{
|
||||
m_encrypted = opts.encrypted;
|
||||
m_credentials = opts.credentials;
|
||||
m_allow_downgrade = opts.allow_downgrade;
|
||||
m_server = std::make_unique<EQ::Net::TCPServer>();
|
||||
m_server->Listen(opts.port, opts.ipv6, [this](std::shared_ptr<EQ::Net::TCPConnection> connection) {
|
||||
m_unident_connections.push_back(std::make_shared<ServertalkServerConnection>(connection, this, m_encrypted, m_allow_downgrade));
|
||||
m_unident_connections.push_back(std::make_shared<ServertalkServerConnection>(connection, this));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#ifdef ENABLE_SECURITY
|
||||
#include <sodium.h>
|
||||
#endif
|
||||
|
||||
namespace EQ
|
||||
{
|
||||
namespace Net
|
||||
@@ -17,18 +13,9 @@ namespace EQ
|
||||
{
|
||||
int port;
|
||||
bool ipv6;
|
||||
bool encrypted;
|
||||
bool allow_downgrade;
|
||||
std::string credentials;
|
||||
|
||||
ServertalkServerOptions() {
|
||||
#ifdef ENABLE_SECURITY
|
||||
encrypted = true;
|
||||
allow_downgrade = true;
|
||||
#else
|
||||
encrypted = false;
|
||||
allow_downgrade = true;
|
||||
#endif
|
||||
ipv6 = false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3,16 +3,15 @@
|
||||
#include "../eqemu_logsys.h"
|
||||
#include "../util/uuid.h"
|
||||
|
||||
EQ::Net::ServertalkServerConnection::ServertalkServerConnection(std::shared_ptr<EQ::Net::TCPConnection> c, EQ::Net::ServertalkServer *parent, bool encrypted, bool allow_downgrade)
|
||||
EQ::Net::ServertalkServerConnection::ServertalkServerConnection(std::shared_ptr<EQ::Net::TCPConnection> c, EQ::Net::ServertalkServer *parent)
|
||||
{
|
||||
m_connection = c;
|
||||
m_parent = parent;
|
||||
m_encrypted = encrypted;
|
||||
m_allow_downgrade = allow_downgrade;
|
||||
m_uuid = EQ::Util::UUID::Generate().ToString();
|
||||
m_connection->OnRead(std::bind(&ServertalkServerConnection::OnRead, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
m_connection->OnDisconnect(std::bind(&ServertalkServerConnection::OnDisconnect, this, std::placeholders::_1));
|
||||
m_connection->Start();
|
||||
m_legacy_mode = false;
|
||||
}
|
||||
|
||||
EQ::Net::ServertalkServerConnection::~ServertalkServerConnection()
|
||||
@@ -21,32 +20,73 @@ EQ::Net::ServertalkServerConnection::~ServertalkServerConnection()
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::Send(uint16_t opcode, EQ::Net::Packet & p)
|
||||
{
|
||||
EQ::Net::DynamicPacket out;
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (m_encrypted) {
|
||||
if (p.Length() == 0) {
|
||||
if (m_legacy_mode) {
|
||||
if (!m_connection)
|
||||
return;
|
||||
|
||||
if (opcode == ServerOP_UsertoWorldReq) {
|
||||
auto req_in = (UsertoWorldRequest_Struct*)p.Data();
|
||||
|
||||
EQ::Net::DynamicPacket req;
|
||||
size_t i = 0;
|
||||
req.PutUInt32(i, req_in->lsaccountid); i += 4;
|
||||
req.PutUInt32(i, req_in->worldid); i += 4;
|
||||
req.PutUInt32(i, req_in->FromID); i += 4;
|
||||
req.PutUInt32(i, req_in->ToID); i += 4;
|
||||
req.PutData(i, req_in->IPAddr, 64); i += 64;
|
||||
|
||||
EQ::Net::DynamicPacket out;
|
||||
out.PutUInt16(0, ServerOP_UsertoWorldReqLeg);
|
||||
out.PutUInt16(2, req.Length() + 4);
|
||||
out.PutPacket(4, req);
|
||||
|
||||
m_connection->Write((const char*)out.Data(), out.Length());
|
||||
return;
|
||||
}
|
||||
|
||||
if (opcode == ServerOP_LSClientAuth) {
|
||||
auto req_in = (ClientAuth_Struct*)p.Data();
|
||||
|
||||
EQ::Net::DynamicPacket req;
|
||||
size_t i = 0;
|
||||
req.PutUInt32(i, req_in->loginserver_account_id); i += 4;
|
||||
req.PutData(i, req_in->account_name, 30); i += 30;
|
||||
req.PutData(i, req_in->key, 30); i += 30;
|
||||
req.PutUInt8(i, req_in->lsadmin); i += 1;
|
||||
req.PutUInt16(i, req_in->is_world_admin); i += 2;
|
||||
req.PutUInt32(i, req_in->ip); i += 4;
|
||||
req.PutUInt8(i, req_in->is_client_from_local_network); i += 1;
|
||||
|
||||
EQ::Net::DynamicPacket out;
|
||||
out.PutUInt16(0, ServerOP_LSClientAuthLeg);
|
||||
out.PutUInt16(2, req.Length() + 4);
|
||||
out.PutPacket(4, req);
|
||||
|
||||
m_connection->Write((const char*)out.Data(), out.Length());
|
||||
return;
|
||||
}
|
||||
|
||||
EQ::Net::DynamicPacket out;
|
||||
out.PutUInt16(0, opcode);
|
||||
out.PutUInt16(2, p.Length() + 4);
|
||||
out.PutPacket(4, p);
|
||||
|
||||
m_connection->Write((const char*)out.Data(), out.Length());
|
||||
} else {
|
||||
// pad zero size packets
|
||||
// pad packets that would cause a collision with legacy identification code
|
||||
// It's unlikely we'd send a 4MB msg for any reason but just incase.
|
||||
if (p.Length() == 0 || p.Length() == 43061256) {
|
||||
p.PutUInt8(0, 0);
|
||||
}
|
||||
|
||||
out.PutUInt32(0, p.Length() + crypto_secretbox_MACBYTES);
|
||||
out.PutUInt16(4, opcode);
|
||||
|
||||
std::unique_ptr<unsigned char[]> cipher(new unsigned char[p.Length() + crypto_secretbox_MACBYTES]);
|
||||
crypto_box_easy_afternm(&cipher[0], (unsigned char*)p.Data(), p.Length(), m_nonce_ours, m_shared_key);
|
||||
(*(uint64_t*)&m_nonce_ours[0])++;
|
||||
out.PutData(6, &cipher[0], p.Length() + crypto_secretbox_MACBYTES);
|
||||
}
|
||||
else {
|
||||
EQ::Net::DynamicPacket out;
|
||||
out.PutUInt32(0, p.Length());
|
||||
out.PutUInt16(4, opcode);
|
||||
out.PutPacket(6, p);
|
||||
|
||||
InternalSend(ServertalkMessage, out);
|
||||
}
|
||||
#else
|
||||
out.PutUInt32(0, p.Length());
|
||||
out.PutUInt16(4, opcode);
|
||||
out.PutPacket(6, p);
|
||||
#endif
|
||||
InternalSend(ServertalkMessage, out);
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::SendPacket(ServerPacket *p)
|
||||
@@ -71,17 +111,41 @@ void EQ::Net::ServertalkServerConnection::OnMessage(std::function<void(uint16_t,
|
||||
void EQ::Net::ServertalkServerConnection::OnRead(TCPConnection *c, const unsigned char *data, size_t sz)
|
||||
{
|
||||
m_buffer.insert(m_buffer.end(), (const char*)data, (const char*)data + sz);
|
||||
ProcessReadBuffer();
|
||||
|
||||
if (m_legacy_mode) {
|
||||
ProcessOldReadBuffer();
|
||||
} else {
|
||||
ProcessReadBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::ProcessReadBuffer()
|
||||
{
|
||||
size_t current = 0;
|
||||
size_t total = m_buffer.size();
|
||||
constexpr size_t ls_info_size = sizeof(ServerNewLSInfo_Struct);
|
||||
|
||||
while (current < total) {
|
||||
auto left = total - current;
|
||||
|
||||
if (left < 4) {
|
||||
break;
|
||||
}
|
||||
|
||||
auto leg_opcode = *(uint16_t*)&m_buffer[current];
|
||||
auto leg_size = *(uint16_t*)&m_buffer[current + 2] - 4;
|
||||
|
||||
//this creates a small edge case where the exact size of a
|
||||
//packet from the modern protocol can't be "43061256"
|
||||
//so in send we pad it one byte if that's the case
|
||||
if (leg_opcode == ServerOP_NewLSInfo && leg_size == sizeof(ServerNewLSInfo_Struct)) {
|
||||
m_legacy_mode = true;
|
||||
m_identifier = "World";
|
||||
m_parent->ConnectionIdentified(this);
|
||||
ProcessOldReadBuffer();
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
//header:
|
||||
//uint32 length;
|
||||
@@ -109,6 +173,7 @@ void EQ::Net::ServertalkServerConnection::ProcessReadBuffer()
|
||||
}
|
||||
break;
|
||||
case ServertalkClientHandshake:
|
||||
case ServertalkClientDowngradeSecurityHandshake:
|
||||
ProcessHandshake(p);
|
||||
break;
|
||||
case ServertalkMessage:
|
||||
@@ -125,10 +190,8 @@ void EQ::Net::ServertalkServerConnection::ProcessReadBuffer()
|
||||
}
|
||||
break;
|
||||
case ServertalkClientHandshake:
|
||||
ProcessHandshake(p);
|
||||
break;
|
||||
case ServertalkClientDowngradeSecurityHandshake:
|
||||
ProcessHandshake(p, true);
|
||||
ProcessHandshake(p);
|
||||
break;
|
||||
case ServertalkMessage:
|
||||
ProcessMessage(p);
|
||||
@@ -147,6 +210,57 @@ void EQ::Net::ServertalkServerConnection::ProcessReadBuffer()
|
||||
}
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::ProcessOldReadBuffer()
|
||||
{
|
||||
size_t current = 0;
|
||||
size_t total = m_buffer.size();
|
||||
|
||||
while (current < total) {
|
||||
auto left = total - current;
|
||||
|
||||
/*
|
||||
//header:
|
||||
//uint32 length;
|
||||
//uint8 type;
|
||||
*/
|
||||
uint16_t length = 0;
|
||||
uint16_t opcode = 0;
|
||||
if (left < 4) {
|
||||
break;
|
||||
}
|
||||
|
||||
opcode = *(uint16_t*)&m_buffer[current];
|
||||
length = *(uint16_t*)&m_buffer[current + 2];
|
||||
if (length < 4) {
|
||||
break;
|
||||
}
|
||||
|
||||
length -= 4;
|
||||
|
||||
if (current + 4 + length > total) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (length == 0) {
|
||||
EQ::Net::DynamicPacket p;
|
||||
ProcessMessageOld(opcode, p);
|
||||
}
|
||||
else {
|
||||
EQ::Net::StaticPacket p(&m_buffer[current + 4], length);
|
||||
ProcessMessageOld(opcode, p);
|
||||
}
|
||||
|
||||
current += length + 4;
|
||||
}
|
||||
|
||||
if (current == total) {
|
||||
m_buffer.clear();
|
||||
}
|
||||
else {
|
||||
m_buffer.erase(m_buffer.begin(), m_buffer.begin() + current);
|
||||
}
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::OnDisconnect(TCPConnection *c)
|
||||
{
|
||||
m_parent->ConnectionDisconnected(this);
|
||||
@@ -155,36 +269,14 @@ void EQ::Net::ServertalkServerConnection::OnDisconnect(TCPConnection *c)
|
||||
void EQ::Net::ServertalkServerConnection::SendHello()
|
||||
{
|
||||
EQ::Net::DynamicPacket hello;
|
||||
|
||||
#ifdef ENABLE_SECURITY
|
||||
memset(m_public_key_ours, 0, crypto_box_PUBLICKEYBYTES);
|
||||
memset(m_public_key_theirs, 0, crypto_box_PUBLICKEYBYTES);
|
||||
memset(m_private_key_ours, 0, crypto_box_SECRETKEYBYTES);
|
||||
memset(m_nonce_ours, 0, crypto_box_NONCEBYTES);
|
||||
memset(m_nonce_theirs, 0, crypto_box_NONCEBYTES);
|
||||
|
||||
if (m_encrypted) {
|
||||
hello.PutInt8(0, 1);
|
||||
|
||||
crypto_box_keypair(m_public_key_ours, m_private_key_ours);
|
||||
randombytes_buf(m_nonce_ours, crypto_box_NONCEBYTES);
|
||||
|
||||
hello.PutData(1, m_public_key_ours, crypto_box_PUBLICKEYBYTES);
|
||||
hello.PutData(1 + crypto_box_PUBLICKEYBYTES, m_nonce_ours, crypto_box_NONCEBYTES);
|
||||
}
|
||||
else {
|
||||
hello.PutInt8(0, 0);
|
||||
}
|
||||
#else
|
||||
hello.PutInt8(0, 0);
|
||||
#endif
|
||||
|
||||
InternalSend(ServertalkServerHello, hello);
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::InternalSend(ServertalkPacketType type, EQ::Net::Packet &p)
|
||||
{
|
||||
if (!m_connection)
|
||||
if (!m_connection || m_legacy_mode)
|
||||
return;
|
||||
|
||||
EQ::Net::DynamicPacket out;
|
||||
@@ -197,71 +289,8 @@ void EQ::Net::ServertalkServerConnection::InternalSend(ServertalkPacketType type
|
||||
m_connection->Write((const char*)out.Data(), out.Length());
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::ProcessHandshake(EQ::Net::Packet &p, bool downgrade_security)
|
||||
void EQ::Net::ServertalkServerConnection::ProcessHandshake(EQ::Net::Packet &p)
|
||||
{
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (downgrade_security && m_allow_downgrade && m_encrypted) {
|
||||
LogF(Logs::General, Logs::TCPConnection, "Downgraded encrypted connection to plaintext because otherside didn't support encryption {0}:{1}",
|
||||
m_connection->RemoteIP(), m_connection->RemotePort());
|
||||
m_encrypted = false;
|
||||
}
|
||||
|
||||
if (m_encrypted) {
|
||||
try {
|
||||
if (p.Length() > (crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES)) {
|
||||
memcpy(m_public_key_theirs, (char*)p.Data(), crypto_box_PUBLICKEYBYTES);
|
||||
memcpy(m_nonce_theirs, (char*)p.Data() + crypto_box_PUBLICKEYBYTES, crypto_box_NONCEBYTES);
|
||||
|
||||
crypto_box_beforenm(m_shared_key, m_public_key_theirs, m_private_key_ours);
|
||||
|
||||
size_t cipher_len = p.Length() - crypto_box_PUBLICKEYBYTES - crypto_box_NONCEBYTES;
|
||||
size_t message_len = cipher_len - crypto_secretbox_MACBYTES;
|
||||
std::unique_ptr<unsigned char[]> decrypted_text(new unsigned char[message_len]);
|
||||
|
||||
if (crypto_box_open_easy_afternm(&decrypted_text[0], (unsigned char*)p.Data() + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES, cipher_len, m_nonce_theirs, m_shared_key))
|
||||
{
|
||||
LogError("Error decrypting handshake from client, dropping connection.");
|
||||
m_connection->Disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
m_identifier = (const char*)&decrypted_text[0];
|
||||
std::string credentials = (const char*)&decrypted_text[0] + (m_identifier.length() + 1);
|
||||
|
||||
if (!m_parent->CheckCredentials(credentials)) {
|
||||
LogError("Got incoming connection with invalid credentials during handshake, dropping connection.");
|
||||
m_connection->Disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
m_parent->ConnectionIdentified(this);
|
||||
(*(uint64_t*)&m_nonce_theirs[0])++;
|
||||
}
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
LogError("Error parsing handshake from client: {0}", ex.what());
|
||||
m_connection->Disconnect();
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
m_identifier = p.GetCString(0);
|
||||
auto credentials = p.GetCString(m_identifier.length() + 1);
|
||||
|
||||
if (!m_parent->CheckCredentials(credentials)) {
|
||||
LogError("Got incoming connection with invalid credentials during handshake, dropping connection.");
|
||||
m_connection->Disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
m_parent->ConnectionIdentified(this);
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
LogError("Error parsing handshake from client: {0}", ex.what());
|
||||
m_connection->Disconnect();
|
||||
}
|
||||
}
|
||||
#else
|
||||
try {
|
||||
m_identifier = p.GetCString(0);
|
||||
auto credentials = p.GetCString(m_identifier.length() + 1);
|
||||
@@ -278,7 +307,6 @@ void EQ::Net::ServertalkServerConnection::ProcessHandshake(EQ::Net::Packet &p, b
|
||||
LogError("Error parsing handshake from client: {0}", ex.what());
|
||||
m_connection->Disconnect();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::ProcessMessage(EQ::Net::Packet &p)
|
||||
@@ -288,46 +316,6 @@ void EQ::Net::ServertalkServerConnection::ProcessMessage(EQ::Net::Packet &p)
|
||||
auto opcode = p.GetUInt16(4);
|
||||
if (length > 0) {
|
||||
auto data = p.GetString(6, length);
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (m_encrypted) {
|
||||
size_t message_len = length - crypto_secretbox_MACBYTES;
|
||||
std::unique_ptr<unsigned char[]> decrypted_text(new unsigned char[message_len]);
|
||||
|
||||
if (crypto_box_open_easy_afternm(&decrypted_text[0], (unsigned char*)&data[0], length, m_nonce_theirs, m_shared_key))
|
||||
{
|
||||
LogError("Error decrypting message from client");
|
||||
(*(uint64_t*)&m_nonce_theirs[0])++;
|
||||
return;
|
||||
}
|
||||
|
||||
EQ::Net::StaticPacket decrypted_packet(&decrypted_text[0], message_len);
|
||||
|
||||
(*(uint64_t*)&m_nonce_theirs[0])++;
|
||||
|
||||
auto cb = m_message_callbacks.find(opcode);
|
||||
if (cb != m_message_callbacks.end()) {
|
||||
cb->second(opcode, decrypted_packet);
|
||||
}
|
||||
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, decrypted_packet);
|
||||
}
|
||||
}
|
||||
else {
|
||||
size_t message_len = length;
|
||||
EQ::Net::StaticPacket packet(&data[0], message_len);
|
||||
|
||||
auto cb = m_message_callbacks.find(opcode);
|
||||
if (cb != m_message_callbacks.end()) {
|
||||
cb->second(opcode, packet);
|
||||
}
|
||||
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, packet);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
size_t message_len = length;
|
||||
EQ::Net::StaticPacket packet(&data[0], message_len);
|
||||
|
||||
@@ -339,10 +327,26 @@ void EQ::Net::ServertalkServerConnection::ProcessMessage(EQ::Net::Packet &p)
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, packet);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
LogError("Error parsing message from client: {0}", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
void EQ::Net::ServertalkServerConnection::ProcessMessageOld(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
try {
|
||||
auto cb = m_message_callbacks.find(opcode);
|
||||
if (cb != m_message_callbacks.end()) {
|
||||
cb->second(opcode, p);
|
||||
}
|
||||
|
||||
if (m_message_callback) {
|
||||
m_message_callback(opcode, p);
|
||||
}
|
||||
}
|
||||
catch (std::exception &ex) {
|
||||
LogError("Error parsing legacy message from client: {0}", ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
#include "servertalk_common.h"
|
||||
#include "packet.h"
|
||||
#include <vector>
|
||||
#ifdef ENABLE_SECURITY
|
||||
#include <sodium.h>
|
||||
#endif
|
||||
|
||||
namespace EQ
|
||||
{
|
||||
@@ -16,7 +13,7 @@ namespace EQ
|
||||
class ServertalkServerConnection
|
||||
{
|
||||
public:
|
||||
ServertalkServerConnection(std::shared_ptr<EQ::Net::TCPConnection> c, ServertalkServer *parent, bool encrypted, bool allow_downgrade);
|
||||
ServertalkServerConnection(std::shared_ptr<EQ::Net::TCPConnection> c, ServertalkServer *parent);
|
||||
~ServertalkServerConnection();
|
||||
|
||||
void Send(uint16_t opcode, EQ::Net::Packet &p);
|
||||
@@ -30,12 +27,13 @@ namespace EQ
|
||||
private:
|
||||
void OnRead(TCPConnection* c, const unsigned char* data, size_t sz);
|
||||
void ProcessReadBuffer();
|
||||
void ProcessOldReadBuffer();
|
||||
void OnDisconnect(TCPConnection* c);
|
||||
void SendHello();
|
||||
void InternalSend(ServertalkPacketType type, EQ::Net::Packet &p);
|
||||
void ProcessHandshake(EQ::Net::Packet &p) { ProcessHandshake(p, false); }
|
||||
void ProcessHandshake(EQ::Net::Packet &p, bool security_downgrade);
|
||||
void ProcessHandshake(EQ::Net::Packet &p);
|
||||
void ProcessMessage(EQ::Net::Packet &p);
|
||||
void ProcessMessageOld(uint16_t opcode, EQ::Net::Packet &p);
|
||||
|
||||
std::shared_ptr<EQ::Net::TCPConnection> m_connection;
|
||||
ServertalkServer *m_parent;
|
||||
@@ -45,19 +43,7 @@ namespace EQ
|
||||
std::function<void(uint16_t, EQ::Net::Packet&)> m_message_callback;
|
||||
std::string m_identifier;
|
||||
std::string m_uuid;
|
||||
|
||||
bool m_encrypted;
|
||||
bool m_allow_downgrade;
|
||||
#ifdef ENABLE_SECURITY
|
||||
unsigned char m_public_key_ours[crypto_box_PUBLICKEYBYTES];
|
||||
unsigned char m_private_key_ours[crypto_box_SECRETKEYBYTES];
|
||||
unsigned char m_nonce_ours[crypto_box_NONCEBYTES];
|
||||
|
||||
unsigned char m_public_key_theirs[crypto_box_PUBLICKEYBYTES];
|
||||
unsigned char m_nonce_theirs[crypto_box_NONCEBYTES];
|
||||
|
||||
unsigned char m_shared_key[crypto_box_BEFORENMBYTES];
|
||||
#endif
|
||||
bool m_legacy_mode;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1863,8 +1863,8 @@ namespace RoF
|
||||
/*fill in some unknowns with observed values, hopefully it will help */
|
||||
eq->unknown800 = -1;
|
||||
eq->unknown844 = 600;
|
||||
eq->unknown880 = 50;
|
||||
eq->unknown884 = 10;
|
||||
OUT(LavaDamage);
|
||||
OUT(MinLavaDamage);
|
||||
eq->unknown888 = 1;
|
||||
eq->unknown889 = 0;
|
||||
eq->unknown890 = 1;
|
||||
|
||||
@@ -1919,8 +1919,8 @@ namespace RoF2
|
||||
eq->SkyRelated2 = -1;
|
||||
eq->NPCAggroMaxDist = 600;
|
||||
eq->FilterID = 2008; // Guild Lobby observed value
|
||||
eq->LavaDamage = 50;
|
||||
eq->MinLavaDamage = 10;
|
||||
OUT(LavaDamage);
|
||||
OUT(MinLavaDamage);
|
||||
eq->bDisallowManaStone = 1;
|
||||
eq->bNoBind = 0;
|
||||
eq->bNoAttack = 0;
|
||||
|
||||
@@ -4361,8 +4361,8 @@ struct UseAA_Struct {
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
/*16*/
|
||||
};
|
||||
|
||||
@@ -581,8 +581,8 @@ struct NewZone_Struct {
|
||||
/*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions
|
||||
/*0872*/ uint32 scriptIDSomething3;
|
||||
/*0876*/ uint32 SuspendBuffs;
|
||||
/*0880*/ uint32 unknown880; // Seen 50
|
||||
/*0884*/ uint32 unknown884; // Seen 10
|
||||
/*0880*/ uint32 LavaDamage; // Seen 50
|
||||
/*0884*/ uint32 MinLavaDamage; // Seen 10
|
||||
/*0888*/ uint8 unknown888; // Seen 1
|
||||
/*0889*/ uint8 unknown889; // Seen 0 (POK) or 1 (rujj)
|
||||
/*0890*/ uint8 unknown890; // Seen 1
|
||||
@@ -4305,8 +4305,8 @@ struct UseAA_Struct {
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
/*16*/
|
||||
};
|
||||
|
||||
@@ -1388,8 +1388,8 @@ namespace SoD
|
||||
/*fill in some unknowns with observed values, hopefully it will help */
|
||||
eq->unknown800 = -1;
|
||||
eq->unknown844 = 600;
|
||||
eq->unknown880 = 50;
|
||||
eq->unknown884 = 10;
|
||||
OUT(LavaDamage);
|
||||
OUT(MinLavaDamage);
|
||||
eq->unknown888 = 1;
|
||||
eq->unknown889 = 0;
|
||||
eq->unknown890 = 1;
|
||||
@@ -1874,8 +1874,8 @@ namespace SoD
|
||||
|
||||
for(auto i = 0; i < eq->total_abilities; ++i) {
|
||||
eq->abilities[i].skill_id = inapp->ReadUInt32();
|
||||
eq->abilities[i].base1 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base2 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].limit_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].slot = inapp->ReadUInt32();
|
||||
}
|
||||
|
||||
|
||||
@@ -450,8 +450,8 @@ struct NewZone_Struct {
|
||||
/*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions
|
||||
/*0872*/ uint32 scriptIDSomething3;
|
||||
/*0876*/ uint32 SuspendBuffs;
|
||||
/*0880*/ uint32 unknown880; //seen 50
|
||||
/*0884*/ uint32 unknown884; //seen 10
|
||||
/*0880*/ uint32 LavaDamage; //seen 50
|
||||
/*0884*/ uint32 MinLavaDamage; //seen 10
|
||||
/*0888*/ uint8 unknown888; //seen 1
|
||||
/*0889*/ uint8 unknown889; //seen 0 (POK) or 1 (rujj)
|
||||
/*0890*/ uint8 unknown890; //seen 1
|
||||
@@ -3748,8 +3748,8 @@ struct UseAA_Struct {
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
/*16*/
|
||||
};
|
||||
|
||||
@@ -1066,8 +1066,8 @@ namespace SoF
|
||||
/*fill in some unknowns with observed values, hopefully it will help */
|
||||
eq->unknown796 = -1;
|
||||
eq->unknown840 = 600;
|
||||
eq->unknown876 = 50;
|
||||
eq->unknown880 = 10;
|
||||
OUT(LavaDamage);
|
||||
OUT(MinLavaDamage);
|
||||
eq->unknown884 = 1;
|
||||
eq->unknown885 = 0;
|
||||
eq->unknown886 = 1;
|
||||
@@ -1545,8 +1545,8 @@ namespace SoF
|
||||
|
||||
for(auto i = 0; i < eq->total_abilities; ++i) {
|
||||
eq->abilities[i].skill_id = inapp->ReadUInt32();
|
||||
eq->abilities[i].base1 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base2 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].limit_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].slot = inapp->ReadUInt32();
|
||||
}
|
||||
|
||||
|
||||
@@ -454,8 +454,8 @@ struct NewZone_Struct {
|
||||
/*0864*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions
|
||||
/*0868*/ uint32 scriptIDSomething3;
|
||||
/*0872*/ uint32 SuspendBuffs;
|
||||
/*0876*/ uint32 unknown876; //seen 50
|
||||
/*0880*/ uint32 unknown880; //seen 10
|
||||
/*0876*/ uint32 LavaDamage; //seen 50
|
||||
/*0880*/ uint32 MinLavaDamage; //seen 10
|
||||
/*0884*/ uint8 unknown884; //seen 1
|
||||
/*0885*/ uint8 unknown885; //seen 0 (POK) or 1 (rujj)
|
||||
/*0886*/ uint8 unknown886; //seen 1
|
||||
@@ -3673,8 +3673,8 @@ struct UseAA_Struct {
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
/*16*/
|
||||
};
|
||||
|
||||
@@ -1338,8 +1338,8 @@ namespace Titanium
|
||||
|
||||
for(auto i = 0; i < eq->total_abilities; ++i) {
|
||||
eq->abilities[i].skill_id = inapp->ReadUInt32();
|
||||
eq->abilities[i].base1 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base2 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].limit_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].slot = inapp->ReadUInt32();
|
||||
}
|
||||
|
||||
|
||||
@@ -3180,8 +3180,8 @@ struct UseAA_Struct {
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
};
|
||||
|
||||
|
||||
@@ -1614,8 +1614,8 @@ namespace UF
|
||||
/*fill in some unknowns with observed values, hopefully it will help */
|
||||
eq->unknown800 = -1;
|
||||
eq->unknown844 = 600;
|
||||
eq->unknown880 = 50;
|
||||
eq->unknown884 = 10;
|
||||
OUT(LavaDamage);
|
||||
OUT(MinLavaDamage);
|
||||
eq->unknown888 = 1;
|
||||
eq->unknown889 = 0;
|
||||
eq->unknown890 = 1;
|
||||
@@ -2139,8 +2139,8 @@ namespace UF
|
||||
|
||||
for(auto i = 0; i < eq->total_abilities; ++i) {
|
||||
eq->abilities[i].skill_id = inapp->ReadUInt32();
|
||||
eq->abilities[i].base1 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base2 = inapp->ReadUInt32();
|
||||
eq->abilities[i].base_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].limit_value = inapp->ReadUInt32();
|
||||
eq->abilities[i].slot = inapp->ReadUInt32();
|
||||
}
|
||||
|
||||
|
||||
@@ -450,8 +450,8 @@ struct NewZone_Struct {
|
||||
/*0868*/ uint32 underworld_teleport_index; // > 0 teleports w/ zone point index, invalid succors, -1 affects some collisions
|
||||
/*0872*/ uint32 scriptIDSomething3;
|
||||
/*0876*/ uint32 SuspendBuffs;
|
||||
/*0880*/ uint32 unknown880; //seen 50
|
||||
/*0884*/ uint32 unknown884; //seen 10
|
||||
/*0880*/ uint32 LavaDamage; //seen 50
|
||||
/*0884*/ uint32 MinLavaDamage; //seen 10
|
||||
/*0888*/ uint8 unknown888; //seen 1
|
||||
/*0889*/ uint8 unknown889; //seen 0 (POK) or 1 (rujj)
|
||||
/*0890*/ uint8 unknown890; //seen 1
|
||||
@@ -3803,8 +3803,8 @@ struct UseAA_Struct {
|
||||
|
||||
struct AA_Ability {
|
||||
/*00*/ uint32 skill_id;
|
||||
/*04*/ uint32 base1;
|
||||
/*08*/ uint32 base2;
|
||||
/*04*/ uint32 base_value;
|
||||
/*08*/ uint32 limit_value;
|
||||
/*12*/ uint32 slot;
|
||||
/*16*/
|
||||
};
|
||||
|
||||
@@ -45,6 +45,8 @@ enum : int { //values for pTimerType
|
||||
pTimerLinkedSpellReuseStart = 28,
|
||||
pTimerLinkedSpellReuseEnd = 48,
|
||||
|
||||
pTimerShieldAbility = 86,
|
||||
|
||||
pTimerLayHands = 87, //these IDs are used by client too
|
||||
pTimerHarmTouch = 89, //so dont change them
|
||||
|
||||
|
||||
@@ -2232,3 +2232,15 @@ bool PlayerAppearance::IsValidWoad(uint16 race_id, uint8 gender_id, uint8 woad_v
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* GetGenderName(uint32 gender_id) {
|
||||
const char* gender_name = "Unknown";
|
||||
if (gender_id == MALE) {
|
||||
gender_name = "Male";
|
||||
} else if (gender_id == FEMALE) {
|
||||
gender_name = "Female";
|
||||
} else if (gender_id == NEUTER) {
|
||||
gender_name = "Neuter";
|
||||
}
|
||||
return gender_name;
|
||||
}
|
||||
@@ -851,6 +851,7 @@
|
||||
|
||||
const char* GetRaceIDName(uint16 race_id);
|
||||
const char* GetPlayerRaceName(uint32 player_race_value);
|
||||
const char* GetGenderName(uint32 gender_id);
|
||||
|
||||
uint32 GetPlayerRaceValue(uint16 race_id);
|
||||
uint32 GetPlayerRaceBit(uint16 race_id);
|
||||
@@ -1602,6 +1603,14 @@ namespace PlayerAppearance
|
||||
#define RACE_FALLEN_KNIGHT_722 722
|
||||
#define RACE_SERVANT_OF_SHADOW_723 723
|
||||
#define RACE_LUCLIN_724 724
|
||||
#define RACE_XARIC_725 725
|
||||
#define RACE_DERVISH_726 726
|
||||
#define RACE_DERVISH_727 727
|
||||
#define RACE_LUCLIN_728 728
|
||||
#define RACE_LUCLIN_729 729
|
||||
#define RACE_ORB_730 730
|
||||
#define RACE_LUCLIN_731 731
|
||||
#define RACE_PEGASUS_732 732
|
||||
#define RACE_INTERACTIVE_OBJECT_2250 2250
|
||||
|
||||
#endif
|
||||
|
||||
+39
-7
@@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
||||
Copyright (C) 2001-2021 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -25,10 +25,24 @@
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
/* This uses mt19937 seeded with the std::random_device
|
||||
* The idea is to have this be included as a member of another class
|
||||
* so mocking out for testing is easier
|
||||
* If you need to reseed random.Reseed()
|
||||
#ifdef USE_SFMT19937
|
||||
// only GCC supports, so lets turn it off
|
||||
#ifndef __GNUC__
|
||||
#undef USE_SFMT19937
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#undef USE_SFMT19937
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_ADDITIVE_LFIB_PRNG
|
||||
#include "additive_lagged_fibonacci_engine.h"
|
||||
#elif defined(USE_SFMT19937)
|
||||
#include <ext/random>
|
||||
#endif
|
||||
|
||||
/* This uses mt19937 (or other compatible engine) seeded with the std::random_device. The idea is to have this be
|
||||
* included as a member of another class so mocking out for testing is easier If you need to reseed random.Reseed()
|
||||
* Eventually this should be derived from an abstract base class
|
||||
*/
|
||||
|
||||
@@ -40,7 +54,12 @@ namespace EQ {
|
||||
{
|
||||
if (low > high)
|
||||
std::swap(low, high);
|
||||
// EQ uses biased int distribution, so I guess we can support it :P
|
||||
#ifdef BIASED_INT_DIST
|
||||
return low + m_gen() % (high - low + 1);
|
||||
#else
|
||||
return int_dist(m_gen, int_param_t(low, high)); // [low, high]
|
||||
#endif
|
||||
}
|
||||
|
||||
// AKA old MakeRandomFloat
|
||||
@@ -98,11 +117,24 @@ namespace EQ {
|
||||
}
|
||||
|
||||
private:
|
||||
#ifndef BIASED_INT_DIST
|
||||
typedef std::uniform_int_distribution<int>::param_type int_param_t;
|
||||
typedef std::uniform_real_distribution<double>::param_type real_param_t;
|
||||
std::mt19937 m_gen;
|
||||
std::uniform_int_distribution<int> int_dist;
|
||||
#endif
|
||||
typedef std::uniform_real_distribution<double>::param_type real_param_t;
|
||||
std::uniform_real_distribution<double> real_dist;
|
||||
// define USE_CUSTOM_PRNG_ENGINE to any supported random engine like:
|
||||
// #define USE_CUSTOM_PRNG_ENGINE std::default_random_engine
|
||||
#ifdef USE_ADDITIVE_LFIB_PRNG
|
||||
EQRand
|
||||
#elif defined(USE_SFMT19937)
|
||||
__gnu_cxx::sfmt19937
|
||||
#elif defined(USE_CUSTOM_PRNG_ENGINE)
|
||||
USE_CUSTOM_PRNG_ENGINE
|
||||
#else
|
||||
std::mt19937
|
||||
#endif
|
||||
m_gen;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
entry.accid = 0;
|
||||
entry.ip = "";
|
||||
entry.count = 1;
|
||||
entry.lastused = current_timestamp();
|
||||
entry.lastused = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
entry.zone_in_time = 1800;
|
||||
entry.win_points = 0;
|
||||
entry.lose_points = 0;
|
||||
entry.theme = 1;
|
||||
entry.theme = LDoNThemes::GUK;
|
||||
entry.zone_in_zone_id = 0;
|
||||
entry.zone_in_x = 0;
|
||||
entry.zone_in_y = 0;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ class BaseBaseDataRepository {
|
||||
public:
|
||||
struct BaseData {
|
||||
int level;
|
||||
int class;
|
||||
int class_;
|
||||
float hp;
|
||||
float mana;
|
||||
float end;
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
{
|
||||
return {
|
||||
"level",
|
||||
"class",
|
||||
"`class`",
|
||||
"hp",
|
||||
"mana",
|
||||
"end",
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
BaseData entry{};
|
||||
|
||||
entry.level = 0;
|
||||
entry.class = 0;
|
||||
entry.class_ = 0;
|
||||
entry.hp = 0;
|
||||
entry.mana = 0;
|
||||
entry.end = 0;
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
BaseData entry{};
|
||||
|
||||
entry.level = atoi(row[0]);
|
||||
entry.class = atoi(row[1]);
|
||||
entry.class_ = atoi(row[1]);
|
||||
entry.hp = static_cast<float>(atof(row[2]));
|
||||
entry.mana = static_cast<float>(atof(row[3]));
|
||||
entry.end = static_cast<float>(atof(row[4]));
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(base_data_entry.level));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(base_data_entry.class));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(base_data_entry.class_));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(base_data_entry.hp));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(base_data_entry.mana));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(base_data_entry.end));
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(base_data_entry.level));
|
||||
insert_values.push_back(std::to_string(base_data_entry.class));
|
||||
insert_values.push_back(std::to_string(base_data_entry.class_));
|
||||
insert_values.push_back(std::to_string(base_data_entry.hp));
|
||||
insert_values.push_back(std::to_string(base_data_entry.mana));
|
||||
insert_values.push_back(std::to_string(base_data_entry.end));
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(base_data_entry.level));
|
||||
insert_values.push_back(std::to_string(base_data_entry.class));
|
||||
insert_values.push_back(std::to_string(base_data_entry.class_));
|
||||
insert_values.push_back(std::to_string(base_data_entry.hp));
|
||||
insert_values.push_back(std::to_string(base_data_entry.mana));
|
||||
insert_values.push_back(std::to_string(base_data_entry.end));
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
BaseData entry{};
|
||||
|
||||
entry.level = atoi(row[0]);
|
||||
entry.class = atoi(row[1]);
|
||||
entry.class_ = atoi(row[1]);
|
||||
entry.hp = static_cast<float>(atof(row[2]));
|
||||
entry.mana = static_cast<float>(atof(row[3]));
|
||||
entry.end = static_cast<float>(atof(row[4]));
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
BaseData entry{};
|
||||
|
||||
entry.level = atoi(row[0]);
|
||||
entry.class = atoi(row[1]);
|
||||
entry.class_ = atoi(row[1]);
|
||||
entry.hp = static_cast<float>(atof(row[2]));
|
||||
entry.mana = static_cast<float>(atof(row[3]));
|
||||
entry.end = static_cast<float>(atof(row[4]));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -154,9 +154,9 @@ public:
|
||||
entry._unknown_value = 0;
|
||||
entry.bug_report = "";
|
||||
entry.system_info = "";
|
||||
entry.report_datetime = current_timestamp();
|
||||
entry.report_datetime = "";
|
||||
entry.bug_status = 0;
|
||||
entry.last_review = current_timestamp();
|
||||
entry.last_review = "";
|
||||
entry.last_reviewer = "None";
|
||||
entry.reviewer_notes = "";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
struct CharCreateCombinations {
|
||||
int allocation_id;
|
||||
int race;
|
||||
int class;
|
||||
int class_;
|
||||
int deity;
|
||||
int start_zone;
|
||||
int expansions_req;
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
return {
|
||||
"allocation_id",
|
||||
"race",
|
||||
"class",
|
||||
"`class`",
|
||||
"deity",
|
||||
"start_zone",
|
||||
"expansions_req",
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
entry.allocation_id = 0;
|
||||
entry.race = 0;
|
||||
entry.class = 0;
|
||||
entry.class_ = 0;
|
||||
entry.deity = 0;
|
||||
entry.start_zone = 0;
|
||||
entry.expansions_req = 0;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
|
||||
entry.allocation_id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.class_ = atoi(row[2]);
|
||||
entry.deity = atoi(row[3]);
|
||||
entry.start_zone = atoi(row[4]);
|
||||
entry.expansions_req = atoi(row[5]);
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(char_create_combinations_entry.allocation_id));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(char_create_combinations_entry.race));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(char_create_combinations_entry.class));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(char_create_combinations_entry.class_));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(char_create_combinations_entry.deity));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(char_create_combinations_entry.start_zone));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(char_create_combinations_entry.expansions_req));
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.allocation_id));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.race));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.class));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.class_));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.deity));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.start_zone));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.expansions_req));
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.allocation_id));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.race));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.class));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.class_));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.deity));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.start_zone));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.expansions_req));
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
|
||||
entry.allocation_id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.class_ = atoi(row[2]);
|
||||
entry.deity = atoi(row[3]);
|
||||
entry.start_zone = atoi(row[4]);
|
||||
entry.expansions_req = atoi(row[5]);
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
|
||||
entry.allocation_id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.class_ = atoi(row[2]);
|
||||
entry.deity = atoi(row[3]);
|
||||
entry.start_zone = atoi(row[4]);
|
||||
entry.expansions_req = atoi(row[5]);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
int level;
|
||||
int race;
|
||||
int gender;
|
||||
int class;
|
||||
int class_;
|
||||
int deity;
|
||||
int texture;
|
||||
int helm_texture;
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
"level",
|
||||
"race",
|
||||
"gender",
|
||||
"class",
|
||||
"`class`",
|
||||
"deity",
|
||||
"texture",
|
||||
"helm_texture",
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
entry.level = 0;
|
||||
entry.race = 0;
|
||||
entry.gender = 0;
|
||||
entry.class = 0;
|
||||
entry.class_ = 0;
|
||||
entry.deity = 0;
|
||||
entry.texture = 0;
|
||||
entry.helm_texture = 0;
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
entry.level = atoi(row[17]);
|
||||
entry.race = atoi(row[18]);
|
||||
entry.gender = atoi(row[19]);
|
||||
entry.class = atoi(row[20]);
|
||||
entry.class_ = atoi(row[20]);
|
||||
entry.deity = atoi(row[21]);
|
||||
entry.texture = atoi(row[22]);
|
||||
entry.helm_texture = atoi(row[23]);
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(character_corpses_entry.level));
|
||||
update_values.push_back(columns[18] + " = " + std::to_string(character_corpses_entry.race));
|
||||
update_values.push_back(columns[19] + " = " + std::to_string(character_corpses_entry.gender));
|
||||
update_values.push_back(columns[20] + " = " + std::to_string(character_corpses_entry.class));
|
||||
update_values.push_back(columns[20] + " = " + std::to_string(character_corpses_entry.class_));
|
||||
update_values.push_back(columns[21] + " = " + std::to_string(character_corpses_entry.deity));
|
||||
update_values.push_back(columns[22] + " = " + std::to_string(character_corpses_entry.texture));
|
||||
update_values.push_back(columns[23] + " = " + std::to_string(character_corpses_entry.helm_texture));
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.level));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.race));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.gender));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.class));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.class_));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.deity));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.texture));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.helm_texture));
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.level));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.race));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.gender));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.class));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.class_));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.deity));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.texture));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.helm_texture));
|
||||
@@ -562,7 +562,7 @@ public:
|
||||
entry.level = atoi(row[17]);
|
||||
entry.race = atoi(row[18]);
|
||||
entry.gender = atoi(row[19]);
|
||||
entry.class = atoi(row[20]);
|
||||
entry.class_ = atoi(row[20]);
|
||||
entry.deity = atoi(row[21]);
|
||||
entry.texture = atoi(row[22]);
|
||||
entry.helm_texture = atoi(row[23]);
|
||||
@@ -633,7 +633,7 @@ public:
|
||||
entry.level = atoi(row[17]);
|
||||
entry.race = atoi(row[18]);
|
||||
entry.gender = atoi(row[19]);
|
||||
entry.class = atoi(row[20]);
|
||||
entry.class_ = atoi(row[20]);
|
||||
entry.deity = atoi(row[21]);
|
||||
entry.texture = atoi(row[22]);
|
||||
entry.helm_texture = atoi(row[23]);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
float heading;
|
||||
int gender;
|
||||
int race;
|
||||
int class;
|
||||
int class_;
|
||||
int level;
|
||||
int deity;
|
||||
int birthday;
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
int sta;
|
||||
int cha;
|
||||
int dex;
|
||||
int int;
|
||||
int int_;
|
||||
int agi;
|
||||
int wis;
|
||||
int zone_change_count;
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
"heading",
|
||||
"gender",
|
||||
"race",
|
||||
"class",
|
||||
"`class`",
|
||||
"level",
|
||||
"deity",
|
||||
"birthday",
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
"sta",
|
||||
"cha",
|
||||
"dex",
|
||||
"int",
|
||||
"`int`",
|
||||
"agi",
|
||||
"wis",
|
||||
"zone_change_count",
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
entry.heading = 0;
|
||||
entry.gender = 0;
|
||||
entry.race = 0;
|
||||
entry.class = 0;
|
||||
entry.class_ = 0;
|
||||
entry.level = 0;
|
||||
entry.deity = 0;
|
||||
entry.birthday = 0;
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
entry.sta = 0;
|
||||
entry.cha = 0;
|
||||
entry.dex = 0;
|
||||
entry.int = 0;
|
||||
entry.int_ = 0;
|
||||
entry.agi = 0;
|
||||
entry.wis = 0;
|
||||
entry.zone_change_count = 0;
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
entry.aa_points_spent_old = 0;
|
||||
entry.aa_points_old = 0;
|
||||
entry.e_last_invsnapshot = 0;
|
||||
entry.deleted_at = 0;
|
||||
entry.deleted_at = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@@ -418,7 +418,7 @@ public:
|
||||
entry.heading = static_cast<float>(atof(row[11]));
|
||||
entry.gender = atoi(row[12]);
|
||||
entry.race = atoi(row[13]);
|
||||
entry.class = atoi(row[14]);
|
||||
entry.class_ = atoi(row[14]);
|
||||
entry.level = atoi(row[15]);
|
||||
entry.deity = atoi(row[16]);
|
||||
entry.birthday = atoi(row[17]);
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
entry.sta = atoi(row[51]);
|
||||
entry.cha = atoi(row[52]);
|
||||
entry.dex = atoi(row[53]);
|
||||
entry.int = atoi(row[54]);
|
||||
entry.int_ = atoi(row[54]);
|
||||
entry.agi = atoi(row[55]);
|
||||
entry.wis = atoi(row[56]);
|
||||
entry.zone_change_count = atoi(row[57]);
|
||||
@@ -552,7 +552,7 @@ public:
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(character_data_entry.heading));
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(character_data_entry.gender));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(character_data_entry.race));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(character_data_entry.class));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(character_data_entry.class_));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(character_data_entry.level));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(character_data_entry.deity));
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(character_data_entry.birthday));
|
||||
@@ -592,7 +592,7 @@ public:
|
||||
update_values.push_back(columns[51] + " = " + std::to_string(character_data_entry.sta));
|
||||
update_values.push_back(columns[52] + " = " + std::to_string(character_data_entry.cha));
|
||||
update_values.push_back(columns[53] + " = " + std::to_string(character_data_entry.dex));
|
||||
update_values.push_back(columns[54] + " = " + std::to_string(character_data_entry.int));
|
||||
update_values.push_back(columns[54] + " = " + std::to_string(character_data_entry.int_));
|
||||
update_values.push_back(columns[55] + " = " + std::to_string(character_data_entry.agi));
|
||||
update_values.push_back(columns[56] + " = " + std::to_string(character_data_entry.wis));
|
||||
update_values.push_back(columns[57] + " = " + std::to_string(character_data_entry.zone_change_count));
|
||||
@@ -675,7 +675,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.heading));
|
||||
insert_values.push_back(std::to_string(character_data_entry.gender));
|
||||
insert_values.push_back(std::to_string(character_data_entry.race));
|
||||
insert_values.push_back(std::to_string(character_data_entry.class));
|
||||
insert_values.push_back(std::to_string(character_data_entry.class_));
|
||||
insert_values.push_back(std::to_string(character_data_entry.level));
|
||||
insert_values.push_back(std::to_string(character_data_entry.deity));
|
||||
insert_values.push_back(std::to_string(character_data_entry.birthday));
|
||||
@@ -715,7 +715,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.sta));
|
||||
insert_values.push_back(std::to_string(character_data_entry.cha));
|
||||
insert_values.push_back(std::to_string(character_data_entry.dex));
|
||||
insert_values.push_back(std::to_string(character_data_entry.int));
|
||||
insert_values.push_back(std::to_string(character_data_entry.int_));
|
||||
insert_values.push_back(std::to_string(character_data_entry.agi));
|
||||
insert_values.push_back(std::to_string(character_data_entry.wis));
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_change_count));
|
||||
@@ -806,7 +806,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.heading));
|
||||
insert_values.push_back(std::to_string(character_data_entry.gender));
|
||||
insert_values.push_back(std::to_string(character_data_entry.race));
|
||||
insert_values.push_back(std::to_string(character_data_entry.class));
|
||||
insert_values.push_back(std::to_string(character_data_entry.class_));
|
||||
insert_values.push_back(std::to_string(character_data_entry.level));
|
||||
insert_values.push_back(std::to_string(character_data_entry.deity));
|
||||
insert_values.push_back(std::to_string(character_data_entry.birthday));
|
||||
@@ -846,7 +846,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.sta));
|
||||
insert_values.push_back(std::to_string(character_data_entry.cha));
|
||||
insert_values.push_back(std::to_string(character_data_entry.dex));
|
||||
insert_values.push_back(std::to_string(character_data_entry.int));
|
||||
insert_values.push_back(std::to_string(character_data_entry.int_));
|
||||
insert_values.push_back(std::to_string(character_data_entry.agi));
|
||||
insert_values.push_back(std::to_string(character_data_entry.wis));
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_change_count));
|
||||
@@ -941,7 +941,7 @@ public:
|
||||
entry.heading = static_cast<float>(atof(row[11]));
|
||||
entry.gender = atoi(row[12]);
|
||||
entry.race = atoi(row[13]);
|
||||
entry.class = atoi(row[14]);
|
||||
entry.class_ = atoi(row[14]);
|
||||
entry.level = atoi(row[15]);
|
||||
entry.deity = atoi(row[16]);
|
||||
entry.birthday = atoi(row[17]);
|
||||
@@ -981,7 +981,7 @@ public:
|
||||
entry.sta = atoi(row[51]);
|
||||
entry.cha = atoi(row[52]);
|
||||
entry.dex = atoi(row[53]);
|
||||
entry.int = atoi(row[54]);
|
||||
entry.int_ = atoi(row[54]);
|
||||
entry.agi = atoi(row[55]);
|
||||
entry.wis = atoi(row[56]);
|
||||
entry.zone_change_count = atoi(row[57]);
|
||||
@@ -1067,7 +1067,7 @@ public:
|
||||
entry.heading = static_cast<float>(atof(row[11]));
|
||||
entry.gender = atoi(row[12]);
|
||||
entry.race = atoi(row[13]);
|
||||
entry.class = atoi(row[14]);
|
||||
entry.class_ = atoi(row[14]);
|
||||
entry.level = atoi(row[15]);
|
||||
entry.deity = atoi(row[16]);
|
||||
entry.birthday = atoi(row[17]);
|
||||
@@ -1107,7 +1107,7 @@ public:
|
||||
entry.sta = atoi(row[51]);
|
||||
entry.cha = atoi(row[52]);
|
||||
entry.dex = atoi(row[53]);
|
||||
entry.int = atoi(row[54]);
|
||||
entry.int_ = atoi(row[54]);
|
||||
entry.agi = atoi(row[55]);
|
||||
entry.wis = atoi(row[56]);
|
||||
entry.zone_change_count = atoi(row[57]);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,355 @@
|
||||
/**
|
||||
* DO NOT MODIFY THIS FILE
|
||||
*
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
#ifndef EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
|
||||
#define EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
|
||||
class BaseCharacterInstanceSafereturnsRepository {
|
||||
public:
|
||||
struct CharacterInstanceSafereturns {
|
||||
int id;
|
||||
int character_id;
|
||||
int instance_zone_id;
|
||||
int instance_id;
|
||||
int safe_zone_id;
|
||||
float safe_x;
|
||||
float safe_y;
|
||||
float safe_z;
|
||||
float safe_heading;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
{
|
||||
return std::string("id");
|
||||
}
|
||||
|
||||
static std::vector<std::string> Columns()
|
||||
{
|
||||
return {
|
||||
"id",
|
||||
"character_id",
|
||||
"instance_zone_id",
|
||||
"instance_id",
|
||||
"safe_zone_id",
|
||||
"safe_x",
|
||||
"safe_y",
|
||||
"safe_z",
|
||||
"safe_heading",
|
||||
};
|
||||
}
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
{
|
||||
return std::string("character_instance_safereturns");
|
||||
}
|
||||
|
||||
static std::string BaseSelect()
|
||||
{
|
||||
return fmt::format(
|
||||
"SELECT {} FROM {}",
|
||||
ColumnsRaw(),
|
||||
TableName()
|
||||
);
|
||||
}
|
||||
|
||||
static std::string BaseInsert()
|
||||
{
|
||||
return fmt::format(
|
||||
"INSERT INTO {} ({}) ",
|
||||
TableName(),
|
||||
ColumnsRaw()
|
||||
);
|
||||
}
|
||||
|
||||
static CharacterInstanceSafereturns NewEntity()
|
||||
{
|
||||
CharacterInstanceSafereturns entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.character_id = 0;
|
||||
entry.instance_zone_id = 0;
|
||||
entry.instance_id = 0;
|
||||
entry.safe_zone_id = 0;
|
||||
entry.safe_x = 0;
|
||||
entry.safe_y = 0;
|
||||
entry.safe_z = 0;
|
||||
entry.safe_heading = 0;
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
static CharacterInstanceSafereturns GetCharacterInstanceSafereturnsEntry(
|
||||
const std::vector<CharacterInstanceSafereturns> &character_instance_safereturnss,
|
||||
int character_instance_safereturns_id
|
||||
)
|
||||
{
|
||||
for (auto &character_instance_safereturns : character_instance_safereturnss) {
|
||||
if (character_instance_safereturns.id == character_instance_safereturns_id) {
|
||||
return character_instance_safereturns;
|
||||
}
|
||||
}
|
||||
|
||||
return NewEntity();
|
||||
}
|
||||
|
||||
static CharacterInstanceSafereturns FindOne(
|
||||
Database& db,
|
||||
int character_instance_safereturns_id
|
||||
)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} WHERE id = {} LIMIT 1",
|
||||
BaseSelect(),
|
||||
character_instance_safereturns_id
|
||||
)
|
||||
);
|
||||
|
||||
auto row = results.begin();
|
||||
if (results.RowCount() == 1) {
|
||||
CharacterInstanceSafereturns entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.character_id = atoi(row[1]);
|
||||
entry.instance_zone_id = atoi(row[2]);
|
||||
entry.instance_id = atoi(row[3]);
|
||||
entry.safe_zone_id = atoi(row[4]);
|
||||
entry.safe_x = static_cast<float>(atof(row[5]));
|
||||
entry.safe_y = static_cast<float>(atof(row[6]));
|
||||
entry.safe_z = static_cast<float>(atof(row[7]));
|
||||
entry.safe_heading = static_cast<float>(atof(row[8]));
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
return NewEntity();
|
||||
}
|
||||
|
||||
static int DeleteOne(
|
||||
Database& db,
|
||||
int character_instance_safereturns_id
|
||||
)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"DELETE FROM {} WHERE {} = {}",
|
||||
TableName(),
|
||||
PrimaryKey(),
|
||||
character_instance_safereturns_id
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static int UpdateOne(
|
||||
Database& db,
|
||||
CharacterInstanceSafereturns character_instance_safereturns_entry
|
||||
)
|
||||
{
|
||||
std::vector<std::string> update_values;
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_instance_safereturns_entry.character_id));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_instance_safereturns_entry.instance_zone_id));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_instance_safereturns_entry.instance_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_instance_safereturns_entry.safe_zone_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_instance_safereturns_entry.safe_x));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_instance_safereturns_entry.safe_y));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_instance_safereturns_entry.safe_z));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(character_instance_safereturns_entry.safe_heading));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_instance_safereturns_entry.id
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static CharacterInstanceSafereturns InsertOne(
|
||||
Database& db,
|
||||
CharacterInstanceSafereturns character_instance_safereturns_entry
|
||||
)
|
||||
{
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.character_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_zone_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_zone_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_x));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_y));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_z));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_heading));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
if (results.Success()) {
|
||||
character_instance_safereturns_entry.id = results.LastInsertedID();
|
||||
return character_instance_safereturns_entry;
|
||||
}
|
||||
|
||||
character_instance_safereturns_entry = NewEntity();
|
||||
|
||||
return character_instance_safereturns_entry;
|
||||
}
|
||||
|
||||
static int InsertMany(
|
||||
Database& db,
|
||||
std::vector<CharacterInstanceSafereturns> character_instance_safereturns_entries
|
||||
)
|
||||
{
|
||||
std::vector<std::string> insert_chunks;
|
||||
|
||||
for (auto &character_instance_safereturns_entry: character_instance_safereturns_entries) {
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.character_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_zone_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_zone_id));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_x));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_y));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_z));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_heading));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static std::vector<CharacterInstanceSafereturns> All(Database& db)
|
||||
{
|
||||
std::vector<CharacterInstanceSafereturns> all_entries;
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{}",
|
||||
BaseSelect()
|
||||
)
|
||||
);
|
||||
|
||||
all_entries.reserve(results.RowCount());
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterInstanceSafereturns entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.character_id = atoi(row[1]);
|
||||
entry.instance_zone_id = atoi(row[2]);
|
||||
entry.instance_id = atoi(row[3]);
|
||||
entry.safe_zone_id = atoi(row[4]);
|
||||
entry.safe_x = static_cast<float>(atof(row[5]));
|
||||
entry.safe_y = static_cast<float>(atof(row[6]));
|
||||
entry.safe_z = static_cast<float>(atof(row[7]));
|
||||
entry.safe_heading = static_cast<float>(atof(row[8]));
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
return all_entries;
|
||||
}
|
||||
|
||||
static std::vector<CharacterInstanceSafereturns> GetWhere(Database& db, std::string where_filter)
|
||||
{
|
||||
std::vector<CharacterInstanceSafereturns> all_entries;
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} WHERE {}",
|
||||
BaseSelect(),
|
||||
where_filter
|
||||
)
|
||||
);
|
||||
|
||||
all_entries.reserve(results.RowCount());
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
CharacterInstanceSafereturns entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.character_id = atoi(row[1]);
|
||||
entry.instance_zone_id = atoi(row[2]);
|
||||
entry.instance_id = atoi(row[3]);
|
||||
entry.safe_zone_id = atoi(row[4]);
|
||||
entry.safe_x = static_cast<float>(atof(row[5]));
|
||||
entry.safe_y = static_cast<float>(atof(row[6]));
|
||||
entry.safe_z = static_cast<float>(atof(row[7]));
|
||||
entry.safe_heading = static_cast<float>(atof(row[8]));
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
return all_entries;
|
||||
}
|
||||
|
||||
static int DeleteWhere(Database& db, std::string where_filter)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"DELETE FROM {} WHERE {}",
|
||||
TableName(),
|
||||
where_filter
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
static int Truncate(Database& db)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"TRUNCATE TABLE {}",
|
||||
TableName()
|
||||
)
|
||||
);
|
||||
|
||||
return (results.Success() ? results.RowsAffected() : 0);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to the repository extending the base.
|
||||
* Any modifications to base repositories are to be made by the generator only
|
||||
*
|
||||
*
|
||||
* @generator ./utils/scripts/generators/repository-generator.pl
|
||||
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user