mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-23 21:32:28 +00:00
Compare commits
335 Commits
login-proxy
...
nats
| Author | SHA1 | Date | |
|---|---|---|---|
| b83fafb745 | |||
| bcc42edb16 | |||
| 0eba5f2990 | |||
| c70bdc6b70 | |||
| 6a25f30441 | |||
| 825dbc9e9a | |||
| a5f35bf32a | |||
| c09ab507dd | |||
| 483ca9996b | |||
| 122f1cd02d | |||
| e0d4f9ecd1 | |||
| cb72ad4d0f | |||
| 98f4e570e7 | |||
| 6532a81b80 | |||
| b0f591540c | |||
| ac07e7d578 | |||
| 40ef387496 | |||
| c9a79af79b | |||
| 1a71237dc2 | |||
| f990292660 | |||
| e72f1e855f | |||
| 3bc9e4bc24 | |||
| 22aef8ad79 | |||
| bf84fcd908 | |||
| 0c5779d2de | |||
| 2270bd267d | |||
| 638d43e3cf | |||
| fdef1090c3 | |||
| 89303d9218 | |||
| 341bc0723b | |||
| a6b31017e3 | |||
| ca29cb037e | |||
| d59931dc4d | |||
| 876335bb54 | |||
| 5c87b8152d | |||
| ef487112df | |||
| 49089f7537 | |||
| 736890119b | |||
| 2da70c69da | |||
| ae966e546b | |||
| 0d63c8b9ef | |||
| 8f66527e02 | |||
| 7e7f5f0bd6 | |||
| b3ac1001c9 | |||
| e5e779c064 | |||
| 525db1819d | |||
| bb3c0b41f6 | |||
| 35c4867334 | |||
| 690d8f9155 | |||
| b63923264d | |||
| 5aab187e17 | |||
| ee4a79616f | |||
| b667944612 | |||
| 6fb3c66fe5 | |||
| 66ef95b9c9 | |||
| bb3596d245 | |||
| a5c32b63b7 | |||
| 9e4f728f21 | |||
| 3cb7b362c8 | |||
| 1beb221337 | |||
| 28cb11f521 | |||
| d71e79b306 | |||
| 7edc891605 | |||
| 8e4aff391e | |||
| 1b84905941 | |||
| 06d22fa009 | |||
| 29f89cdfbc | |||
| 6f49a37914 | |||
| 1e316102ea | |||
| 03b2550520 | |||
| e547a1e778 | |||
| 9c69eed211 | |||
| 464c1cb584 | |||
| 4fbe55cc35 | |||
| 008b17aaf2 | |||
| c469571f62 | |||
| 6c2a8edea6 | |||
| 361937d443 | |||
| 4071e1d4d9 | |||
| 46a358abe6 | |||
| fc339cc9d0 | |||
| c87380fa54 | |||
| 959337b592 | |||
| ca0b9bc374 | |||
| 2d459a962e | |||
| f3b2ac6c17 | |||
| 6027a80c14 | |||
| 6934552dd9 | |||
| 0b755cac54 | |||
| 765ee5eeed | |||
| c36a1cd6dc | |||
| a493242c3c | |||
| 97bb50a5c4 | |||
| feec425be9 | |||
| 27225b6047 | |||
| cbd68ff8c8 | |||
| a32dedeb48 | |||
| 91d3851d76 | |||
| b5e9c0f996 | |||
| de4782368d | |||
| 3e39c0c11a | |||
| d2360753fb | |||
| e747ea851a | |||
| dd5ef6523f | |||
| 68d563c72f | |||
| c69b9a95b7 | |||
| c5e4bb08f4 | |||
| 0b97db9fd2 | |||
| fb8873e77b | |||
| e943771945 | |||
| 05a3c4b2b8 | |||
| 24b396e516 | |||
| cdd0b2de00 | |||
| 4096ee1f1e | |||
| f720e51585 | |||
| c5c93bb2e6 | |||
| 85bafecc93 | |||
| 2ed185aa2c | |||
| 1b2316ad1f | |||
| 80ad3a8940 | |||
| cef4928dd0 | |||
| ab65bb1d57 | |||
| c21293e508 | |||
| 3c794cfc07 | |||
| d71dbd1751 | |||
| 8805021960 | |||
| dd2b12b517 | |||
| 78f3a2aa64 | |||
| 03dbe47546 | |||
| 13ad5e4b46 | |||
| 6716e580f3 | |||
| 5d9c8c8e27 | |||
| 7bd5213be4 | |||
| 93ddf915a2 | |||
| f8ce10472b | |||
| ceb2b287bb | |||
| 8e9fa38197 | |||
| 5763672175 | |||
| 6ed3301110 | |||
| fbe456ed45 | |||
| 518a5e8ab1 | |||
| 008ac97a64 | |||
| 7892fed6d9 | |||
| 6042410b4b | |||
| 26532c03ac | |||
| 0fa5053ad1 | |||
| 39a94dba0d | |||
| a440269c6b | |||
| a7310cba17 | |||
| b82100bcd7 | |||
| e7ce79261d | |||
| d8bbb428d8 | |||
| 7adc93d806 | |||
| 62dcc188d1 | |||
| aa1114c387 | |||
| 462349ad84 | |||
| 19183f958e | |||
| 42d3a7e4f6 | |||
| af02b9f958 | |||
| f67d280845 | |||
| 6d7203ef4b | |||
| 90a9b98ae6 | |||
| 61fb708b73 | |||
| 4629b4f261 | |||
| 865c8562da | |||
| 7fea04c663 | |||
| 8620e1b7c9 | |||
| 9102c1a13a | |||
| 682df81339 | |||
| 40ebee9ff4 | |||
| 26213f9049 | |||
| 680f1f017d | |||
| cee3dc370d | |||
| f91de33e5d | |||
| fc844cefd7 | |||
| a5e65b93c9 | |||
| 92e20d07ae | |||
| c4432bcd7e | |||
| b6fc878aab | |||
| d18fb730ec | |||
| 4cd7d98224 | |||
| 760ba01e6b | |||
| fb2f8327e2 | |||
| 7559d96a0e | |||
| 1471784035 | |||
| 057823e4c1 | |||
| e1f8354905 | |||
| 50cc093250 | |||
| e25499b3f2 | |||
| 14b3525e9c | |||
| c2a35bb2e1 | |||
| 279cd4660d | |||
| 2dad087bbd | |||
| 4b612400da | |||
| 91da1305a4 | |||
| ee581f27c4 | |||
| d90982e63b | |||
| a3dc36ae22 | |||
| b25c5d509d | |||
| 6e1c8c665b | |||
| feafd43fdf | |||
| 7d7b9d0238 | |||
| c2b5820153 | |||
| a6b9cd87ec | |||
| 11092da32d | |||
| dfccb4a2bc | |||
| c1ad00cbc6 | |||
| 6686346473 | |||
| 0356c0a891 | |||
| 8af4730ddf | |||
| 994e2001a0 | |||
| c65864ffb6 | |||
| 8011c48641 | |||
| 97873ff42d | |||
| 9af9deb0f5 | |||
| 477ba3f4b9 | |||
| 9c6dbe699f | |||
| 9cfe6b936b | |||
| 9b4e63fbc7 | |||
| ba1a317119 | |||
| 55f1767001 | |||
| f8b924c262 | |||
| e19b7bd368 | |||
| 3bfa1d68f7 | |||
| aaac2c5a84 | |||
| 29a62dfa85 | |||
| 790304d1f1 | |||
| 7e0e9a037d | |||
| 712fe1f6ec | |||
| b03e9af597 | |||
| 52d31a6846 | |||
| a8427ca610 | |||
| 5880593cb1 | |||
| 6bb3ebc00e | |||
| da163be8db | |||
| e928046a95 | |||
| 3eaa0b4fb1 | |||
| 37bedfe9ba | |||
| df0004c1b0 | |||
| 24e4730204 | |||
| 7d12382333 | |||
| bc348dadad | |||
| ceadb1325d | |||
| 15f7440af2 | |||
| cd748e7d8b | |||
| ed98aa45d2 | |||
| 10477d3795 | |||
| 982c078926 | |||
| a721179aa8 | |||
| 50d5f3785c | |||
| 9856df20fb | |||
| c8b75e982e | |||
| 199dd7d618 | |||
| ab569681b1 | |||
| b10f5d3745 | |||
| 7dd904c8d1 | |||
| 624be70990 | |||
| b9d2c1b9f6 | |||
| 00b2debb32 | |||
| f29fe17496 | |||
| e80f3c87e9 | |||
| a7d0251b77 | |||
| 3bcfcc6308 | |||
| 7d004e1eb0 | |||
| 90f6023f0f | |||
| 4e9c3e19d2 | |||
| 0f1ca0856c | |||
| 2ef5ade596 | |||
| 75e60b7f8e | |||
| 64d39134b9 | |||
| 414cafdbed | |||
| f566cba56a | |||
| 8400994c57 | |||
| 43f459b194 | |||
| e352171efa | |||
| 6c2f554a31 | |||
| bb2a6dce23 | |||
| 288ae4bad3 | |||
| f2c48d4c58 | |||
| f8571a57dd | |||
| 5285e8a163 | |||
| f8a4f2e6bd | |||
| c7ad873581 | |||
| 78759add4a | |||
| 48b674a13d | |||
| 8c9b852586 | |||
| 9634bef7fc | |||
| 0cf5a7aec3 | |||
| 59152a9d77 | |||
| e3972cc9e6 | |||
| 2a4d6523b1 | |||
| 6d8b96068d | |||
| e88cd61097 | |||
| b71f3031bc | |||
| 240f04eda7 | |||
| 7b4c130e0a | |||
| 7e3fdee86c | |||
| dd8d23be62 | |||
| 519c049902 | |||
| 898ec8fcf1 | |||
| c4d7fb8724 | |||
| b8c0b2c326 | |||
| 8ec9f36954 | |||
| db0b4045a2 | |||
| b4a234b1c0 | |||
| dcfefee060 | |||
| 6859d92716 | |||
| 84b1a719f2 | |||
| 734d79d540 | |||
| 2c388117ad | |||
| 92a678d0b4 | |||
| ed1015fa89 | |||
| 934450b749 | |||
| e025bfdb46 | |||
| 055daddcaf | |||
| 618252882c | |||
| efda99c230 | |||
| 8a50039482 | |||
| 79e825b7c7 | |||
| ec6b74aa7f | |||
| dad6f2ead5 | |||
| 0977471201 | |||
| e61e7fd008 | |||
| 10a27c2081 | |||
| b9336bad7e | |||
| 4ed6e20b35 | |||
| de7e6e8e66 | |||
| b33f2e5989 | |||
| 4d12481822 | |||
| d0ef6a5293 | |||
| a6e2110f3d | |||
| 9296f2bdc5 | |||
| 5a88ea6950 | |||
| 9841ca233d | |||
| 999677d314 |
+17
-10
@@ -23,17 +23,24 @@ CMakeFiles
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
Build/
|
||||
build/
|
||||
Build32/
|
||||
build32/
|
||||
Build64/
|
||||
build64/
|
||||
Build_32/
|
||||
build_32/
|
||||
Build_64/
|
||||
build_64/
|
||||
[Bb]uild/
|
||||
[Bb]uild32/
|
||||
[Bb]uild64/
|
||||
[Bb]uild_32/
|
||||
[Bb]uild_64/
|
||||
deploy/server/
|
||||
x64/
|
||||
x86/
|
||||
log/
|
||||
logs/
|
||||
|
||||
docker/db
|
||||
|
||||
# Protobuf generated files
|
||||
*.pb.cc
|
||||
*.pb.h
|
||||
protobuf/csharp/*
|
||||
protobuf/go/*
|
||||
protobuf/java/*
|
||||
protobuf/python/*
|
||||
.vscode
|
||||
+75
-2
@@ -29,7 +29,7 @@
|
||||
|
||||
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
|
||||
#Can change this if you really want but you should upgrade!
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
|
||||
#FindMySQL is located here so lets make it so CMake can find it
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
|
||||
@@ -52,6 +52,73 @@ IF(MSVC OR MINGW)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ENDIF(MSVC OR MINGW)
|
||||
|
||||
# include dirs are universal
|
||||
SET(NATS_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/nats")
|
||||
|
||||
#Try to find protobuf automatically
|
||||
FIND_PACKAGE(Protobuf QUIET)
|
||||
#IF(NOT PROTOBUF_FOUND)
|
||||
SET(Protobuf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/protobuf" CACHE PATH "Root protobuf directory" FORCE)
|
||||
SET(PROTOBUF_FOUND TRUE CACHE BOOL "" FORCE)
|
||||
IF(MSVC)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(Protobuf_INCLUDE_DIR "${Protobuf_DIR}/windows/x64/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_SRC_ROOT_FOLDER "${Protobuf_DIR}/windows/x64/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_PROTOC_EXECUTABLE "${Protobuf_DIR}/windows/x64/bin/protoc.exe" CACHE PATH "Executable path" FORCE)
|
||||
SET(Protobuf_LIBRARY_DEBUG "${Protobuf_DIR}/windows/x64/lib/libprotobufd.lib" CACHE PATH "Root protobuf directory" FORCE)
|
||||
SET(Protobuf_LIBRARY_RELEASE "${Protobuf_DIR}/windows/x64/lib/libprotobufd.lib" CACHE PATH "Root protobuf directory" FORCE)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(Protobuf_INCLUDE_DIR "${Protobuf_DIR}/windows/x86/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_SRC_ROOT_FOLDER "${Protobuf_DIR}/windows/x86/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_PROTOC_EXECUTABLE "${Protobuf_DIR}/windows/x86/bin/protoc.exe" CACHE PATH "Executable path" FORCE)
|
||||
SET(Protobuf_LIBRARY_DEBUG "${Protobuf_DIR}/windows/x86/lib/libprotobufd.lib" CACHE PATH "Root protobuf directory" FORCE)
|
||||
SET(Protobuf_LIBRARY_RELEASE "${Protobuf_DIR}/windows/x86/lib/libprotobufd.lib" CACHE PATH "Root protobuf directory" FORCE)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ELSE(MSVC)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(Protobuf_INCLUDE_DIR "${Protobuf_DIR}/linux/x86/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_SRC_ROOT_FOLDER "${Protobuf_DIR}/linux/x86/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_PROTOC_EXECUTABLE "${Protobuf_DIR}/linux/x86/bin/protoc" CACHE PATH "Executable path" FORCE)
|
||||
SET(Protobuf_LIBRARY_DEBUG "${Protobuf_DIR}/linux/x86/lib/libprotobuf.so.16" CACHE PATH "Root protobuf directory" FORCE)
|
||||
SET(Protobuf_LIBRARY_RELEASE "${Protobuf_DIR}/linux/x86/lib/libprotobuf.so.16" CACHE PATH "Root protobuf directory" FORCE)
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(Protobuf_INCLUDE_DIR "${Protobuf_DIR}/linux/x64/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_SRC_ROOT_FOLDER "${Protobuf_DIR}/linux/x64/include" CACHE PATH "Include dir" FORCE)
|
||||
SET(Protobuf_PROTOC_EXECUTABLE "${Protobuf_DIR}/linux/x64/bin/protoc" CACHE PATH "Executable path" FORCE)
|
||||
SET(Protobuf_LIBRARY_DEBUG "${Protobuf_DIR}/linux/x64/lib/libprotobuf.so.16" CACHE PATH "Root protobuf directory" FORCE)
|
||||
SET(Protobuf_LIBRARY_RELEASE "${Protobuf_DIR}/linux/x64/lib/libprotobuf.so.16" CACHE PATH "Root protobuf directory" FORCE)
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ENDIF()
|
||||
IF(NOT Protobuf_LIBRARY_DEBUG)
|
||||
MESSAGE(ERROR "Protobuf library was not found in ${Protobuf_LIBRARY_DEBUG}. Please download the depenencies and extract them as noted.")
|
||||
ENDIF()
|
||||
FILE(COPY ${Protobuf_LIBRARY_DEBUG} DESTINATION ${CMAKE_HOME_DIRECTORY}/bin)
|
||||
#ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${Protobuf_INCLUDE_DIR}")
|
||||
|
||||
IF(MSVC)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(NATS_INCLUDE_DIR "${NATS_ROOT}/windows/x64/include")
|
||||
SET(NATS_LIBRARY_DEBUG "${NATS_ROOT}/windows/x64/lib/nats.lib")
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(NATS_INCLUDE_DIR "${NATS_ROOT}/windows/x86/include")
|
||||
SET(NATS_LIBRARY_DEBUG "${NATS_ROOT}/windows/x86/lib/nats.lib")
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ELSE(MSVC)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(NATS_INCLUDE_DIR "${NATS_ROOT}/linux/x86/include")
|
||||
SET(NATS_LIBRARY_DEBUG "${NATS_ROOT}/linux/x86/lib/libnats.so")
|
||||
ELSE(CMAKE_CL_64)
|
||||
SET(NATS_INCLUDE_DIR "${NATS_ROOT}/linux/x64/include")
|
||||
SET(NATS_LIBRARY_DEBUG "${NATS_ROOT}/linux/x64/lib/libnats.so")
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ENDIF()
|
||||
IF(${NATS_LIBRARY_DEBUG})
|
||||
MESSAGE(ERROR " NATS library was not found in ${NATS_LIBRARY_DEBUG}/libnats.so. Please download the depenencies and extract them as noted.")
|
||||
ENDIF()
|
||||
FILE(COPY ${NATS_LIBRARY_DEBUG} DESTINATION ${CMAKE_HOME_DIRECTORY}/bin)
|
||||
|
||||
IF(MSVC)
|
||||
#Set our default locations for zlib/mysql based on x86/x64
|
||||
IF(CMAKE_CL_64)
|
||||
@@ -73,6 +140,7 @@ IF(MSVC)
|
||||
SET(LUA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/luaj_x86")
|
||||
SET(SODIUM_INCLUDE_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/include")
|
||||
SET(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/openssl_x86")
|
||||
SET(NATS_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/nats_x86")
|
||||
IF(MSVC_VERSION GREATER 1800)
|
||||
SET(SODIUM_LIBRARY_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/libsodium/Win32/Release/v140/dynamic")
|
||||
ELSEIF(MSVC_VERSION EQUAL 1800)
|
||||
@@ -131,6 +199,8 @@ IF(MSVC)
|
||||
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
ELSE(MSVC)
|
||||
|
||||
|
||||
#Normally set by perl but we don't use the perl flags anymore so we set it.
|
||||
ADD_DEFINITIONS(-DHAS_UNION_SEMUN)
|
||||
ENDIF(MSVC)
|
||||
@@ -309,7 +379,7 @@ IF(EQEMU_BUILD_PERL)
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${PERL_INCLUDE_PATH}")
|
||||
ENDIF(EQEMU_BUILD_PERL)
|
||||
|
||||
SET(SERVER_LIBS common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY} libuv fmt)
|
||||
SET(SERVER_LIBS common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY} libuv fmt ${NATS_LIBRARY_DEBUG} ${PROTOBUF_LIBRARY_DEBUG})
|
||||
|
||||
FIND_PACKAGE(Sodium REQUIRED)
|
||||
IF(SODIUM_FOUND)
|
||||
@@ -352,12 +422,15 @@ ENDIF(EQEMU_BUILD_LUA)
|
||||
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${ZLIB_INCLUDE_DIRS}")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${MySQL_INCLUDE_DIR}")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${NATS_INCLUDE_DIR}")
|
||||
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/common/glm")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/cereal")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/libuv/include" )
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/libuv/src")
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/libs/format")
|
||||
|
||||
|
||||
IF(EQEMU_BUILD_SERVER OR EQEMU_BUILD_LOGIN OR EQEMU_BUILD_TESTS OR EQEMU_BUILD_HC)
|
||||
ADD_SUBDIRECTORY(common)
|
||||
ADD_SUBDIRECTORY(libs)
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; 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.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
The server code and utilities are released under GPLv3.
|
||||
|
||||
We also include some small libraries for convienence that may be under different licensing:
|
||||
|
||||
SocketLib - GPL
|
||||
LibXML - ZLib License
|
||||
StackWalker - New BSD License
|
||||
ZLib - ZLib License
|
||||
MySQL - GPL
|
||||
Perl - GPL / ActiveState (under the assumption that this is a free project).
|
||||
CPPUnit - GLP
|
||||
StringUtilities - Apache
|
||||
@@ -17,10 +17,7 @@
|
||||
|:---:|:---:|:---:|
|
||||
|**Install Count**|||
|
||||
### > Windows
|
||||
* [Easy Install](http://wiki.eqemulator.org/p?Akkas_PEQ_Server_Installer&frm=Main#from-scratch-installation-instructions-windows)
|
||||
* [Advanced Setup](http://wiki.eqemulator.org/p?Complete_Windows-based_Server_Setup_Guide)
|
||||
|
||||
|
||||
* [Install](https://github.com/EQEmu/Server/wiki/Windows-Server)
|
||||
|
||||
### > Debian/Ubuntu/CentOS/Fedora
|
||||
* You can use curl or wget to kick off the installer (whichever your OS has)
|
||||
@@ -53,7 +50,23 @@ forum, although pull requests will be much quicker and easier on all parties.
|
||||
- **User Discord Channel**: `#general`
|
||||
- **Developer Discord Channel**: `#eqemucoders`
|
||||
|
||||
Resources
|
||||
---
|
||||
## Resources
|
||||
- [EQEmulator Forums](http://www.eqemulator.org/forums)
|
||||
- [EQEmulator Wiki](http://wiki.eqemulator.org/i?M=Wiki)
|
||||
- [EQEmulator Wiki](https://github.com/EQEmu/Server/wiki)
|
||||
|
||||
## Related Repositories
|
||||
* [ProjectEQ Quests](https://github.com/ProjectEQ/projecteqquests)
|
||||
* [Maps](https://github.com/Akkadius/EQEmuMaps)
|
||||
* [Installer Resources](https://github.com/Akkadius/EQEmuInstall)
|
||||
* [Zone Utilities](https://github.com/EQEmu/zone-utilities) - Various utilities and libraries for parsing, rendering and manipulating EQ Zone files.
|
||||
|
||||
## Other License Info
|
||||
|
||||
* The server code and utilities are released under **GPLv3**
|
||||
* We also include some small libraries for convienence that may be under different licensing
|
||||
* SocketLib - GPL LibXML
|
||||
* zlib - zlib license
|
||||
* MariaDB/MySQL - GPL
|
||||
* GPL Perl - GPL / ActiveState (under the assumption that this is a free project)
|
||||
* CPPUnit - GLP StringUtilities - Apache
|
||||
* LUA - MIT
|
||||
|
||||
@@ -1,5 +1,90 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 03/07/2018 ==
|
||||
Uleat: Added command '#ucs' to force a reconnect to UCS server.
|
||||
- Works in place of client auto-reconnect packet in zones where feature is unsupported
|
||||
- Currently, you will need to manually re-join channels
|
||||
|
||||
== 03/04/2018 ==
|
||||
Uleat: Updated UCS versioning
|
||||
- SoF and higher clients have a new opcode identified (update your *.conf files)
|
||||
- Rework of previous ucs connectivity code
|
||||
- Unrelated: Zone::weatherSend() now takes an optional parameter for singular updates (as in client entering zone)
|
||||
-- prior to this, every client already in-zone received a weather update packet whenever a new client zoned in
|
||||
|
||||
== 02/18/2018 ==
|
||||
Uleat: Bug reporting fix and overhaul.
|
||||
- Fixed bug reporting for SoD+ clients
|
||||
- Added ability to disable bug reporting (set rule 'Bugs:ReportingSystemActive' to 'false')
|
||||
- Implemented a more detailed reporting system (set rule 'Bugs:UseOldReportingMethod' to 'false')
|
||||
-- New system is not currently compatible with script-based monitoring
|
||||
- Soft-removal of defunct 'Petition Bug' system
|
||||
|
||||
== 02/14/2018 ==
|
||||
mackal: Fix Heading -- Quests broken
|
||||
|
||||
Please report any other issues with heading, most things were tested and worked
|
||||
|
||||
You can use eqemu_server.pl to run a conversion to fix your headings in quests.
|
||||
Some may need manual review.
|
||||
|
||||
== 02/10/2018 ==
|
||||
mackal: Add Global Loot system
|
||||
|
||||
This will allow us to implement global loot similarly to how it works on live
|
||||
This system reuses our current loottable tables which the global_loot table references.
|
||||
The limits for the rules to govern if a table should be rolled are min level, max level, rare,
|
||||
raid, race, class, bodytype, and zone
|
||||
|
||||
race, class, bodytype, and zone are a pipe | separated list of IDs.
|
||||
|
||||
== 01/31/2018 ==
|
||||
Uleat: Re-work of Bot::AI_Process(). Overall behavior is much improved.
|
||||
- Removed a 'ton' of unneeded packet updates
|
||||
- Added a 'leash' to the distance a bot can travel
|
||||
- Added a 'main assist' feature to target control (set using group roles)
|
||||
- Added combat 'jitter' movement to complement the existing rogue movement
|
||||
- Attack can now be aborted if target contains no leash owner nor bot hate and leash owner turns off auto-attack
|
||||
- Please report any issues with the bot AI code
|
||||
|
||||
Added a work-around for heal rotations crashing the server - under certain conditions.
|
||||
|
||||
== 01/28/2018 ==
|
||||
Mackal: Spell AI tweaks
|
||||
|
||||
AI spells are treated as "innate" spells (devs use this term, and I think this is what they mean by it)
|
||||
These spells are spammed by the NPC, lots of encounters on live work like this and this will greatly reduce
|
||||
the need to do quest scripting on these types of encounters.
|
||||
|
||||
You can safely run update npc_spells_entries set priority = priority + 1 where priority >= 0; if you want to disable this new behavior
|
||||
|
||||
== 10/08/2017 ==
|
||||
Mackal: Rework regens
|
||||
|
||||
Regen will now match whats reported by modern clients, besides where they lie due to known bugs
|
||||
|
||||
HP and END regens are now based on the BaseData.txt values allowing easy customization
|
||||
Those cases:
|
||||
- The client always applies hunger penalties, it appears they don't exist anymore on live you can turn them on with a rule
|
||||
- The way the client gets buff mana/end regen benefits incorrectly applies the bard mod making these values lie sometimes
|
||||
|
||||
== 9/17/2017 ==
|
||||
Akkadius: Add model/race offset to FixZ calc (KLS)
|
||||
Akkadius: Fix 95% of food/water consumption issues, if there are additional modifiers for race/class combos - those will need to be applied
|
||||
|
||||
Stages should be put in place if not already:
|
||||
https://wiki.project1999.com/Food_and_drink#Stages_of_Hunger_and_Thirst
|
||||
|
||||
Values stored in the database are 0-6000, previously we capped it at 6000 but previous math would have normal values in the 60k+ range in order for food to be consumed at a reasonable rate. We are now using more native logic where 1 = 1 minute, following logic:
|
||||
|
||||
(Minutes)
|
||||
0 - 5 - This is a snack.
|
||||
6 - 20 - This is a meal.
|
||||
21 - 30 - This is a hearty meal.
|
||||
31 - 40 - This is a banquet size meal.
|
||||
41 - 50 - This meal is a feast!
|
||||
51 - 60 - This is an enduring meal!
|
||||
61 - X - This is a miraculous meal!
|
||||
|
||||
== 7/14/2017 ==
|
||||
Akkadius: HP Update tuning - HP Updates are now forced when a client is targeted
|
||||
|
||||
@@ -0,0 +1,386 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindPackageHandleStandardArgs
|
||||
-----------------------------
|
||||
|
||||
This module provides a function intended to be used in :ref:`Find Modules`
|
||||
implementing :command:`find_package(<PackageName>)` calls. It handles the
|
||||
``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``.
|
||||
It also sets the ``<PackageName>_FOUND`` variable. The package is
|
||||
considered found if all variables listed contain valid results, e.g.
|
||||
valid filepaths.
|
||||
|
||||
.. command:: find_package_handle_standard_args
|
||||
|
||||
There are two signatures::
|
||||
|
||||
find_package_handle_standard_args(<PackageName>
|
||||
(DEFAULT_MSG|<custom-failure-message>)
|
||||
<required-var>...
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(<PackageName>
|
||||
[FOUND_VAR <result-var>]
|
||||
[REQUIRED_VARS <required-var>...]
|
||||
[VERSION_VAR <version-var>]
|
||||
[HANDLE_COMPONENTS]
|
||||
[CONFIG_MODE]
|
||||
[FAIL_MESSAGE <custom-failure-message>]
|
||||
)
|
||||
|
||||
The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all
|
||||
the variables ``<required-var>...`` are valid and any optional
|
||||
constraints are satisfied, and ``FALSE`` otherwise. A success or
|
||||
failure message may be displayed based on the results and on
|
||||
whether the ``REQUIRED`` and/or ``QUIET`` option was given to
|
||||
the :command:`find_package` call.
|
||||
|
||||
The options are:
|
||||
|
||||
``(DEFAULT_MSG|<custom-failure-message>)``
|
||||
In the simple signature this specifies the failure message.
|
||||
Use ``DEFAULT_MSG`` to ask for a default message to be computed
|
||||
(recommended). Not valid in the full signature.
|
||||
|
||||
``FOUND_VAR <result-var>``
|
||||
Obsolete. Specifies either ``<PackageName>_FOUND`` or
|
||||
``<PACKAGENAME>_FOUND`` as the result variable. This exists only
|
||||
for compatibility with older versions of CMake and is now ignored.
|
||||
Result variables of both names are always set for compatibility.
|
||||
|
||||
``REQUIRED_VARS <required-var>...``
|
||||
Specify the variables which are required for this package.
|
||||
These may be named in the generated failure message asking the
|
||||
user to set the missing variable values. Therefore these should
|
||||
typically be cache entries such as ``FOO_LIBRARY`` and not output
|
||||
variables like ``FOO_LIBRARIES``.
|
||||
|
||||
``VERSION_VAR <version-var>``
|
||||
Specify the name of a variable that holds the version of the package
|
||||
that has been found. This version will be checked against the
|
||||
(potentially) specified required version given to the
|
||||
:command:`find_package` call, including its ``EXACT`` option.
|
||||
The default messages include information about the required
|
||||
version and the version which has been actually found, both
|
||||
if the version is ok or not.
|
||||
|
||||
``HANDLE_COMPONENTS``
|
||||
Enable handling of package components. In this case, the command
|
||||
will report which components have been found and which are missing,
|
||||
and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
|
||||
if any of the required components (i.e. not the ones listed after
|
||||
the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
|
||||
missing.
|
||||
|
||||
``CONFIG_MODE``
|
||||
Specify that the calling find module is a wrapper around a
|
||||
call to ``find_package(<PackageName> NO_MODULE)``. This implies
|
||||
a ``VERSION_VAR`` value of ``<PackageName>_VERSION``. The command
|
||||
will automatically check whether the package configuration file
|
||||
was found.
|
||||
|
||||
``FAIL_MESSAGE <custom-failure-message>``
|
||||
Specify a custom failure message instead of using the default
|
||||
generated message. Not recommended.
|
||||
|
||||
Example for the simple signature:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_package_handle_standard_args(LibXml2 DEFAULT_MSG
|
||||
LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
|
||||
|
||||
The ``LibXml2`` package is considered to be found if both
|
||||
``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid.
|
||||
Then also ``LibXml2_FOUND`` is set to ``TRUE``. If it is not found
|
||||
and ``REQUIRED`` was used, it fails with a
|
||||
:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was
|
||||
used or not. If it is found, success will be reported, including
|
||||
the content of the first ``<required-var>``. On repeated CMake runs,
|
||||
the same message will not be printed again.
|
||||
|
||||
Example for the full signature:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_package_handle_standard_args(LibArchive
|
||||
REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
|
||||
VERSION_VAR LibArchive_VERSION)
|
||||
|
||||
In this case, the ``LibArchive`` package is considered to be found if
|
||||
both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid.
|
||||
Also the version of ``LibArchive`` will be checked by using the version
|
||||
contained in ``LibArchive_VERSION``. Since no ``FAIL_MESSAGE`` is given,
|
||||
the default messages will be printed.
|
||||
|
||||
Another example for the full signature:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
|
||||
find_package_handle_standard_args(Automoc4 CONFIG_MODE)
|
||||
|
||||
In this case, a ``FindAutmoc4.cmake`` module wraps a call to
|
||||
``find_package(Automoc4 NO_MODULE)`` and adds an additional search
|
||||
directory for ``automoc4``. Then the call to
|
||||
``find_package_handle_standard_args`` produces a proper success/failure
|
||||
message.
|
||||
#]=======================================================================]
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
|
||||
|
||||
# internal helper macro
|
||||
macro(_FPHSA_FAILURE_MESSAGE _msg)
|
||||
if (${_NAME}_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "${_msg}")
|
||||
else ()
|
||||
if (NOT ${_NAME}_FIND_QUIETLY)
|
||||
message(STATUS "${_msg}")
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
|
||||
# internal helper macro to generate the failure message when used in CONFIG_MODE:
|
||||
macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
|
||||
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
|
||||
if(${_NAME}_CONFIG)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing:${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
|
||||
else()
|
||||
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
|
||||
# List them all in the error message:
|
||||
if(${_NAME}_CONSIDERED_CONFIGS)
|
||||
set(configsText "")
|
||||
list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
|
||||
math(EXPR configsCount "${configsCount} - 1")
|
||||
foreach(currentConfigIndex RANGE ${configsCount})
|
||||
list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
|
||||
list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
|
||||
string(APPEND configsText " ${filename} (version ${version})\n")
|
||||
endforeach()
|
||||
if (${_NAME}_NOT_FOUND_MESSAGE)
|
||||
string(APPEND configsText " Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n")
|
||||
endif()
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
|
||||
|
||||
else()
|
||||
# Simple case: No Config-file was found at all:
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
||||
|
||||
# Set up the arguments for `cmake_parse_arguments`.
|
||||
set(options CONFIG_MODE HANDLE_COMPONENTS)
|
||||
set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR)
|
||||
set(multiValueArgs REQUIRED_VARS)
|
||||
|
||||
# Check whether we are in 'simple' or 'extended' mode:
|
||||
set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
|
||||
list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
|
||||
|
||||
if(${INDEX} EQUAL -1)
|
||||
set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
|
||||
set(FPHSA_REQUIRED_VARS ${ARGN})
|
||||
set(FPHSA_VERSION_VAR)
|
||||
else()
|
||||
cmake_parse_arguments(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
|
||||
|
||||
if(FPHSA_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
|
||||
endif()
|
||||
|
||||
if(NOT FPHSA_FAIL_MESSAGE)
|
||||
set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
|
||||
endif()
|
||||
|
||||
# In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
|
||||
# when it successfully found the config-file, including version checking:
|
||||
if(FPHSA_CONFIG_MODE)
|
||||
list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
|
||||
list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
|
||||
set(FPHSA_VERSION_VAR ${_NAME}_VERSION)
|
||||
endif()
|
||||
|
||||
if(NOT FPHSA_REQUIRED_VARS)
|
||||
message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# now that we collected all arguments, process them
|
||||
|
||||
if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
|
||||
set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
|
||||
endif()
|
||||
|
||||
list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
|
||||
|
||||
string(TOUPPER ${_NAME} _NAME_UPPER)
|
||||
string(TOLOWER ${_NAME} _NAME_LOWER)
|
||||
|
||||
if(FPHSA_FOUND_VAR)
|
||||
if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$")
|
||||
set(_FOUND_VAR ${FPHSA_FOUND_VAR})
|
||||
else()
|
||||
message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.")
|
||||
endif()
|
||||
else()
|
||||
set(_FOUND_VAR ${_NAME_UPPER}_FOUND)
|
||||
endif()
|
||||
|
||||
# collect all variables which were not found, so they can be printed, so the
|
||||
# user knows better what went wrong (#6375)
|
||||
set(MISSING_VARS "")
|
||||
set(DETAILS "")
|
||||
# check if all passed variables are valid
|
||||
set(FPHSA_FOUND_${_NAME} TRUE)
|
||||
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
|
||||
if(NOT ${_CURRENT_VAR})
|
||||
set(FPHSA_FOUND_${_NAME} FALSE)
|
||||
string(APPEND MISSING_VARS " ${_CURRENT_VAR}")
|
||||
else()
|
||||
string(APPEND DETAILS "[${${_CURRENT_VAR}}]")
|
||||
endif()
|
||||
endforeach()
|
||||
if(FPHSA_FOUND_${_NAME})
|
||||
set(${_NAME}_FOUND TRUE)
|
||||
set(${_NAME_UPPER}_FOUND TRUE)
|
||||
else()
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
set(${_NAME_UPPER}_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
# component handling
|
||||
unset(FOUND_COMPONENTS_MSG)
|
||||
unset(MISSING_COMPONENTS_MSG)
|
||||
|
||||
if(FPHSA_HANDLE_COMPONENTS)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(${_NAME}_${comp}_FOUND)
|
||||
|
||||
if(NOT DEFINED FOUND_COMPONENTS_MSG)
|
||||
set(FOUND_COMPONENTS_MSG "found components: ")
|
||||
endif()
|
||||
string(APPEND FOUND_COMPONENTS_MSG " ${comp}")
|
||||
|
||||
else()
|
||||
|
||||
if(NOT DEFINED MISSING_COMPONENTS_MSG)
|
||||
set(MISSING_COMPONENTS_MSG "missing components: ")
|
||||
endif()
|
||||
string(APPEND MISSING_COMPONENTS_MSG " ${comp}")
|
||||
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
string(APPEND MISSING_VARS " ${comp}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endforeach()
|
||||
set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
|
||||
string(APPEND DETAILS "[c${COMPONENT_MSG}]")
|
||||
endif()
|
||||
|
||||
# version handling:
|
||||
set(VERSION_MSG "")
|
||||
set(VERSION_OK TRUE)
|
||||
|
||||
# check with DEFINED here as the requested or found version may be "0"
|
||||
if (DEFINED ${_NAME}_FIND_VERSION)
|
||||
if(DEFINED ${FPHSA_VERSION_VAR})
|
||||
set(_FOUND_VERSION ${${FPHSA_VERSION_VAR}})
|
||||
|
||||
if(${_NAME}_FIND_VERSION_EXACT) # exact version required
|
||||
# count the dots in the version string
|
||||
string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${_FOUND_VERSION}")
|
||||
# add one dot because there is one dot more than there are components
|
||||
string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS)
|
||||
if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT)
|
||||
# Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT
|
||||
# is at most 4 here. Therefore a simple lookup table is used.
|
||||
if (${_NAME}_FIND_VERSION_COUNT EQUAL 1)
|
||||
set(_VERSION_REGEX "[^.]*")
|
||||
elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2)
|
||||
set(_VERSION_REGEX "[^.]*\\.[^.]*")
|
||||
elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3)
|
||||
set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*")
|
||||
else ()
|
||||
set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*")
|
||||
endif ()
|
||||
string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${_FOUND_VERSION}")
|
||||
unset(_VERSION_REGEX)
|
||||
if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD)
|
||||
set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
|
||||
set(VERSION_OK FALSE)
|
||||
else ()
|
||||
set(VERSION_MSG "(found suitable exact version \"${_FOUND_VERSION}\")")
|
||||
endif ()
|
||||
unset(_VERSION_HEAD)
|
||||
else ()
|
||||
if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _FOUND_VERSION)
|
||||
set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
|
||||
set(VERSION_OK FALSE)
|
||||
else ()
|
||||
set(VERSION_MSG "(found suitable exact version \"${_FOUND_VERSION}\")")
|
||||
endif ()
|
||||
endif ()
|
||||
unset(_VERSION_DOTS)
|
||||
|
||||
else() # minimum version specified:
|
||||
if (${_NAME}_FIND_VERSION VERSION_GREATER _FOUND_VERSION)
|
||||
set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
|
||||
set(VERSION_OK FALSE)
|
||||
else ()
|
||||
set(VERSION_MSG "(found suitable version \"${_FOUND_VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
# if the package was not found, but a version was given, add that to the output:
|
||||
if(${_NAME}_FIND_VERSION_EXACT)
|
||||
set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
|
||||
else()
|
||||
set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
else ()
|
||||
# Check with DEFINED as the found version may be 0.
|
||||
if(DEFINED ${FPHSA_VERSION_VAR})
|
||||
set(VERSION_MSG "(found version \"${${FPHSA_VERSION_VAR}}\")")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(VERSION_OK)
|
||||
string(APPEND DETAILS "[v${${FPHSA_VERSION_VAR}}(${${_NAME}_FIND_VERSION})]")
|
||||
else()
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
|
||||
# print the result:
|
||||
if (${_NAME}_FOUND)
|
||||
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
|
||||
else ()
|
||||
|
||||
if(FPHSA_CONFIG_MODE)
|
||||
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
|
||||
else()
|
||||
if(NOT VERSION_OK)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
|
||||
else()
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif ()
|
||||
|
||||
set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
|
||||
set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
|
||||
endfunction()
|
||||
@@ -0,0 +1,47 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindPackageMessage
|
||||
# ------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# FIND_PACKAGE_MESSAGE(<name> "message for user" "find result details")
|
||||
#
|
||||
# This macro is intended to be used in FindXXX.cmake modules files. It
|
||||
# will print a message once for each unique find result. This is useful
|
||||
# for telling the user where a package was found. The first argument
|
||||
# specifies the name (XXX) of the package. The second argument
|
||||
# specifies the message to display. The third argument lists details
|
||||
# about the find result so that if they change the message will be
|
||||
# displayed again. The macro also obeys the QUIET argument to the
|
||||
# find_package command.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# if(X11_FOUND)
|
||||
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
|
||||
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
|
||||
# else()
|
||||
# ...
|
||||
# endif()
|
||||
|
||||
function(FIND_PACKAGE_MESSAGE pkg msg details)
|
||||
# Avoid printing a message repeatedly for the same find result.
|
||||
if(NOT ${pkg}_FIND_QUIETLY)
|
||||
string(REPLACE "\n" "" details "${details}")
|
||||
set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
|
||||
if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
|
||||
# The message has not yet been printed.
|
||||
message(STATUS "${msg}")
|
||||
|
||||
# Save the find details in the cache to avoid printing the same
|
||||
# message again.
|
||||
set("${DETAILS_VAR}" "${details}"
|
||||
CACHE INTERNAL "Details about finding ${pkg}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -0,0 +1,579 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindProtobuf
|
||||
# ------------
|
||||
#
|
||||
# Locate and configure the Google Protocol Buffers library.
|
||||
#
|
||||
# The following variables can be set and are optional:
|
||||
#
|
||||
# ``Protobuf_SRC_ROOT_FOLDER``
|
||||
# When compiling with MSVC, if this cache variable is set
|
||||
# the protobuf-default VS project build locations
|
||||
# (vsprojects/Debug and vsprojects/Release
|
||||
# or vsprojects/x64/Debug and vsprojects/x64/Release)
|
||||
# will be searched for libraries and binaries.
|
||||
# ``Protobuf_IMPORT_DIRS``
|
||||
# List of additional directories to be searched for
|
||||
# imported .proto files.
|
||||
# ``Protobuf_DEBUG``
|
||||
# Show debug messages.
|
||||
# ``Protobuf_USE_STATIC_LIBS``
|
||||
# Set to ON to force the use of the static libraries.
|
||||
# Default is OFF.
|
||||
#
|
||||
# Defines the following variables:
|
||||
#
|
||||
# ``Protobuf_FOUND``
|
||||
# Found the Google Protocol Buffers library
|
||||
# (libprotobuf & header files)
|
||||
# ``Protobuf_VERSION``
|
||||
# Version of package found.
|
||||
# ``Protobuf_INCLUDE_DIRS``
|
||||
# Include directories for Google Protocol Buffers
|
||||
# ``Protobuf_LIBRARIES``
|
||||
# The protobuf libraries
|
||||
# ``Protobuf_PROTOC_LIBRARIES``
|
||||
# The protoc libraries
|
||||
# ``Protobuf_LITE_LIBRARIES``
|
||||
# The protobuf-lite libraries
|
||||
#
|
||||
# The following :prop_tgt:`IMPORTED` targets are also defined:
|
||||
#
|
||||
# ``protobuf::libprotobuf``
|
||||
# The protobuf library.
|
||||
# ``protobuf::libprotobuf-lite``
|
||||
# The protobuf lite library.
|
||||
# ``protobuf::libprotoc``
|
||||
# The protoc library.
|
||||
# ``protobuf::protoc``
|
||||
# The protoc compiler.
|
||||
#
|
||||
# The following cache variables are also available to set or use:
|
||||
#
|
||||
# ``Protobuf_LIBRARY``
|
||||
# The protobuf library
|
||||
# ``Protobuf_PROTOC_LIBRARY``
|
||||
# The protoc library
|
||||
# ``Protobuf_INCLUDE_DIR``
|
||||
# The include directory for protocol buffers
|
||||
# ``Protobuf_PROTOC_EXECUTABLE``
|
||||
# The protoc compiler
|
||||
# ``Protobuf_LIBRARY_DEBUG``
|
||||
# The protobuf library (debug)
|
||||
# ``Protobuf_PROTOC_LIBRARY_DEBUG``
|
||||
# The protoc library (debug)
|
||||
# ``Protobuf_LITE_LIBRARY``
|
||||
# The protobuf lite library
|
||||
# ``Protobuf_LITE_LIBRARY_DEBUG``
|
||||
# The protobuf lite library (debug)
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# .. code-block:: cmake
|
||||
#
|
||||
# find_package(Protobuf REQUIRED)
|
||||
# include_directories(${Protobuf_INCLUDE_DIRS})
|
||||
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS foo.proto)
|
||||
# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS EXPORT_MACRO DLL_EXPORT foo.proto)
|
||||
# protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS DESCRIPTORS PROTO_DESCS foo.proto)
|
||||
# protobuf_generate_python(PROTO_PY foo.proto)
|
||||
# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
|
||||
# target_link_libraries(bar ${Protobuf_LIBRARIES})
|
||||
#
|
||||
# .. note::
|
||||
# The ``protobuf_generate_cpp`` and ``protobuf_generate_python``
|
||||
# functions and :command:`add_executable` or :command:`add_library`
|
||||
# calls only work properly within the same directory.
|
||||
#
|
||||
# .. command:: protobuf_generate_cpp
|
||||
#
|
||||
# Add custom commands to process ``.proto`` files to C++::
|
||||
#
|
||||
# protobuf_generate_cpp (<SRCS> <HDRS>
|
||||
# [DESCRIPTORS <DESC>] [EXPORT_MACRO <MACRO>] [<ARGN>...])
|
||||
#
|
||||
# ``SRCS``
|
||||
# Variable to define with autogenerated source files
|
||||
# ``HDRS``
|
||||
# Variable to define with autogenerated header files
|
||||
# ``DESCRIPTORS``
|
||||
# Variable to define with autogenerated descriptor files, if requested.
|
||||
# ``EXPORT_MACRO``
|
||||
# is a macro which should expand to ``__declspec(dllexport)`` or
|
||||
# ``__declspec(dllimport)`` depending on what is being compiled.
|
||||
# ``ARGN``
|
||||
# ``.proto`` files
|
||||
#
|
||||
# .. command:: protobuf_generate_python
|
||||
#
|
||||
# Add custom commands to process ``.proto`` files to Python::
|
||||
#
|
||||
# protobuf_generate_python (<PY> [<ARGN>...])
|
||||
#
|
||||
# ``PY``
|
||||
# Variable to define with autogenerated Python files
|
||||
# ``ARGN``
|
||||
# ``.proto`` filess
|
||||
|
||||
function(PROTOBUF_GENERATE_CPP SRCS HDRS)
|
||||
cmake_parse_arguments(protobuf "" "EXPORT_MACRO;DESCRIPTORS" "" ${ARGN})
|
||||
|
||||
set(PROTO_FILES "${protobuf_UNPARSED_ARGUMENTS}")
|
||||
if(NOT PROTO_FILES)
|
||||
message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(protobuf_EXPORT_MACRO)
|
||||
set(DLL_EXPORT_DECL "dllexport_decl=${protobuf_EXPORT_MACRO}:")
|
||||
endif()
|
||||
|
||||
if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
# Create an include path for each file specified
|
||||
foreach(FIL ${PROTO_FILES})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
|
||||
set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}")
|
||||
endif()
|
||||
|
||||
if(DEFINED Protobuf_IMPORT_DIRS)
|
||||
foreach(DIR ${Protobuf_IMPORT_DIRS})
|
||||
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(${SRCS})
|
||||
set(${HDRS})
|
||||
if (protobuf_DESCRIPTORS)
|
||||
set(${protobuf_DESCRIPTORS})
|
||||
endif()
|
||||
|
||||
foreach(FIL ${PROTO_FILES})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(FIL_WE ${FIL} NAME_WE)
|
||||
if(NOT PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
get_filename_component(FIL_DIR ${FIL} DIRECTORY)
|
||||
if(FIL_DIR)
|
||||
set(FIL_WE "${FIL_DIR}/${FIL_WE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(_protobuf_protoc_src "${CMAKE_CURRENT_SOURCE_DIR}/${FIL_WE}.pb.cc")
|
||||
set(_protobuf_protoc_hdr "${CMAKE_CURRENT_SOURCE_DIR}/${FIL_WE}.pb.h")
|
||||
list(APPEND ${SRCS} "${_protobuf_protoc_src}")
|
||||
list(APPEND ${HDRS} "${_protobuf_protoc_hdr}")
|
||||
|
||||
if(protobuf_DESCRIPTORS)
|
||||
set(_protobuf_protoc_desc "${CMAKE_CURRENT_SOURCE_DIR}/${FIL_WE}.desc")
|
||||
set(_protobuf_protoc_flags "--descriptor_set_out=${_protobuf_protoc_desc}")
|
||||
list(APPEND ${protobuf_DESCRIPTORS} "${_protobuf_protoc_desc}")
|
||||
else()
|
||||
set(_protobuf_protoc_desc "")
|
||||
set(_protobuf_protoc_flags "")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${_protobuf_protoc_src}"
|
||||
"${_protobuf_protoc_hdr}"
|
||||
${_protobuf_protoc_desc}
|
||||
COMMAND protobuf::protoc
|
||||
"--cpp_out=${DLL_EXPORT_DECL}${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
${_protobuf_protoc_flags}
|
||||
${_protobuf_include_path} ${ABS_FIL}
|
||||
DEPENDS ${ABS_FIL} protobuf::protoc
|
||||
COMMENT "Running C++ protocol buffer compiler on ${FIL}"
|
||||
VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set(${SRCS} "${${SRCS}}" PARENT_SCOPE)
|
||||
set(${HDRS} "${${HDRS}}" PARENT_SCOPE)
|
||||
if(protobuf_DESCRIPTORS)
|
||||
set(${protobuf_DESCRIPTORS} "${${protobuf_DESCRIPTORS}}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
function(PROTOBUF_GENERATE_PYTHON SRCS)
|
||||
if(NOT ARGN)
|
||||
message(SEND_ERROR "Error: PROTOBUF_GENERATE_PYTHON() called without any proto files")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
# Create an include path for each file specified
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(DEFINED PROTOBUF_IMPORT_DIRS AND NOT DEFINED Protobuf_IMPORT_DIRS)
|
||||
set(Protobuf_IMPORT_DIRS "${PROTOBUF_IMPORT_DIRS}")
|
||||
endif()
|
||||
|
||||
if(DEFINED Protobuf_IMPORT_DIRS)
|
||||
foreach(DIR ${Protobuf_IMPORT_DIRS})
|
||||
get_filename_component(ABS_PATH ${DIR} ABSOLUTE)
|
||||
list(FIND _protobuf_include_path ${ABS_PATH} _contains_already)
|
||||
if(${_contains_already} EQUAL -1)
|
||||
list(APPEND _protobuf_include_path -I ${ABS_PATH})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(${SRCS})
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(FIL_WE ${FIL} NAME_WE)
|
||||
if(NOT PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
get_filename_component(FIL_DIR ${FIL} DIRECTORY)
|
||||
if(FIL_DIR)
|
||||
set(FIL_WE "${FIL_DIR}/${FIL_WE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py")
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}_pb2.py"
|
||||
COMMAND protobuf::protoc --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
|
||||
DEPENDS ${ABS_FIL} protobuf::protoc
|
||||
COMMENT "Running Python protocol buffer compiler on ${FIL}"
|
||||
VERBATIM )
|
||||
endforeach()
|
||||
|
||||
set(${SRCS} ${${SRCS}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
if(Protobuf_DEBUG)
|
||||
# Output some of their choices
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"Protobuf_USE_STATIC_LIBS = ${Protobuf_USE_STATIC_LIBS}")
|
||||
endif()
|
||||
|
||||
|
||||
# Backwards compatibility
|
||||
# Define camel case versions of input variables
|
||||
foreach(UPPER
|
||||
PROTOBUF_SRC_ROOT_FOLDER
|
||||
PROTOBUF_IMPORT_DIRS
|
||||
PROTOBUF_DEBUG
|
||||
PROTOBUF_LIBRARY
|
||||
PROTOBUF_PROTOC_LIBRARY
|
||||
PROTOBUF_INCLUDE_DIR
|
||||
PROTOBUF_PROTOC_EXECUTABLE
|
||||
PROTOBUF_LIBRARY_DEBUG
|
||||
PROTOBUF_PROTOC_LIBRARY_DEBUG
|
||||
PROTOBUF_LITE_LIBRARY
|
||||
PROTOBUF_LITE_LIBRARY_DEBUG
|
||||
)
|
||||
if (DEFINED ${UPPER})
|
||||
string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER})
|
||||
if (NOT DEFINED ${Camel})
|
||||
set(${Camel} ${${UPPER}})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_PROTOBUF_ARCH_DIR x64/)
|
||||
endif()
|
||||
|
||||
|
||||
# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
if( Protobuf_USE_STATIC_LIBS )
|
||||
set( _protobuf_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||
|
||||
# Internal function: search for normal library as well as a debug one
|
||||
# if the debug one is specified also include debug/optimized keywords
|
||||
# in *_LIBRARIES variable
|
||||
function(_protobuf_find_libraries name filename)
|
||||
if(${name}_LIBRARIES)
|
||||
# Use result recorded by a previous call.
|
||||
return()
|
||||
elseif(${name}_LIBRARY)
|
||||
# Honor cache entry used by CMake 3.5 and lower.
|
||||
set(${name}_LIBRARIES "${${name}_LIBRARY}" PARENT_SCOPE)
|
||||
else()
|
||||
find_library(${name}_LIBRARY_RELEASE
|
||||
NAMES ${filename}
|
||||
PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release)
|
||||
mark_as_advanced(${name}_LIBRARY_RELEASE)
|
||||
|
||||
find_library(${name}_LIBRARY_DEBUG
|
||||
NAMES ${filename}d ${filename}
|
||||
PATHS ${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug)
|
||||
mark_as_advanced(${name}_LIBRARY_DEBUG)
|
||||
|
||||
select_library_configurations(${name})
|
||||
set(${name}_LIBRARY "${${name}_LIBRARY}" PARENT_SCOPE)
|
||||
set(${name}_LIBRARIES "${${name}_LIBRARIES}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Internal function: find threads library
|
||||
function(_protobuf_find_threads)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_package(Threads)
|
||||
if(Threads_FOUND)
|
||||
list(APPEND Protobuf_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
||||
set(Protobuf_LIBRARIES "${Protobuf_LIBRARIES}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# Main.
|
||||
#
|
||||
|
||||
# By default have PROTOBUF_GENERATE_CPP macro pass -I to protoc
|
||||
# for each directory where a proto file is referenced.
|
||||
if(NOT DEFINED PROTOBUF_GENERATE_CPP_APPEND_PATH)
|
||||
set(PROTOBUF_GENERATE_CPP_APPEND_PATH TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
# Google's provided vcproj files generate libraries with a "lib"
|
||||
# prefix on Windows
|
||||
if(MSVC)
|
||||
set(Protobuf_ORIG_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
|
||||
|
||||
find_path(Protobuf_SRC_ROOT_FOLDER protobuf.pc.in)
|
||||
endif()
|
||||
|
||||
# The Protobuf library
|
||||
_protobuf_find_libraries(Protobuf protobuf)
|
||||
#DOC "The Google Protocol Buffers RELEASE Library"
|
||||
|
||||
_protobuf_find_libraries(Protobuf_LITE protobuf-lite)
|
||||
|
||||
# The Protobuf Protoc Library
|
||||
_protobuf_find_libraries(Protobuf_PROTOC protoc)
|
||||
|
||||
# Restore original find library prefixes
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "${Protobuf_ORIG_FIND_LIBRARY_PREFIXES}")
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
_protobuf_find_threads()
|
||||
endif()
|
||||
|
||||
# Find the include directory
|
||||
find_path(Protobuf_INCLUDE_DIR
|
||||
google/protobuf/service.h
|
||||
PATHS ${Protobuf_SRC_ROOT_FOLDER}/src
|
||||
)
|
||||
mark_as_advanced(Protobuf_INCLUDE_DIR)
|
||||
|
||||
# Find the protoc Executable
|
||||
find_program(Protobuf_PROTOC_EXECUTABLE
|
||||
NAMES protoc
|
||||
DOC "The Google Protocol Buffers Compiler"
|
||||
PATHS /usr/bin
|
||||
${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release
|
||||
${Protobuf_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug
|
||||
)
|
||||
mark_as_advanced(Protobuf_PROTOC_EXECUTABLE)
|
||||
|
||||
if(Protobuf_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"requested version of Google Protobuf is ${Protobuf_FIND_VERSION}")
|
||||
endif()
|
||||
|
||||
if(Protobuf_INCLUDE_DIR)
|
||||
set(_PROTOBUF_COMMON_HEADER ${Protobuf_INCLUDE_DIR}/google/protobuf/stubs/common.h)
|
||||
|
||||
if(Protobuf_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"location of common.h: ${_PROTOBUF_COMMON_HEADER}")
|
||||
endif()
|
||||
|
||||
set(Protobuf_VERSION "")
|
||||
set(Protobuf_LIB_VERSION "")
|
||||
file(STRINGS ${_PROTOBUF_COMMON_HEADER} _PROTOBUF_COMMON_H_CONTENTS REGEX "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+")
|
||||
if(_PROTOBUF_COMMON_H_CONTENTS MATCHES "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+([0-9]+)")
|
||||
set(Protobuf_LIB_VERSION "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
unset(_PROTOBUF_COMMON_H_CONTENTS)
|
||||
|
||||
math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
|
||||
math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
|
||||
math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
|
||||
set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
|
||||
|
||||
if(Protobuf_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"${_PROTOBUF_COMMON_HEADER} reveals protobuf ${Protobuf_VERSION}")
|
||||
endif()
|
||||
|
||||
# Check Protobuf compiler version to be aligned with libraries version
|
||||
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE _PROTOBUF_PROTOC_EXECUTABLE_VERSION)
|
||||
|
||||
if("${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" MATCHES "libprotoc ([0-9.]+)")
|
||||
set(_PROTOBUF_PROTOC_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
if(Protobuf_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
"${Protobuf_PROTOC_EXECUTABLE} reveals version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}")
|
||||
endif()
|
||||
|
||||
if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}")
|
||||
message(WARNING "Protobuf compiler version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}"
|
||||
" doesn't match library version ${Protobuf_VERSION}")
|
||||
endif()
|
||||
|
||||
if(Protobuf_LIBRARY)
|
||||
if(NOT TARGET protobuf::libprotobuf)
|
||||
add_library(protobuf::libprotobuf UNKNOWN IMPORTED)
|
||||
set_target_properties(protobuf::libprotobuf PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
|
||||
if(EXISTS "${Protobuf_LIBRARY}")
|
||||
set_target_properties(protobuf::libprotobuf PROPERTIES
|
||||
IMPORTED_LOCATION "${Protobuf_LIBRARY}")
|
||||
endif()
|
||||
if(EXISTS "${Protobuf_LIBRARY_RELEASE}")
|
||||
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(protobuf::libprotobuf PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${Protobuf_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(EXISTS "${Protobuf_LIBRARY_DEBUG}")
|
||||
set_property(TARGET protobuf::libprotobuf APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(protobuf::libprotobuf PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${Protobuf_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Protobuf_LITE_LIBRARY)
|
||||
if(NOT TARGET protobuf::libprotobuf-lite)
|
||||
add_library(protobuf::libprotobuf-lite UNKNOWN IMPORTED)
|
||||
set_target_properties(protobuf::libprotobuf-lite PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
|
||||
if(EXISTS "${Protobuf_LITE_LIBRARY}")
|
||||
set_target_properties(protobuf::libprotobuf-lite PROPERTIES
|
||||
IMPORTED_LOCATION "${Protobuf_LITE_LIBRARY}")
|
||||
endif()
|
||||
if(EXISTS "${Protobuf_LITE_LIBRARY_RELEASE}")
|
||||
set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(protobuf::libprotobuf-lite PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${Protobuf_LITE_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(EXISTS "${Protobuf_LITE_LIBRARY_DEBUG}")
|
||||
set_property(TARGET protobuf::libprotobuf-lite APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(protobuf::libprotobuf-lite PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${Protobuf_LITE_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Protobuf_PROTOC_LIBRARY)
|
||||
if(NOT TARGET protobuf::libprotoc)
|
||||
add_library(protobuf::libprotoc UNKNOWN IMPORTED)
|
||||
set_target_properties(protobuf::libprotoc PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
|
||||
if(EXISTS "${Protobuf_PROTOC_LIBRARY}")
|
||||
set_target_properties(protobuf::libprotoc PROPERTIES
|
||||
IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}")
|
||||
endif()
|
||||
if(EXISTS "${Protobuf_PROTOC_LIBRARY_RELEASE}")
|
||||
set_property(TARGET protobuf::libprotoc APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(protobuf::libprotoc PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${Protobuf_PROTOC_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(EXISTS "${Protobuf_PROTOC_LIBRARY_DEBUG}")
|
||||
set_property(TARGET protobuf::libprotoc APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(protobuf::libprotoc PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${Protobuf_PROTOC_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Protobuf_PROTOC_EXECUTABLE)
|
||||
if(NOT TARGET protobuf::protoc)
|
||||
add_executable(protobuf::protoc IMPORTED)
|
||||
if(EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
set_target_properties(protobuf::protoc PROPERTIES
|
||||
IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Protobuf
|
||||
REQUIRED_VARS Protobuf_LIBRARIES Protobuf_INCLUDE_DIR
|
||||
VERSION_VAR Protobuf_VERSION
|
||||
)
|
||||
|
||||
if(Protobuf_FOUND)
|
||||
set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# Restore the original find library ordering
|
||||
if( Protobuf_USE_STATIC_LIBS )
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_protobuf_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
endif()
|
||||
|
||||
# Backwards compatibility
|
||||
# Define upper case versions of output variables
|
||||
foreach(Camel
|
||||
Protobuf_SRC_ROOT_FOLDER
|
||||
Protobuf_IMPORT_DIRS
|
||||
Protobuf_DEBUG
|
||||
Protobuf_INCLUDE_DIRS
|
||||
Protobuf_LIBRARIES
|
||||
Protobuf_PROTOC_LIBRARIES
|
||||
Protobuf_LITE_LIBRARIES
|
||||
Protobuf_LIBRARY
|
||||
Protobuf_PROTOC_LIBRARY
|
||||
Protobuf_INCLUDE_DIR
|
||||
Protobuf_PROTOC_EXECUTABLE
|
||||
Protobuf_LIBRARY_DEBUG
|
||||
Protobuf_PROTOC_LIBRARY_DEBUG
|
||||
Protobuf_LITE_LIBRARY
|
||||
Protobuf_LITE_LIBRARY_DEBUG
|
||||
)
|
||||
string(TOUPPER ${Camel} UPPER)
|
||||
set(${UPPER} ${${Camel}})
|
||||
endforeach()
|
||||
@@ -0,0 +1,71 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# SelectLibraryConfigurations
|
||||
# ---------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# select_library_configurations( basename )
|
||||
#
|
||||
# This macro takes a library base name as an argument, and will choose
|
||||
# good values for basename_LIBRARY, basename_LIBRARIES,
|
||||
# basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what
|
||||
# has been found and set. If only basename_LIBRARY_RELEASE is defined,
|
||||
# basename_LIBRARY will be set to the release value, and
|
||||
# basename_LIBRARY_DEBUG will be set to basename_LIBRARY_DEBUG-NOTFOUND.
|
||||
# If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY will
|
||||
# take the debug value, and basename_LIBRARY_RELEASE will be set to
|
||||
# basename_LIBRARY_RELEASE-NOTFOUND.
|
||||
#
|
||||
# If the generator supports configuration types, then basename_LIBRARY
|
||||
# and basename_LIBRARIES will be set with debug and optimized flags
|
||||
# specifying the library to be used for the given configuration. If no
|
||||
# build type has been set or the generator in use does not support
|
||||
# configuration types, then basename_LIBRARY and basename_LIBRARIES will
|
||||
# take only the release value, or the debug value if the release one is
|
||||
# not set.
|
||||
|
||||
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
|
||||
# Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
macro( select_library_configurations basename )
|
||||
if(NOT ${basename}_LIBRARY_RELEASE)
|
||||
set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
|
||||
endif()
|
||||
if(NOT ${basename}_LIBRARY_DEBUG)
|
||||
set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
|
||||
endif()
|
||||
|
||||
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
|
||||
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND
|
||||
( _isMultiConfig OR CMAKE_BUILD_TYPE ) )
|
||||
# if the generator is multi-config or if CMAKE_BUILD_TYPE is set for
|
||||
# single-config generators, set optimized and debug libraries
|
||||
set( ${basename}_LIBRARY "" )
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
|
||||
list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
|
||||
endforeach()
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
|
||||
list( APPEND ${basename}_LIBRARY debug "${_libname}" )
|
||||
endforeach()
|
||||
elseif( ${basename}_LIBRARY_RELEASE )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
elseif( ${basename}_LIBRARY_DEBUG )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} )
|
||||
else()
|
||||
set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
|
||||
|
||||
if( ${basename}_LIBRARY )
|
||||
set( ${basename}_FOUND TRUE )
|
||||
endif()
|
||||
|
||||
mark_as_advanced( ${basename}_LIBRARY_RELEASE
|
||||
${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
endmacro()
|
||||
@@ -1,4 +1,7 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
SET(PROTOBUF_GENERATE_CPP_APPEND_PATH "../../")
|
||||
|
||||
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HEADERS message.proto)
|
||||
|
||||
SET(common_sources
|
||||
base_packet.cpp
|
||||
@@ -39,9 +42,10 @@ SET(common_sources
|
||||
item_instance.cpp
|
||||
json_config.cpp
|
||||
light_source.cpp
|
||||
md5.cpp
|
||||
md5.cpp
|
||||
memory_buffer.cpp
|
||||
memory_mapped_file.cpp
|
||||
message.pb.cc
|
||||
misc.cpp
|
||||
misc_functions.cpp
|
||||
mutex.cpp
|
||||
@@ -97,7 +101,7 @@ SET(common_sources
|
||||
patches/titanium.cpp
|
||||
patches/titanium_limits.cpp
|
||||
patches/uf.cpp
|
||||
patches/uf_limits.cpp
|
||||
patches/uf_limits.cpp
|
||||
StackWalker/StackWalker.cpp
|
||||
tinyxml/tinystr.cpp
|
||||
tinyxml/tinyxml.cpp
|
||||
@@ -167,6 +171,7 @@ SET(common_headers
|
||||
md5.h
|
||||
memory_buffer.h
|
||||
memory_mapped_file.h
|
||||
message.pb.h
|
||||
misc.h
|
||||
misc_functions.h
|
||||
mutex.h
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ struct BaseDataStruct
|
||||
double base_hp;
|
||||
double base_mana;
|
||||
double base_end;
|
||||
double unk1;
|
||||
double unk2;
|
||||
double hp_regen;
|
||||
double end_regen;
|
||||
double hp_factor;
|
||||
double mana_factor;
|
||||
double endurance_factor;
|
||||
|
||||
@@ -472,16 +472,6 @@ bool Database::CheckDatabaseConversions() {
|
||||
CheckDatabaseConvertPPDeblob();
|
||||
CheckDatabaseConvertCorpseDeblob();
|
||||
|
||||
/* Fetch EQEmu Server script */
|
||||
if (!std::ifstream("eqemu_server.pl")){
|
||||
std::cout << "Pulling down automatic database upgrade script..." << std::endl;
|
||||
#ifdef _WIN32
|
||||
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl'); if ($response->is_success){ open(FILE, '> eqemu_server.pl'); print FILE $response->decoded_content; close(FILE); }\"");
|
||||
#else
|
||||
system("wget --no-check-certificate -O eqemu_server.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Run EQEmu Server script (Checks for database updates) */
|
||||
system("perl eqemu_server.pl ran_from_world");
|
||||
|
||||
|
||||
@@ -18,3 +18,68 @@
|
||||
*/
|
||||
|
||||
#include "emu_constants.h"
|
||||
|
||||
|
||||
const char* EQEmu::bug::CategoryIDToCategoryName(CategoryID category_id) {
|
||||
switch (category_id) {
|
||||
case catVideo:
|
||||
return "Video";
|
||||
case catAudio:
|
||||
return "Audio";
|
||||
case catPathing:
|
||||
return "Pathing";
|
||||
case catQuest:
|
||||
return "Quest";
|
||||
case catTradeskills:
|
||||
return "Tradeskills";
|
||||
case catSpellStacking:
|
||||
return "Spell stacking";
|
||||
case catDoorsPortals:
|
||||
return "Doors/Portals";
|
||||
case catItems:
|
||||
return "Items";
|
||||
case catNPC:
|
||||
return "NPC";
|
||||
case catDialogs:
|
||||
return "Dialogs";
|
||||
case catLoNTCG:
|
||||
return "LoN - TCG";
|
||||
case catMercenaries:
|
||||
return "Mercenaries";
|
||||
case catOther:
|
||||
default:
|
||||
return "Other";
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::bug::CategoryID EQEmu::bug::CategoryNameToCategoryID(const char* category_name) {
|
||||
if (!category_name)
|
||||
return catOther;
|
||||
|
||||
if (!strcmp(category_name, "Video"))
|
||||
return catVideo;
|
||||
if (!strcmp(category_name, "Audio"))
|
||||
return catAudio;
|
||||
if (!strcmp(category_name, "Pathing"))
|
||||
return catPathing;
|
||||
if (!strcmp(category_name, "Quest"))
|
||||
return catQuest;
|
||||
if (!strcmp(category_name, "Tradeskills"))
|
||||
return catTradeskills;
|
||||
if (!strcmp(category_name, "Spell stacking"))
|
||||
return catSpellStacking;
|
||||
if (!strcmp(category_name, "Doors/Portals"))
|
||||
return catDoorsPortals;
|
||||
if (!strcmp(category_name, "Items"))
|
||||
return catItems;
|
||||
if (!strcmp(category_name, "NPC"))
|
||||
return catNPC;
|
||||
if (!strcmp(category_name, "Dialogs"))
|
||||
return catDialogs;
|
||||
if (!strcmp(category_name, "LoN - TCG"))
|
||||
return catLoNTCG;
|
||||
if (!strcmp(category_name, "Mercenaries"))
|
||||
return catMercenaries;
|
||||
|
||||
return catOther;
|
||||
}
|
||||
|
||||
+36
-1
@@ -24,7 +24,7 @@
|
||||
#include "emu_legacy.h"
|
||||
#include "emu_versions.h"
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
namespace EQEmu
|
||||
@@ -114,7 +114,11 @@ namespace EQEmu
|
||||
const EQEmu::versions::ClientVersion CharacterCreationClient = EQEmu::versions::ClientVersion::RoF2;
|
||||
const size_t CharacterCreationMax = RoF2::constants::CharacterCreationLimit;
|
||||
|
||||
const size_t SayLinkOpenerSize = 1;
|
||||
const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize;
|
||||
const size_t SayLinkTextSize = 256; // this may be varied until it breaks something (tested:374) - the others are constant
|
||||
const size_t SayLinkCloserSize = 1;
|
||||
const size_t SayLinkMaximumSize = (SayLinkOpenerSize + SayLinkBodySize + SayLinkTextSize + SayLinkCloserSize);
|
||||
|
||||
const int LongBuffs = RoF2::constants::LongBuffs;
|
||||
const int ShortBuffs = RoF2::constants::ShortBuffs;
|
||||
@@ -126,6 +130,37 @@ namespace EQEmu
|
||||
|
||||
} /*constants*/
|
||||
|
||||
namespace bug {
|
||||
enum CategoryID : uint32 {
|
||||
catOther = 0,
|
||||
catVideo,
|
||||
catAudio,
|
||||
catPathing,
|
||||
catQuest,
|
||||
catTradeskills,
|
||||
catSpellStacking,
|
||||
catDoorsPortals,
|
||||
catItems,
|
||||
catNPC,
|
||||
catDialogs,
|
||||
catLoNTCG,
|
||||
catMercenaries
|
||||
};
|
||||
|
||||
enum OptionalInfoFlag : uint32 {
|
||||
infoNoOptionalInfo = 0x0,
|
||||
infoCanDuplicate = 0x1,
|
||||
infoCrashBug = 0x2,
|
||||
infoTargetInfo = 0x4,
|
||||
infoCharacterFlags = 0x8,
|
||||
infoUnknownValue = 0xFFFFFFF0
|
||||
};
|
||||
|
||||
const char* CategoryIDToCategoryName(CategoryID category_id);
|
||||
CategoryID CategoryNameToCategoryID(const char* category_name);
|
||||
|
||||
} // namespace bug
|
||||
|
||||
enum class CastingSlot : uint32 {
|
||||
Gem1 = 0,
|
||||
Gem2 = 1,
|
||||
|
||||
+2
-2
@@ -78,6 +78,8 @@ namespace EQEmu
|
||||
SLOT_CURSOR_BAG_END = 340,
|
||||
SLOT_TRIBUTE_BEGIN = 400,
|
||||
SLOT_TRIBUTE_END = 404,
|
||||
SLOT_GUILD_TRIBUTE_BEGIN = 450,
|
||||
SLOT_GUILD_TRIBUTE_END = 451,
|
||||
SLOT_BANK_BEGIN = 2000,
|
||||
SLOT_BANK_END = 2023,
|
||||
SLOT_BANK_BAGS_BEGIN = 2031,
|
||||
@@ -173,8 +175,6 @@ namespace EQEmu
|
||||
|
||||
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
||||
|
||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ N(OP_AcceptNewTask),
|
||||
N(OP_AckPacket),
|
||||
N(OP_Action),
|
||||
N(OP_Action2),
|
||||
N(OP_AddNimbusEffect),
|
||||
N(OP_AdventureData),
|
||||
N(OP_AdventureDetails),
|
||||
N(OP_AdventureFinish),
|
||||
@@ -339,6 +340,7 @@ N(OP_MOTD),
|
||||
N(OP_MoveCoin),
|
||||
N(OP_MoveDoor),
|
||||
N(OP_MoveItem),
|
||||
N(OP_MoveMultipleItems),
|
||||
N(OP_MoveLogDisregard),
|
||||
N(OP_MoveLogRequest),
|
||||
N(OP_MultiLineMsg),
|
||||
@@ -391,6 +393,7 @@ N(OP_PVPLeaderBoardReply),
|
||||
N(OP_PVPLeaderBoardRequest),
|
||||
N(OP_PVPStats),
|
||||
N(OP_QueryResponseThing),
|
||||
N(OP_QueryUCSServerStatus),
|
||||
N(OP_RaidInvite),
|
||||
N(OP_RaidJoin),
|
||||
N(OP_RaidUpdate),
|
||||
|
||||
+16
-2
@@ -28,7 +28,7 @@
|
||||
namespace EQEmu
|
||||
{
|
||||
namespace versions {
|
||||
enum class ClientVersion {
|
||||
enum class ClientVersion : uint32 {
|
||||
Unknown = 0,
|
||||
Client62, // Build: 'Aug 4 2005 15:40:59'
|
||||
Titanium, // Build: 'Oct 31 2005 10:33:37'
|
||||
@@ -72,7 +72,7 @@ namespace EQEmu
|
||||
uint32 ConvertClientVersionToExpansion(ClientVersion client_version);
|
||||
|
||||
|
||||
enum class MobVersion {
|
||||
enum class MobVersion : uint32 {
|
||||
Unknown = 0,
|
||||
Client62,
|
||||
Titanium,
|
||||
@@ -121,6 +121,20 @@ namespace EQEmu
|
||||
ClientVersion ConvertOfflinePCMobVersionToClientVersion(MobVersion mob_version);
|
||||
MobVersion ConvertClientVersionToOfflinePCMobVersion(ClientVersion client_version);
|
||||
|
||||
|
||||
enum UCSVersion : char {
|
||||
ucsUnknown = '\0',
|
||||
ucsClient62Chat = 'A',
|
||||
ucsClient62Mail = 'a',
|
||||
ucsTitaniumChat = 'B',
|
||||
ucsTitaniumMail = 'b',
|
||||
ucsSoFCombined = 'C',
|
||||
ucsSoDCombined = 'D',
|
||||
ucsUFCombined = 'E',
|
||||
ucsRoFCombined = 'F',
|
||||
ucsRoF2Combined = 'G'
|
||||
};
|
||||
|
||||
} /*versions*/
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
+81
-48
@@ -280,7 +280,7 @@ union
|
||||
// horse: 0=brown, 1=white, 2=black, 3=tan
|
||||
};
|
||||
/*0340*/ uint32 spawnId; // Spawn Id
|
||||
/*0344*/ uint8 unknown0344[3];
|
||||
/*0344*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0347*/ uint8 IsMercenary;
|
||||
/*0348*/ EQEmu::TintProfile equipment_tint;
|
||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||
@@ -551,6 +551,7 @@ struct BlockedBuffs_Struct
|
||||
/*86*/ uint16 Flags;
|
||||
};
|
||||
|
||||
// same for adding
|
||||
struct RemoveNimbusEffect_Struct
|
||||
{
|
||||
/*00*/ uint32 spawnid; // Spawn ID
|
||||
@@ -854,6 +855,7 @@ static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size r
|
||||
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
|
||||
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 240;
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -993,7 +995,8 @@ struct PlayerProfile_Struct
|
||||
/*4768*/ int32 platinum_shared; // Platinum shared between characters
|
||||
/*4772*/ uint8 unknown4808[24];
|
||||
/*4796*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
|
||||
/*5196*/ uint8 unknown5132[184];
|
||||
/*5196*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL];
|
||||
/*5296*/ uint8 unknown5132[84];
|
||||
/*5380*/ uint32 pvp2; //
|
||||
/*5384*/ uint32 unknown5420; //
|
||||
/*5388*/ uint32 pvptype; //
|
||||
@@ -1250,21 +1253,22 @@ struct Action_Struct
|
||||
{
|
||||
/* 00 */ uint16 target; // id of target
|
||||
/* 02 */ uint16 source; // id of caster
|
||||
/* 04 */ uint16 level; // level of caster
|
||||
/* 06 */ uint16 instrument_mod;
|
||||
/* 08 */ uint32 bard_focus_id;
|
||||
/* 12 */ uint16 unknown16;
|
||||
// some kind of sequence that's the same in both actions
|
||||
// as well as the combat damage, to tie em together?
|
||||
/* 14 */ uint32 sequence;
|
||||
/* 18 */ uint32 unknown18;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells
|
||||
/* 23 */ uint32 unknown23;
|
||||
/* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
|
||||
/* 10 */ float force;
|
||||
/* 14 */ float hit_heading;
|
||||
/* 18 */ float hit_pitch;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/* 23 */ uint16 unknown23; // OSX says min_damage
|
||||
/* 25 */ uint16 unknown25; // OSX says tohit
|
||||
/* 27 */ uint16 spell; // spell id being cast
|
||||
/* 29 */ uint8 unknown29;
|
||||
/* 29 */ uint8 spell_level;
|
||||
// this field seems to be some sort of success flag, if it's 4
|
||||
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made
|
||||
/* 31 */
|
||||
/* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
|
||||
// newer clients have some data for setting LaunchSpellData when effect_flag & 4
|
||||
// /* 31 */ uint8 spell_gem;
|
||||
// /* 32 */ uint32 inventory_slot;
|
||||
// /* 36 */ uint32 item_cast_type;
|
||||
};
|
||||
|
||||
// this is what prints the You have been struck. and the regular
|
||||
@@ -1274,12 +1278,12 @@ struct CombatDamage_Struct
|
||||
{
|
||||
/* 00 */ uint16 target;
|
||||
/* 02 */ uint16 source;
|
||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells, skill
|
||||
/* 05 */ uint16 spellid;
|
||||
/* 07 */ uint32 damage;
|
||||
/* 11 */ float force;
|
||||
/* 15 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 19 */ float meleepush_z;
|
||||
/* 15 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 19 */ float hit_pitch;
|
||||
/* 23 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||
};
|
||||
|
||||
@@ -3320,23 +3324,32 @@ struct GuildMakeLeader{
|
||||
char target[64];
|
||||
};
|
||||
|
||||
struct BugStruct{
|
||||
/*0000*/ char chartype[64];
|
||||
/*0064*/ char name[96];
|
||||
/*0160*/ char ui[128];
|
||||
/*0288*/ float x;
|
||||
/*0292*/ float y;
|
||||
/*0296*/ float z;
|
||||
/*0300*/ float heading;
|
||||
/*0304*/ uint32 unknown304;
|
||||
/*0308*/ char unknown308[160];
|
||||
/*0468*/ char target_name[64];
|
||||
/*0532*/ uint32 type;
|
||||
/*0536*/ char unknown536[2052];
|
||||
/*2584*/ char bug[2048];
|
||||
/*4632*/ char unknown4632[6];
|
||||
/*4638*/ char system_info[4094];
|
||||
struct BugReport_Struct {
|
||||
/*0000*/ uint32 category_id;
|
||||
/*0004*/ char category_name[64];
|
||||
/*0068*/ char reporter_name[64];
|
||||
/*0132*/ char unused_0132[32];
|
||||
/*0164*/ char ui_path[128];
|
||||
/*0292*/ float pos_x;
|
||||
/*0296*/ float pos_y;
|
||||
/*0300*/ float pos_z;
|
||||
/*0304*/ uint32 heading;
|
||||
/*0308*/ uint32 unused_0308;
|
||||
/*0312*/ uint32 time_played;
|
||||
/*0316*/ char padding_0316[8];
|
||||
/*0324*/ uint32 target_id;
|
||||
/*0328*/ char padding_0328[140];
|
||||
/*0468*/ uint32 unknown_0468; // seems to always be '0'
|
||||
/*0472*/ char target_name[64];
|
||||
/*0536*/ uint32 optional_info_mask;
|
||||
|
||||
// this looks like a butchered 8k buffer with 2 trailing dword fields
|
||||
/*0540*/ char unused_0540[2052];
|
||||
/*2592*/ char bug_report[2050];
|
||||
/*4642*/ char system_info[4098];
|
||||
/*8740*/
|
||||
};
|
||||
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -3363,20 +3376,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -4764,6 +4778,7 @@ struct BuffIconEntry_Struct
|
||||
uint32 spell_id;
|
||||
int32 tics_remaining;
|
||||
uint32 num_hits;
|
||||
char caster[64];
|
||||
};
|
||||
|
||||
struct BuffIcon_Struct
|
||||
@@ -4773,6 +4788,7 @@ struct BuffIcon_Struct
|
||||
uint16 count;
|
||||
uint8 type; // 0 = self buff window, 1 = self target window, 4 = group, 5 = PC, 7 = NPC
|
||||
int32 tic_timer;
|
||||
int32 name_lengths; // so ahh we kind of do these packets hacky, this is the total length of all the names to make creating the real packets in the translators easier
|
||||
BuffIconEntry_Struct entries[0];
|
||||
};
|
||||
|
||||
@@ -5351,6 +5367,23 @@ struct AuraDestory_Struct {
|
||||
};
|
||||
// I think we can assume it's just action for 2, client doesn't seem to do anything with the rest of the data in that case
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char Augment6[5];
|
||||
/*036*/ char IsEvolving[1];
|
||||
/*037*/ char EvolveGroup[4];
|
||||
/*041*/ char EvolveLevel[2];
|
||||
/*043*/ char OrnamentIcon[5];
|
||||
/*048*/ char Hash[8];
|
||||
/*056*/
|
||||
};
|
||||
|
||||
// Restore structure packing to default
|
||||
#pragma pack()
|
||||
|
||||
|
||||
+96
-336
@@ -23,351 +23,112 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
std::string EQEmuConfig::ConfigFile = "eqemu_config.xml";
|
||||
std::string EQEmuConfig::ConfigFile = "eqemu_config.json";
|
||||
EQEmuConfig *EQEmuConfig::_config = nullptr;
|
||||
|
||||
void EQEmuConfig::do_world(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
TiXmlElement * sub_ele;;
|
||||
text = ParseTextBlock(ele, "shortname");
|
||||
if (text) {
|
||||
ShortName = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "longname");
|
||||
if (text) {
|
||||
LongName = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "address", true);
|
||||
if (text) {
|
||||
WorldAddress = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "localaddress", true);
|
||||
if (text) {
|
||||
LocalAddress = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "maxclients", true);
|
||||
if (text) {
|
||||
MaxClients = atoi(text);
|
||||
}
|
||||
// Get the <key> element
|
||||
text = ParseTextBlock(ele, "key", true);
|
||||
if (text) {
|
||||
SharedKey = text;
|
||||
}
|
||||
// Get the <loginserver> element
|
||||
sub_ele = ele->FirstChildElement("loginserver");
|
||||
if (sub_ele) {
|
||||
text = ParseTextBlock(sub_ele, "host", true);
|
||||
if (text) {
|
||||
LoginHost = text;
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "port", true);
|
||||
if (text) {
|
||||
LoginPort = atoi(text);
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "legacy", true);
|
||||
if (text) {
|
||||
LoginLegacy = atoi(text) > 0 ? true : false;
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "account", true);
|
||||
if (text) {
|
||||
LoginAccount = text;
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "password", true);
|
||||
if (text) {
|
||||
LoginPassword = text;
|
||||
}
|
||||
void EQEmuConfig::parse_config() {
|
||||
|
||||
ShortName = _root["server"]["world"].get("shortname", "").asString();
|
||||
LongName = _root["server"]["world"].get("longname", "").asString();
|
||||
WorldAddress = _root["server"]["world"].get("address", "").asString();
|
||||
LocalAddress = _root["server"]["world"].get("localaddress", "").asString();
|
||||
MaxClients = atoi(_root["server"]["world"].get("maxclients", "-1").asString().c_str());
|
||||
SharedKey = _root["server"]["world"].get("key", "").asString();
|
||||
LoginCount = 0;
|
||||
|
||||
if (_root["server"]["world"]["loginserver"].isObject()) {
|
||||
LoginHost = _root["server"]["world"]["loginserver"].get("host", "login.eqemulator.net").asString();
|
||||
LoginPort = atoi(_root["server"]["world"]["loginserver"].get("port", "5998").asString().c_str());
|
||||
LoginLegacy = false;
|
||||
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();
|
||||
} else {
|
||||
char str[32];
|
||||
char str[32];
|
||||
loginlist.Clear();
|
||||
do {
|
||||
sprintf(str, "loginserver%i", ++LoginCount);
|
||||
sub_ele = ele->FirstChildElement(str);
|
||||
if (sub_ele) {
|
||||
auto loginconfig = new LoginConfig;
|
||||
text = ParseTextBlock(sub_ele, "host", true);
|
||||
if (text) {
|
||||
loginconfig->LoginHost = text;
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "port", true);
|
||||
if (text) {
|
||||
loginconfig->LoginPort = atoi(text);
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "legacy", true);
|
||||
if (text) {
|
||||
loginconfig->LoginLegacy = atoi(text) > 0 ? true : false;
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "account", true);
|
||||
if (text) {
|
||||
loginconfig->LoginAccount = text;
|
||||
}
|
||||
text = ParseTextBlock(sub_ele, "password", true);
|
||||
if (text) {
|
||||
loginconfig->LoginPassword = text;
|
||||
}
|
||||
loginlist.Insert(loginconfig);
|
||||
if (!_root["server"]["world"][str].isObject()) {
|
||||
break;
|
||||
}
|
||||
} while (sub_ele);
|
||||
}
|
||||
// Check for locked
|
||||
sub_ele = ele->FirstChildElement("locked");
|
||||
if (sub_ele != nullptr) {
|
||||
Locked = true;
|
||||
}
|
||||
// Get the <tcp> element
|
||||
sub_ele = ele->FirstChildElement("tcp");
|
||||
if (sub_ele != nullptr) {
|
||||
text = sub_ele->Attribute("ip");
|
||||
if (text) {
|
||||
WorldIP = text;
|
||||
}
|
||||
text = sub_ele->Attribute("port");
|
||||
if (text) {
|
||||
WorldTCPPort = atoi(text);
|
||||
}
|
||||
}
|
||||
|
||||
sub_ele = ele->FirstChildElement("telnet");
|
||||
if (sub_ele != nullptr) {
|
||||
text = sub_ele->Attribute("ip");
|
||||
if (text) {
|
||||
TelnetIP = text;
|
||||
}
|
||||
text = sub_ele->Attribute("port");
|
||||
if (text) {
|
||||
TelnetTCPPort = atoi(text);
|
||||
}
|
||||
text = sub_ele->Attribute("enabled");
|
||||
if (text && !strcasecmp(text, "true")) {
|
||||
TelnetEnabled = true;
|
||||
}
|
||||
}
|
||||
auto loginconfig = new LoginConfig;
|
||||
loginconfig->LoginHost = _root["server"]["world"][str].get("host", "login.eqemulator.net").asString();
|
||||
loginconfig->LoginPort = atoi(_root["server"]["world"][str].get("port", "5998").asString().c_str());
|
||||
loginconfig->LoginAccount = _root["server"]["world"][str].get("account", "").asString();
|
||||
loginconfig->LoginPassword = _root["server"]["world"][str].get("password", "").asString();
|
||||
|
||||
// Get the <http> element
|
||||
sub_ele = ele->FirstChildElement("http");
|
||||
if (sub_ele != nullptr) {
|
||||
// text = sub_ele->Attribute("ip");
|
||||
// if (text)
|
||||
// WorldIP=text;
|
||||
text = sub_ele->Attribute("mimefile");
|
||||
if (text) {
|
||||
WorldHTTPMimeFile = text;
|
||||
}
|
||||
text = sub_ele->Attribute("port");
|
||||
if (text) {
|
||||
WorldHTTPPort = atoi(text);
|
||||
}
|
||||
text = sub_ele->Attribute("enabled");
|
||||
if (text && !strcasecmp(text, "true")) {
|
||||
WorldHTTPEnabled = true;
|
||||
}
|
||||
loginconfig->LoginLegacy = false;
|
||||
if (_root["server"]["world"][str].get("legacy", "0").asString() == "1") loginconfig->LoginLegacy = true;
|
||||
loginlist.Insert(loginconfig);
|
||||
} while (LoginCount < 100);
|
||||
}
|
||||
|
||||
|
||||
//<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;
|
||||
WorldIP = _root["server"]["world"]["tcp"].get("host", "127.0.0.1").asString();
|
||||
WorldTCPPort = atoi(_root["server"]["world"]["tcp"].get("port", "9000").asString().c_str());
|
||||
|
||||
TelnetIP = _root["server"]["world"]["telnet"].get("ip", "127.0.0.1").asString();
|
||||
TelnetTCPPort = atoi(_root["server"]["world"]["telnet"].get("port", "9001").asString().c_str());
|
||||
TelnetEnabled = false;
|
||||
if (_root["server"]["world"]["telnet"].get("enabled", "false").asString() == "true") TelnetEnabled = true;
|
||||
|
||||
WorldHTTPMimeFile = _root["server"]["world"]["http"].get("mimefile", "mime.types").asString();
|
||||
WorldHTTPPort = atoi(_root["server"]["world"]["http"].get("port", "9080").asString().c_str());
|
||||
WorldHTTPEnabled = false;
|
||||
if (_root["server"]["world"]["http"].get("enabled", "false").asString() == "true") WorldHTTPEnabled = true;
|
||||
|
||||
ChatHost = _root["server"]["chatserver"].get("host", "eqchat.eqemulator.net").asString();
|
||||
ChatPort = atoi(_root["server"]["chatserver"].get("port", "7778").asString().c_str());
|
||||
|
||||
MailHost = _root["server"]["mailserver"].get("host", "eqmail.eqemulator.net").asString();
|
||||
MailPort = atoi(_root["server"]["mailserver"].get("port", "7778").asString().c_str());
|
||||
|
||||
DatabaseUsername = _root["server"]["database"].get("username", "eq").asString();
|
||||
DatabasePassword = _root["server"]["database"].get("password", "eq").asString();
|
||||
DatabaseHost = _root["server"]["database"].get("host", "localhost").asString();
|
||||
DatabasePort = atoi(_root["server"]["database"].get("port", "3306").asString().c_str());
|
||||
DatabaseDB = _root["server"]["database"].get("db", "eq").asString();
|
||||
|
||||
QSDatabaseHost = _root["server"]["qsdatabase"].get("host", "localhost").asString();
|
||||
QSDatabasePort = atoi(_root["server"]["qsdatabase"].get("port", "3306").asString().c_str());
|
||||
QSDatabaseUsername = _root["server"]["qsdatabase"].get("username", "eq").asString();
|
||||
QSDatabasePassword = _root["server"]["qsdatabase"].get("password", "eq").asString();
|
||||
QSDatabaseDB = _root["server"]["qsdatabase"].get("db", "eq").asString();
|
||||
|
||||
DefaultStatus = atoi(_root["server"]["zones"].get("defaultstatus", 0).asString().c_str());
|
||||
ZonePortLow = atoi(_root["server"]["zones"]["ports"].get("low", "7000").asString().c_str());
|
||||
ZonePortHigh = atoi(_root["server"]["zones"]["ports"].get("high", "7999").asString().c_str());
|
||||
|
||||
SpellsFile = _root["server"]["files"].get("spells", "spells_us.txt").asString();
|
||||
OpCodesFile = _root["server"]["files"].get("opcodes", "opcodes.conf").asString();
|
||||
PluginPlFile = _root["server"]["files"].get("plugin.pl", "plugin.pl").asString();
|
||||
|
||||
MapDir = _root["server"]["directories"].get("maps", "Maps/").asString();
|
||||
QuestDir = _root["server"]["directories"].get("quests", "quests/").asString();
|
||||
PluginDir = _root["server"]["directories"].get("plugins", "plugins/").asString();
|
||||
LuaModuleDir = _root["server"]["directories"].get("lua_modules", "lua_modules/").asString();
|
||||
PatchDir = _root["server"]["directories"].get("patches", "./").asString();
|
||||
SharedMemDir = _root["server"]["directories"].get("shared_memory", "shared/").asString();
|
||||
LogDir = _root["server"]["directories"].get("logs", "logs/").asString();
|
||||
|
||||
LogPrefix = _root["server"]["launcher"].get("logprefix", "logs/zone-").asString();
|
||||
LogSuffix = _root["server"]["launcher"].get("logsuffix", ".log").asString();
|
||||
RestartWait = atoi(_root["server"]["launcher"]["timers"].get("restart", "10000").asString().c_str());
|
||||
TerminateWait = atoi(_root["server"]["launcher"]["timers"].get("reterminate", "10000").asString().c_str());
|
||||
InitialBootWait = atoi(_root["server"]["launcher"]["timers"].get("initial", "20000").asString().c_str());
|
||||
ZoneBootInterval = atoi(_root["server"]["launcher"]["timers"].get("interval", "2000").asString().c_str());
|
||||
#ifdef WIN32
|
||||
ZoneExe = _root["server"]["launcher"].get("exe", "zone.exe").asString();
|
||||
#else
|
||||
ZoneExe = _root["server"]["launcher"].get("exe", "./zone").asString();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_chatserver(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
text = ParseTextBlock(ele, "host", true);
|
||||
if (text) {
|
||||
ChatHost = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "port", true);
|
||||
if (text) {
|
||||
ChatPort = atoi(text);
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_mailserver(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
text = ParseTextBlock(ele, "host", true);
|
||||
if (text) {
|
||||
MailHost = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "port", true);
|
||||
if (text) {
|
||||
MailPort = atoi(text);
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_database(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
text = ParseTextBlock(ele, "host", true);
|
||||
if (text) {
|
||||
DatabaseHost = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "port", true);
|
||||
if (text) {
|
||||
DatabasePort = atoi(text);
|
||||
}
|
||||
text = ParseTextBlock(ele, "username", true);
|
||||
if (text) {
|
||||
DatabaseUsername = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "password", true);
|
||||
if (text) {
|
||||
DatabasePassword = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "db", true);
|
||||
if (text) {
|
||||
DatabaseDB = text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EQEmuConfig::do_qsdatabase(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
text = ParseTextBlock(ele, "host", true);
|
||||
if (text) {
|
||||
QSDatabaseHost = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "port", true);
|
||||
if (text) {
|
||||
QSDatabasePort = atoi(text);
|
||||
}
|
||||
text = ParseTextBlock(ele, "username", true);
|
||||
if (text) {
|
||||
QSDatabaseUsername = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "password", true);
|
||||
if (text) {
|
||||
QSDatabasePassword = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "db", true);
|
||||
if (text) {
|
||||
QSDatabaseDB = text;
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_zones(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
TiXmlElement *sub_ele;
|
||||
// TiXmlNode *node,*sub_node;
|
||||
text = ParseTextBlock(ele, "defaultstatus", true);
|
||||
if (text) {
|
||||
DefaultStatus = atoi(text);
|
||||
}
|
||||
// Get the <ports> element
|
||||
sub_ele = ele->FirstChildElement("ports");
|
||||
if (sub_ele != nullptr) {
|
||||
text = sub_ele->Attribute("low");
|
||||
if (text) {
|
||||
ZonePortLow = atoi(text);
|
||||
};
|
||||
text = sub_ele->Attribute("high");
|
||||
if (text) {
|
||||
ZonePortHigh = atoi(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_files(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
text = ParseTextBlock(ele, "spells", true);
|
||||
if (text) {
|
||||
SpellsFile = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "opcodes", true);
|
||||
if (text) {
|
||||
OpCodesFile = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "plugin.pl", true);
|
||||
if (text) {
|
||||
PluginPlFile = text;
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_directories(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
text = ParseTextBlock(ele, "maps", true);
|
||||
if (text) {
|
||||
MapDir = text;
|
||||
if ( MapDir.back() != '/' )
|
||||
MapDir += '/';
|
||||
}
|
||||
text = ParseTextBlock(ele, "quests", true);
|
||||
if (text) {
|
||||
QuestDir = text;
|
||||
if ( QuestDir.back() != '/' )
|
||||
QuestDir += '/';
|
||||
}
|
||||
text = ParseTextBlock(ele, "plugins", true);
|
||||
if (text) {
|
||||
PluginDir = text;
|
||||
if ( PluginDir.back() != '/' )
|
||||
PluginDir += '/';
|
||||
}
|
||||
text = ParseTextBlock(ele, "lua_modules", true);
|
||||
if (text) {
|
||||
LuaModuleDir = text;
|
||||
if ( LuaModuleDir.back() != '/' )
|
||||
LuaModuleDir += '/';
|
||||
}
|
||||
text = ParseTextBlock(ele, "patches", true);
|
||||
if (text) {
|
||||
PatchDir = text;
|
||||
if ( PatchDir.back() != '/' )
|
||||
PatchDir += '/';
|
||||
}
|
||||
text = ParseTextBlock(ele, "shared_memory", true);
|
||||
if (text) {
|
||||
SharedMemDir = text;
|
||||
if ( SharedMemDir.back() != '/' )
|
||||
SharedMemDir += '/';
|
||||
}
|
||||
//Not Fully Implemented yet LogDir
|
||||
text = ParseTextBlock(ele, "logs", true);
|
||||
if (text) {
|
||||
LogDir = text;
|
||||
if ( LogDir.back() != '/' )
|
||||
LogDir += '/';
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_launcher(TiXmlElement *ele)
|
||||
{
|
||||
const char *text;
|
||||
TiXmlElement *sub_ele;
|
||||
text = ParseTextBlock(ele, "logprefix", true);
|
||||
if (text) {
|
||||
LogPrefix = text;
|
||||
}
|
||||
text = ParseTextBlock(ele, "logsuffix", true);
|
||||
if (text) {
|
||||
LogSuffix = text;
|
||||
}
|
||||
// Get the <exe> element
|
||||
text = ParseTextBlock(ele, "exe", true);
|
||||
if (text) {
|
||||
ZoneExe = text;
|
||||
}
|
||||
// Get the <timers> element
|
||||
sub_ele = ele->FirstChildElement("timers");
|
||||
if (sub_ele != nullptr) {
|
||||
text = sub_ele->Attribute("restart");
|
||||
if (text) {
|
||||
RestartWait = atoi(text);
|
||||
}
|
||||
text = sub_ele->Attribute("reterminate");
|
||||
if (text) {
|
||||
TerminateWait = atoi(text);
|
||||
}
|
||||
text = sub_ele->Attribute("initial");
|
||||
if (text) {
|
||||
InitialBootWait = atoi(text);
|
||||
}
|
||||
text = sub_ele->Attribute("interval");
|
||||
if (text) {
|
||||
ZoneBootInterval = atoi(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string EQEmuConfig::GetByName(const std::string &var_name) const
|
||||
{
|
||||
if (var_name == "ShortName") {
|
||||
@@ -564,4 +325,3 @@ void EQEmuConfig::Dump() const
|
||||
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
|
||||
// std::cout << "DynamicCount = " << DynamicCount << std::endl;
|
||||
}
|
||||
|
||||
|
||||
+31
-84
@@ -18,8 +18,9 @@
|
||||
#ifndef __EQEmuConfig_H
|
||||
#define __EQEmuConfig_H
|
||||
|
||||
#include "xml_parser.h"
|
||||
#include "json/json.h"
|
||||
#include "linked_list.h"
|
||||
#include <fstream>
|
||||
|
||||
struct LoginConfig {
|
||||
std::string LoginHost;
|
||||
@@ -29,7 +30,7 @@ struct LoginConfig {
|
||||
bool LoginLegacy;
|
||||
};
|
||||
|
||||
class EQEmuConfig : public XMLParser
|
||||
class EQEmuConfig
|
||||
{
|
||||
public:
|
||||
virtual std::string GetByName(const std::string &var_name) const;
|
||||
@@ -80,6 +81,10 @@ class EQEmuConfig : public XMLParser
|
||||
std::string QSDatabaseDB;
|
||||
uint16 QSDatabasePort;
|
||||
|
||||
// From <nats/>
|
||||
std::string NATSHost;
|
||||
uint16 NATSPort;
|
||||
|
||||
// From <files/>
|
||||
std::string SpellsFile;
|
||||
std::string OpCodesFile;
|
||||
@@ -115,88 +120,14 @@ class EQEmuConfig : public XMLParser
|
||||
protected:
|
||||
|
||||
static EQEmuConfig *_config;
|
||||
|
||||
Json::Value _root;
|
||||
static std::string ConfigFile;
|
||||
|
||||
#define ELEMENT(name) \
|
||||
void do_##name(TiXmlElement *ele);
|
||||
#include "eqemu_config_elements.h"
|
||||
|
||||
void parse_config();
|
||||
|
||||
EQEmuConfig()
|
||||
{
|
||||
// import the needed handler prototypes
|
||||
#define ELEMENT(name) \
|
||||
Handlers[#name]=(ElementHandler)&EQEmuConfig::do_##name;
|
||||
#include "eqemu_config_elements.h"
|
||||
// Set sane defaults
|
||||
// Login server
|
||||
LoginHost = "login.eqemulator.net";
|
||||
LoginPort = 5998;
|
||||
LoginLegacy = false;
|
||||
// World
|
||||
Locked = false;
|
||||
WorldTCPPort = 9000;
|
||||
TelnetTCPPort = 9001;
|
||||
TelnetEnabled = false;
|
||||
WorldHTTPEnabled = false;
|
||||
WorldHTTPPort = 9080;
|
||||
WorldHTTPMimeFile = "mime.types";
|
||||
SharedKey = ""; //blank disables authentication
|
||||
// Mail
|
||||
ChatHost = "eqchat.eqemulator.net";
|
||||
ChatPort = 7778;
|
||||
// Mail
|
||||
MailHost = "eqmail.eqemulator.net";
|
||||
MailPort = 7779;
|
||||
// Mysql
|
||||
DatabaseHost = "localhost";
|
||||
DatabasePort = 3306;
|
||||
DatabaseUsername = "eq";
|
||||
DatabasePassword = "eq";
|
||||
DatabaseDB = "eq";
|
||||
// QueryServ Database
|
||||
QSDatabaseHost = "localhost";
|
||||
QSDatabasePort = 3306;
|
||||
QSDatabaseUsername = "eq";
|
||||
QSDatabasePassword = "eq";
|
||||
QSDatabaseDB = "eq";
|
||||
// Files
|
||||
SpellsFile = "spells_us.txt";
|
||||
OpCodesFile = "opcodes.conf";
|
||||
PluginPlFile = "plugin.pl";
|
||||
// Dirs
|
||||
MapDir = "Maps/";
|
||||
QuestDir = "quests/";
|
||||
PluginDir = "plugins/";
|
||||
LuaModuleDir = "lua_modules/";
|
||||
PatchDir = "./";
|
||||
SharedMemDir = "shared/";
|
||||
LogDir = "logs/";
|
||||
{
|
||||
|
||||
// Launcher
|
||||
LogPrefix = "logs/zone-";
|
||||
LogSuffix = ".log";
|
||||
RestartWait = 10000; //milliseconds
|
||||
TerminateWait = 10000; //milliseconds
|
||||
InitialBootWait = 20000; //milliseconds
|
||||
ZoneBootInterval = 2000; //milliseconds
|
||||
#ifdef WIN32
|
||||
ZoneExe = "zone.exe";
|
||||
#else
|
||||
ZoneExe = "./zone";
|
||||
#endif
|
||||
// Zones
|
||||
ZonePortLow = 7000;
|
||||
ZonePortHigh = 7999;
|
||||
DefaultStatus = 0;
|
||||
// For where zones need to connect to.
|
||||
WorldIP = "127.0.0.1";
|
||||
TelnetIP = "127.0.0.1";
|
||||
// Dynamics to start
|
||||
//DynamicCount=5;
|
||||
MaxClients = -1;
|
||||
LoginCount = 0;
|
||||
}
|
||||
virtual ~EQEmuConfig() {}
|
||||
|
||||
@@ -205,9 +136,7 @@ class EQEmuConfig : public XMLParser
|
||||
// Produce a const singleton
|
||||
static const EQEmuConfig *get()
|
||||
{
|
||||
if (_config == nullptr) {
|
||||
LoadConfig();
|
||||
}
|
||||
LoadConfig();
|
||||
return (_config);
|
||||
}
|
||||
|
||||
@@ -221,10 +150,28 @@ class EQEmuConfig : public XMLParser
|
||||
static bool LoadConfig()
|
||||
{
|
||||
if (_config != nullptr) {
|
||||
delete _config;
|
||||
return true;
|
||||
}
|
||||
_config = new EQEmuConfig;
|
||||
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(), "server");
|
||||
|
||||
return parseFile();
|
||||
}
|
||||
|
||||
// Load config file and parse data
|
||||
static bool parseFile() {
|
||||
if (_config == nullptr) {
|
||||
return LoadConfig();
|
||||
}
|
||||
|
||||
std::ifstream fconfig(EQEmuConfig::ConfigFile, std::ifstream::binary);
|
||||
try {
|
||||
fconfig >> _config->_root;
|
||||
_config->parse_config();
|
||||
}
|
||||
catch (std::exception) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Dump() const;
|
||||
|
||||
@@ -104,6 +104,7 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
log_settings[Logs::MySQLError].log_to_console = Logs::General;
|
||||
log_settings[Logs::Login_Server].log_to_console = Logs::General;
|
||||
log_settings[Logs::Headless_Client].log_to_console = Logs::General;
|
||||
log_settings[Logs::NATS].log_to_console = Logs::General;
|
||||
|
||||
/* Set Category enabled status on defaults */
|
||||
log_settings[Logs::World_Server].is_category_enabled = 1;
|
||||
@@ -113,6 +114,7 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
log_settings[Logs::Crash].is_category_enabled = 1;
|
||||
log_settings[Logs::MySQLError].is_category_enabled = 1;
|
||||
log_settings[Logs::Login_Server].is_category_enabled = 1;
|
||||
log_settings[Logs::NATS].is_category_enabled = 1;
|
||||
|
||||
/* Declare process file names for log writing
|
||||
If there is no process_file_name declared, no log file will be written, simply
|
||||
|
||||
@@ -88,6 +88,9 @@ enum LogCategory {
|
||||
Headless_Client,
|
||||
HP_Update,
|
||||
FixZ,
|
||||
Food,
|
||||
Traps,
|
||||
NATS,
|
||||
MaxCategoryID /* Don't Remove this*/
|
||||
};
|
||||
|
||||
@@ -140,7 +143,10 @@ static const char* LogCategoryName[LogCategory::MaxCategoryID] = {
|
||||
"Client Login",
|
||||
"Headless Client",
|
||||
"HP Update",
|
||||
"FixZ"
|
||||
"FixZ",
|
||||
"Food",
|
||||
"Traps",
|
||||
"NATS"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,9 @@ enum { //some random constants
|
||||
//the square of the maximum range at whihc you could possibly use NPC services (shop, tribute, etc)
|
||||
#define USE_NPC_RANGE2 200*200 //arbitrary right now
|
||||
|
||||
// Squared range for rampage 75.0 * 75.0 for now
|
||||
#define NPC_RAMPAGE_RANGE2 5625.0f
|
||||
|
||||
//the formula for experience for killing a mob.
|
||||
//level is the only valid variable to use
|
||||
#define EXP_FORMULA level*level*75*35/10
|
||||
@@ -276,6 +279,11 @@ enum {
|
||||
#define SAYLINK_ITEM_ID 0xFFFFF
|
||||
|
||||
|
||||
// consumption timers for food/drink here instead of rules because the client
|
||||
// uses these. Times in ms.
|
||||
#define CONSUMPTION_TIMER 46000
|
||||
#define CONSUMPTION_MNK_TIMER 92000
|
||||
|
||||
/*
|
||||
|
||||
Developer configuration
|
||||
|
||||
@@ -111,7 +111,8 @@
|
||||
#define GLM_COMPILER_GCC70 0x02000A00
|
||||
#define GLM_COMPILER_GCC71 0x02000B00
|
||||
#define GLM_COMPILER_GCC72 0x02000C00
|
||||
#define GLM_COMPILER_GCC80 0x02000D00
|
||||
#define GLM_COMPILER_GCC73 0x02000D00
|
||||
#define GLM_COMPILER_GCC80 0x02000E00
|
||||
|
||||
// CUDA
|
||||
#define GLM_COMPILER_CUDA 0x10000000
|
||||
@@ -283,6 +284,8 @@
|
||||
# define GLM_COMPILER (GLM_COMPILER_GCC71)
|
||||
# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2)
|
||||
# define GLM_COMPILER (GLM_COMPILER_GCC72)
|
||||
# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 3)
|
||||
# define GLM_COMPILER (GLM_COMPILER_GCC73)
|
||||
# elif (__GNUC__ >= 8)
|
||||
# define GLM_COMPILER (GLM_COMPILER_GCC80)
|
||||
# else
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+52
-14
@@ -194,32 +194,70 @@ uint32 rnd_hash( time_t t, clock_t c )
|
||||
|
||||
float EQ13toFloat(int d)
|
||||
{
|
||||
return ( float(d)/float(1<<2));
|
||||
}
|
||||
|
||||
float NewEQ13toFloat(int d)
|
||||
{
|
||||
return ( float(d)/float(1<<6));
|
||||
return static_cast<float>(d) / 64.0f;
|
||||
}
|
||||
|
||||
float EQ19toFloat(int d)
|
||||
{
|
||||
return ( float(d)/float(1<<3));
|
||||
return static_cast<float>(d) / 8.0f;
|
||||
}
|
||||
|
||||
int FloatToEQ13(float d)
|
||||
{
|
||||
return int(d*float(1<<2));
|
||||
}
|
||||
|
||||
int NewFloatToEQ13(float d)
|
||||
{
|
||||
return int(d*float(1<<6));
|
||||
return static_cast<int>(d * 64.0f);
|
||||
}
|
||||
|
||||
int FloatToEQ19(float d)
|
||||
{
|
||||
return int(d*float(1<<3));
|
||||
return static_cast<int>(d * 8.0f);
|
||||
}
|
||||
|
||||
float EQ12toFloat(int d)
|
||||
{
|
||||
return static_cast<float>(d) / 4.0f;
|
||||
}
|
||||
|
||||
int FloatToEQ12(float d)
|
||||
{
|
||||
return static_cast<int>((d + 2048.0f) * 4.0f) % 2048;
|
||||
}
|
||||
|
||||
float EQ10toFloat(int d)
|
||||
{
|
||||
return static_cast<float>(d) / 20.0f;
|
||||
}
|
||||
|
||||
int FloatToEQ10(float d)
|
||||
{
|
||||
return static_cast<int>(d * 20.0f);
|
||||
}
|
||||
|
||||
float EQSpeedRunToFloat(int d)
|
||||
{
|
||||
return static_cast<float>(d) / 40.0f;
|
||||
}
|
||||
|
||||
int FloatToEQSpeedRun(float d)
|
||||
{
|
||||
return static_cast<int>(d * 40.0f);
|
||||
}
|
||||
|
||||
float FixHeading(float in)
|
||||
{
|
||||
int i = 0;
|
||||
if (in >= 512.0f) {
|
||||
do {
|
||||
in -= 512.0f;
|
||||
} while (in >= 512.0f && i++ <= 5);
|
||||
}
|
||||
i = 0;
|
||||
if (in < 0.0f) {
|
||||
do {
|
||||
in += 512.0f;
|
||||
} while (in < 0.0f && i++ <= 5);
|
||||
}
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+14
-2
@@ -50,13 +50,25 @@ uint32 ResolveIP(const char* hostname, char* errbuf = 0);
|
||||
bool ParseAddress(const char* iAddress, uint32* oIP, uint16* oPort, char* errbuf = 0);
|
||||
void CoutTimestamp(bool ms = true);
|
||||
float EQ13toFloat(int d);
|
||||
float NewEQ13toFloat(int d);
|
||||
float EQ19toFloat(int d);
|
||||
float EQHtoFloat(int d);
|
||||
int FloatToEQ13(float d);
|
||||
int NewFloatToEQ13(float d);
|
||||
int FloatToEQ19(float d);
|
||||
int FloatToEQH(float d);
|
||||
|
||||
float EQ12toFloat(int d);
|
||||
int FloatToEQ12(float d);
|
||||
|
||||
float EQ10toFloat(int d);
|
||||
int FloatToEQ10(float d);
|
||||
|
||||
// this is also a 10 bit float
|
||||
float EQSpeedRunToFloat(int d);
|
||||
int FloatToEQSpeedRun(float d);
|
||||
|
||||
// brings heading back into EQ angles range
|
||||
float FixHeading(float in);
|
||||
|
||||
uint32 SwapBits21and22(uint32 mask);
|
||||
uint32 Catch22(uint32 mask);
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ void EQ::Net::DaybreakConnectionManager::ProcessResend()
|
||||
{
|
||||
auto iter = m_connections.begin();
|
||||
while (iter != m_connections.end()) {
|
||||
auto connection = iter->second;
|
||||
auto &connection = iter->second;
|
||||
auto status = connection->m_status;
|
||||
|
||||
switch (status)
|
||||
@@ -1397,4 +1397,4 @@ EQ::Net::SequenceOrder EQ::Net::DaybreakConnection::CompareSequence(uint16_t exp
|
||||
}
|
||||
|
||||
return SequencePast;
|
||||
}
|
||||
}
|
||||
|
||||
+60
-56
@@ -57,11 +57,11 @@ namespace RoF
|
||||
static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rofSlot);
|
||||
static inline uint32 RoFToServerCorpseSlot(uint32 rofCorpseSlot);
|
||||
|
||||
// server to client text link converter
|
||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink);
|
||||
// server to client say link converter
|
||||
static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink);
|
||||
|
||||
// client to server text link converter
|
||||
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink);
|
||||
// client to server say link converter
|
||||
static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink);
|
||||
|
||||
static inline CastingSlot ServerToRoFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot RoFToServerCastingSlot(CastingSlot slot);
|
||||
@@ -163,22 +163,23 @@ namespace RoF
|
||||
OUT(level);
|
||||
eq->unknown06 = 0;
|
||||
eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f;
|
||||
eq->bard_focus_id = emu->bard_focus_id;
|
||||
eq->knockback_angle = emu->sequence;
|
||||
eq->unknown22 = 0;
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(type);
|
||||
eq->damage = 0;
|
||||
eq->unknown31 = 0;
|
||||
OUT(spell);
|
||||
eq->level2 = eq->level;
|
||||
eq->effect_flag = emu->buff_unknown;
|
||||
eq->unknown39 = 14;
|
||||
eq->unknown43 = 0;
|
||||
eq->unknown44 = 17;
|
||||
eq->unknown45 = 0;
|
||||
eq->unknown46 = -1;
|
||||
eq->unknown50 = 0;
|
||||
eq->unknown54 = 0;
|
||||
OUT(spell_level);
|
||||
OUT(effect_flag);
|
||||
eq->spell_gem = 0;
|
||||
eq->slot.Type = INVALID_INDEX;
|
||||
eq->slot.Unknown02 = 0;
|
||||
eq->slot.Slot = INVALID_INDEX;
|
||||
eq->slot.SubIndex = INVALID_INDEX;
|
||||
eq->slot.AugIndex = INVALID_INDEX;
|
||||
eq->slot.Unknown01 = 0;
|
||||
eq->item_cast_type = 0;
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -460,7 +461,7 @@ namespace RoF
|
||||
{
|
||||
SETUP_VAR_ENCODE(BuffIcon_Struct);
|
||||
|
||||
uint32 sz = 12 + (17 * emu->count);
|
||||
uint32 sz = 12 + (17 * emu->count) + emu->name_lengths; // 17 includes nullterm
|
||||
__packet->size = sz;
|
||||
__packet->pBuffer = new unsigned char[sz];
|
||||
memset(__packet->pBuffer, 0, sz);
|
||||
@@ -476,7 +477,7 @@ namespace RoF
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||
__packet->WriteString("");
|
||||
__packet->WriteString(emu->entries[i].caster);
|
||||
}
|
||||
__packet->WriteUInt8(emu->type); // Unknown
|
||||
|
||||
@@ -520,7 +521,7 @@ namespace RoF
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToRoFTextLink(new_message, old_message);
|
||||
ServerToRoFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36;
|
||||
in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39;
|
||||
@@ -659,8 +660,8 @@ namespace RoF
|
||||
OUT(spellid);
|
||||
OUT(damage);
|
||||
OUT(force);
|
||||
OUT(meleepush_xy);
|
||||
OUT(meleepush_z);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(special);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -847,7 +848,7 @@ namespace RoF
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToRoFTextLink(new_message, old_message);
|
||||
ServerToRoFSayLink(new_message, old_message);
|
||||
|
||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||
// new_message = new_message.substr(0, 512);
|
||||
@@ -899,7 +900,7 @@ namespace RoF
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
if (old_message_array[i].length() == 0) { break; }
|
||||
ServerToRoFTextLink(new_message_array[i], old_message_array[i]);
|
||||
ServerToRoFSayLink(new_message_array[i], old_message_array[i]);
|
||||
new_message_size += new_message_array[i].length() + 1;
|
||||
}
|
||||
|
||||
@@ -2184,11 +2185,11 @@ namespace RoF
|
||||
outapp->WriteUInt32(emu->skills[r]);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(25); // Unknown count
|
||||
outapp->WriteUInt32(structs::MAX_PP_INNATE_SKILL); // Innate Skills count
|
||||
|
||||
for (uint32 r = 0; r < 25; r++)
|
||||
for (uint32 r = 0; r < structs::MAX_PP_INNATE_SKILL; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(emu->InnateSkills[r]); // Innate Skills (regen, slam, etc)
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_DISCIPLINES); // Discipline count
|
||||
@@ -3295,7 +3296,7 @@ namespace RoF
|
||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||
std::string new_message;
|
||||
|
||||
ServerToRoFTextLink(new_message, old_message);
|
||||
ServerToRoFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||
@@ -3369,7 +3370,7 @@ namespace RoF
|
||||
|
||||
std::string old_message = InBuffer; // start 'Reward' as string
|
||||
std::string new_message;
|
||||
ServerToRoFTextLink(new_message, old_message);
|
||||
ServerToRoFSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
||||
@@ -3847,9 +3848,12 @@ namespace RoF
|
||||
OUT(y);
|
||||
OUT(x);
|
||||
OUT(z)
|
||||
OUT(zone_reason);
|
||||
OUT(zone_reason);
|
||||
OUT(success);
|
||||
|
||||
if (eq->success < 0)
|
||||
eq->success -= 1;
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
@@ -4352,7 +4356,7 @@ namespace RoF
|
||||
|
||||
std::string old_message = InBuffer;
|
||||
std::string new_message;
|
||||
RoFToServerTextLink(new_message, old_message);
|
||||
RoFToServerSayLink(new_message, old_message);
|
||||
|
||||
//__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1;
|
||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
@@ -4463,7 +4467,7 @@ namespace RoF
|
||||
IN(type);
|
||||
IN(spellid);
|
||||
IN(damage);
|
||||
IN(meleepush_xy);
|
||||
IN(hit_heading);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
@@ -4486,7 +4490,7 @@ namespace RoF
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||
std::string new_message;
|
||||
RoFToServerTextLink(new_message, old_message);
|
||||
RoFToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(Emote_Struct);
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -5913,19 +5917,19 @@ namespace RoF
|
||||
return (rofCorpseSlot - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToRoFTextLink(std::string& rofTextLink, const std::string& serverTextLink)
|
||||
static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rofTextLink = serverTextLink;
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
rofSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverTextLink, '\x12');
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
rofTextLink.append(segments[segment_iter]);
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
rofSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -5935,36 +5939,36 @@ namespace RoF
|
||||
// RoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (55)
|
||||
// Diff: ^
|
||||
|
||||
rofTextLink.push_back('\x12');
|
||||
rofTextLink.append(segments[segment_iter].substr(0, 41));
|
||||
rofSayLink.push_back('\x12');
|
||||
rofSayLink.append(segments[segment_iter].substr(0, 41));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
rofTextLink.push_back(segments[segment_iter][42]);
|
||||
rofSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
rofTextLink.push_back('F');
|
||||
rofSayLink.push_back('F');
|
||||
|
||||
rofTextLink.append(segments[segment_iter].substr(43));
|
||||
rofTextLink.push_back('\x12');
|
||||
rofSayLink.append(segments[segment_iter].substr(43));
|
||||
rofSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
rofTextLink.append(segments[segment_iter]);
|
||||
rofSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RoFToServerTextLink(std::string& serverTextLink, const std::string& rofTextLink)
|
||||
static inline void RoFToServerSayLink(std::string& serverSayLink, const std::string& rofSayLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (rofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rofTextLink;
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rofSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = rofSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(rofTextLink, '\x12');
|
||||
auto segments = SplitString(rofSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -5974,14 +5978,14 @@ namespace RoF
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^
|
||||
|
||||
serverTextLink.push_back('\x12');
|
||||
serverTextLink.append(segments[segment_iter].substr(0, 41));
|
||||
serverTextLink.push_back('0');
|
||||
serverTextLink.append(segments[segment_iter].substr(41));
|
||||
serverTextLink.push_back('\x12');
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 41));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.append(segments[segment_iter].substr(41));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+55
-51
@@ -57,11 +57,11 @@ namespace RoF2
|
||||
static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2Slot);
|
||||
static inline uint32 RoF2ToServerCorpseSlot(uint32 rof2CorpseSlot);
|
||||
|
||||
// server to client text link converter
|
||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink);
|
||||
// server to client say link converter
|
||||
static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink);
|
||||
|
||||
// client to server text link converter
|
||||
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink);
|
||||
// client to server say link converter
|
||||
static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink);
|
||||
|
||||
static inline CastingSlot ServerToRoF2CastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot RoF2ToServerCastingSlot(CastingSlot slot);
|
||||
@@ -232,22 +232,23 @@ namespace RoF2
|
||||
OUT(level);
|
||||
eq->unknown06 = 0;
|
||||
eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f;
|
||||
eq->bard_focus_id = emu->bard_focus_id;
|
||||
eq->knockback_angle = emu->sequence;
|
||||
eq->unknown22 = 0;
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(type);
|
||||
eq->damage = 0;
|
||||
eq->unknown31 = 0;
|
||||
OUT(spell);
|
||||
eq->level2 = eq->level;
|
||||
eq->effect_flag = emu->buff_unknown;
|
||||
eq->unknown39 = 14;
|
||||
eq->unknown43 = 0;
|
||||
eq->unknown44 = 17;
|
||||
eq->unknown45 = 0;
|
||||
eq->unknown46 = -1;
|
||||
eq->unknown50 = 0;
|
||||
eq->unknown54 = 0;
|
||||
OUT(spell_level);
|
||||
OUT(effect_flag);
|
||||
eq->spell_gem = 0;
|
||||
eq->slot.Type = INVALID_INDEX;
|
||||
eq->slot.Unknown02 = 0;
|
||||
eq->slot.Slot = INVALID_INDEX;
|
||||
eq->slot.SubIndex = INVALID_INDEX;
|
||||
eq->slot.AugIndex = INVALID_INDEX;
|
||||
eq->slot.Unknown01 = 0;
|
||||
eq->item_cast_type = 0;
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -528,7 +529,7 @@ namespace RoF2
|
||||
{
|
||||
SETUP_VAR_ENCODE(BuffIcon_Struct);
|
||||
|
||||
uint32 sz = 12 + (17 * emu->count);
|
||||
uint32 sz = 12 + (17 * emu->count) + emu->name_lengths; // 17 includes nullterm
|
||||
__packet->size = sz;
|
||||
__packet->pBuffer = new unsigned char[sz];
|
||||
memset(__packet->pBuffer, 0, sz);
|
||||
@@ -544,7 +545,7 @@ namespace RoF2
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits); // Unknown
|
||||
__packet->WriteString("");
|
||||
__packet->WriteString(emu->entries[i].caster);
|
||||
}
|
||||
__packet->WriteUInt8(emu->type); // Unknown
|
||||
|
||||
@@ -588,7 +589,7 @@ namespace RoF2
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToRoF2TextLink(new_message, old_message);
|
||||
ServerToRoF2SayLink(new_message, old_message);
|
||||
|
||||
//in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36;
|
||||
in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39;
|
||||
@@ -727,8 +728,8 @@ namespace RoF2
|
||||
OUT(spellid);
|
||||
OUT(damage);
|
||||
OUT(force);
|
||||
OUT(meleepush_xy);
|
||||
OUT(meleepush_z);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(special);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -915,7 +916,7 @@ namespace RoF2
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToRoF2TextLink(new_message, old_message);
|
||||
ServerToRoF2SayLink(new_message, old_message);
|
||||
|
||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||
// new_message = new_message.substr(0, 512);
|
||||
@@ -967,7 +968,7 @@ namespace RoF2
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
if (old_message_array[i].length() == 0) { break; }
|
||||
ServerToRoF2TextLink(new_message_array[i], old_message_array[i]);
|
||||
ServerToRoF2SayLink(new_message_array[i], old_message_array[i]);
|
||||
new_message_size += new_message_array[i].length() + 1;
|
||||
}
|
||||
|
||||
@@ -2261,11 +2262,11 @@ namespace RoF2
|
||||
outapp->WriteUInt32(emu->skills[r]);
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(25); // Unknown count
|
||||
outapp->WriteUInt32(structs::MAX_PP_INNATE_SKILL); // Innate Skills count
|
||||
|
||||
for (uint32 r = 0; r < 25; r++)
|
||||
for (uint32 r = 0; r < structs::MAX_PP_INNATE_SKILL; r++)
|
||||
{
|
||||
outapp->WriteUInt32(0); // Unknown
|
||||
outapp->WriteUInt32(emu->InnateSkills[r]); // Innate Skills (regen, slam, etc)
|
||||
}
|
||||
|
||||
outapp->WriteUInt32(structs::MAX_PP_DISCIPLINES); // Discipline count
|
||||
@@ -3364,7 +3365,7 @@ namespace RoF2
|
||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||
std::string new_message;
|
||||
|
||||
ServerToRoF2TextLink(new_message, old_message);
|
||||
ServerToRoF2SayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||
@@ -3438,7 +3439,7 @@ namespace RoF2
|
||||
|
||||
std::string old_message = InBuffer; // start 'Reward' as string
|
||||
std::string new_message;
|
||||
ServerToRoF2TextLink(new_message, old_message);
|
||||
ServerToRoF2SayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
||||
@@ -3991,9 +3992,12 @@ namespace RoF2
|
||||
OUT(y);
|
||||
OUT(x);
|
||||
OUT(z)
|
||||
OUT(zone_reason);
|
||||
OUT(zone_reason);
|
||||
OUT(success);
|
||||
|
||||
if (eq->success < 0)
|
||||
eq->success -= 1;
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
@@ -4592,7 +4596,7 @@ namespace RoF2
|
||||
|
||||
std::string old_message = InBuffer;
|
||||
std::string new_message;
|
||||
RoF2ToServerTextLink(new_message, old_message);
|
||||
RoF2ToServerSayLink(new_message, old_message);
|
||||
|
||||
//__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1;
|
||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
@@ -4703,7 +4707,7 @@ namespace RoF2
|
||||
IN(type);
|
||||
IN(spellid);
|
||||
IN(damage);
|
||||
IN(meleepush_xy);
|
||||
IN(hit_heading);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
@@ -4726,7 +4730,7 @@ namespace RoF2
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||
std::string new_message;
|
||||
RoF2ToServerTextLink(new_message, old_message);
|
||||
RoF2ToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(Emote_Struct);
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -6230,19 +6234,19 @@ namespace RoF2
|
||||
return (rof2CorpseSlot + EQEmu::legacy::CORPSE_BEGIN - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToRoF2TextLink(std::string& rof2TextLink, const std::string& serverTextLink)
|
||||
static inline void ServerToRoF2SayLink(std::string& rof2SayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
rof2TextLink = serverTextLink;
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
rof2SayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverTextLink, '\x12');
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
rof2TextLink.append(segments[segment_iter]);
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
rof2SayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -6252,29 +6256,29 @@ namespace RoF2
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff:
|
||||
|
||||
rof2TextLink.push_back('\x12');
|
||||
rof2TextLink.append(segments[segment_iter]);
|
||||
rof2TextLink.push_back('\x12');
|
||||
rof2SayLink.push_back('\x12');
|
||||
rof2SayLink.append(segments[segment_iter]);
|
||||
rof2SayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
rof2TextLink.append(segments[segment_iter]);
|
||||
rof2SayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void RoF2ToServerTextLink(std::string& serverTextLink, const std::string& rof2TextLink)
|
||||
static inline void RoF2ToServerSayLink(std::string& serverSayLink, const std::string& rof2SayLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (rof2TextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = rof2TextLink;
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (rof2SayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = rof2SayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(rof2TextLink, '\x12');
|
||||
auto segments = SplitString(rof2SayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -6284,12 +6288,12 @@ namespace RoF2
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff:
|
||||
|
||||
serverTextLink.push_back('\x12');
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverTextLink.push_back('\x12');
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace RoF2
|
||||
ItemPacket11 = 111,
|
||||
ItemPacket12 = 112,
|
||||
ItemPacketRecovery = 113,
|
||||
ItemPacket14 = 115
|
||||
ItemPacket14 = 115 // Parcel? adds to merchant window too
|
||||
};
|
||||
|
||||
} /*item*/
|
||||
|
||||
@@ -131,6 +131,7 @@ static const uint32 MAX_PP_LANGUAGE = 32; // was 25
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
|
||||
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300;
|
||||
static const uint32 MAX_PP_DISCIPLINES = 300; // was 200
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
@@ -399,7 +400,7 @@ struct Spawn_Struct_Position
|
||||
|
||||
struct Spawn_Struct_Position
|
||||
{
|
||||
signed padding0000:12;
|
||||
signed angle:12; // pitch of camera?
|
||||
signed y:19;
|
||||
signed padding0001:1;
|
||||
|
||||
@@ -415,7 +416,7 @@ struct Spawn_Struct_Position
|
||||
signed z:19;
|
||||
signed padding0020:3;
|
||||
|
||||
signed animation:10; // animation
|
||||
signed animation:10; // SpeedRun
|
||||
signed deltaY:13;
|
||||
signed padding0023:9;
|
||||
};
|
||||
@@ -429,7 +430,7 @@ struct Spawn_Struct
|
||||
/*0000*/ //uint8 nullterm1; // hack to null terminate name
|
||||
/*0064*/ uint32 spawnId;
|
||||
/*0068*/ uint8 level;
|
||||
/*0069*/ float unknown1;
|
||||
/*0069*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||
Spawn_Struct_Bitfields Bitfields;
|
||||
/*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable
|
||||
@@ -1155,8 +1156,8 @@ union
|
||||
/*01012*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [300] 3600 bytes - AAs 12 bytes each
|
||||
/*04612*/ uint32 skill_count; // Seen 100
|
||||
/*04616*/ uint32 skills[MAX_PP_SKILL]; // [100] 400 bytes - List of skills
|
||||
/*05016*/ uint32 unknown15_count; // Seen 25
|
||||
/*05020*/ uint32 unknown_rof15[25]; // Most are 255 or 0
|
||||
/*05016*/ uint32 InnateSkills_count; // Seen 25
|
||||
/*05020*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL]; // Most are 255 or 0
|
||||
/*05120*/ uint32 discipline_count; // Seen 200
|
||||
/*05124*/ Disciplines_Struct disciplines; // [200] 800 bytes Known disciplines
|
||||
/*05924*/ uint32 timestamp_count; // Seen 20
|
||||
@@ -1461,17 +1462,17 @@ struct Action_Struct
|
||||
{
|
||||
/*00*/ uint16 target; // id of target
|
||||
/*02*/ uint16 source; // id of caster
|
||||
/*04*/ uint16 level; // level of caster - Seen 0
|
||||
/*06*/ uint32 unknown06;
|
||||
/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
|
||||
/*10*/ float instrument_mod;
|
||||
/*14*/ uint32 bard_focus_id; // seen 0
|
||||
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again
|
||||
/*22*/ uint32 unknown22;
|
||||
/*26*/ uint8 type;
|
||||
/*27*/ uint32 damage;
|
||||
/*31*/ uint16 unknown31;
|
||||
/*14*/ float force;
|
||||
/*18*/ float hit_heading;
|
||||
/*22*/ float hit_pitch;
|
||||
/*26*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*27*/ uint32 damage; // OSX says min_damage
|
||||
/*31*/ uint16 unknown31; // OSX says tohit
|
||||
/*33*/ uint32 spell; // spell id being cast
|
||||
/*37*/ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
|
||||
/*39*/
|
||||
};
|
||||
@@ -1483,25 +1484,21 @@ struct ActionAlt_Struct
|
||||
{
|
||||
/*00*/ uint16 target; // id of target
|
||||
/*02*/ uint16 source; // id of caster
|
||||
/*04*/ uint16 level; // level of caster - Seen 0
|
||||
/*06*/ uint32 unknown06;
|
||||
/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
|
||||
/*10*/ float instrument_mod;
|
||||
/*14*/ uint32 bard_focus_id; // seen 0
|
||||
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again
|
||||
/*22*/ uint32 unknown22;
|
||||
/*26*/ uint8 type;
|
||||
/*27*/ uint32 damage;
|
||||
/*31*/ uint16 unknown31;
|
||||
/*14*/ float force;
|
||||
/*18*/ float hit_heading;
|
||||
/*22*/ float hit_pitch;
|
||||
/*26*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*27*/ uint32 damage; // OSX says min_damage
|
||||
/*31*/ uint16 unknown31; // OSX says tohit
|
||||
/*33*/ uint32 spell; // spell id being cast
|
||||
/*37*/ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
|
||||
/*39*/ uint32 unknown39; // New field to Underfoot - Seen 14
|
||||
/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0
|
||||
/*44*/ uint8 unknown44; // New field to Underfoot - Seen 17
|
||||
/*45*/ uint8 unknown45; // New field to Underfoot - Seen 0
|
||||
/*46*/ int32 unknown46; // New field to Underfoot - Seen -1
|
||||
/*50*/ uint32 unknown50; // New field to Underfoot - Seen 0
|
||||
/*54*/ uint16 unknown54; // New field to Underfoot - Seen 0
|
||||
/*39*/ uint8 spell_gem;
|
||||
/*40*/ InventorySlot_Struct slot;
|
||||
/*52*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
|
||||
/*56*/
|
||||
};
|
||||
|
||||
@@ -1516,9 +1513,9 @@ struct CombatDamage_Struct
|
||||
/* 05 */ uint32 spellid;
|
||||
/* 09 */ int32 damage;
|
||||
/* 13 */ float force; // cd cc cc 3d
|
||||
/* 17 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 21 */ float meleepush_z;
|
||||
/* 25 */ uint8 unknown25; // was [9]
|
||||
/* 17 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 21 */ float hit_pitch;
|
||||
/* 25 */ uint8 secondary; // 0 for primary hand, 1 for secondary
|
||||
/* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||
/* 30 */
|
||||
};
|
||||
@@ -1826,6 +1823,20 @@ struct MoveItem_Struct
|
||||
/*0028*/
|
||||
};
|
||||
|
||||
struct MultiMoveItemSub_Struct
|
||||
{
|
||||
/*0000*/ InventorySlot_Struct from_slot;
|
||||
/*0012*/ InventorySlot_Struct to_slot;
|
||||
/*0024*/ uint32 number_in_stack;
|
||||
/*0028*/ uint8 unknown[8];
|
||||
};
|
||||
|
||||
struct MultiMoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 count;
|
||||
/*0004*/ MultiMoveItemSub_Struct moves[0];
|
||||
};
|
||||
|
||||
//
|
||||
// from_slot/to_slot
|
||||
// -1 - destroy
|
||||
@@ -3590,21 +3601,6 @@ struct GuildSetRank_Struct
|
||||
/*80*/
|
||||
};
|
||||
|
||||
struct BugStruct{
|
||||
/*0000*/ char chartype[64];
|
||||
/*0064*/ char name[96];
|
||||
/*0160*/ char ui[128];
|
||||
/*0288*/ float x;
|
||||
/*0292*/ float y;
|
||||
/*0296*/ float z;
|
||||
/*0300*/ float heading;
|
||||
/*0304*/ uint32 unknown304;
|
||||
/*0308*/ uint32 type;
|
||||
/*0312*/ char unknown312[2144];
|
||||
/*2456*/ char bug[1024];
|
||||
/*3480*/ char placeholder[2];
|
||||
/*3482*/ char system_info[4098];
|
||||
};
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -3631,20 +3627,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -5088,6 +5085,23 @@ struct CrystalCountUpdate_Struct
|
||||
/*012*/ uint32 CareerEbonCrystals;
|
||||
};
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char Augment6[5];
|
||||
/*036*/ char IsEvolving[1];
|
||||
/*037*/ char EvolveGroup[4];
|
||||
/*041*/ char EvolveLevel[2];
|
||||
/*043*/ char OrnamentIcon[5];
|
||||
/*048*/ char Hash[8];
|
||||
/*056*/
|
||||
};
|
||||
|
||||
}; /*structs*/
|
||||
|
||||
}; /*RoF2*/
|
||||
|
||||
@@ -131,6 +131,7 @@ static const uint32 MAX_PP_LANGUAGE = 32; // was 25
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // was 480
|
||||
static const uint32 MAX_PP_MEMSPELL = 16; // was 12
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300;
|
||||
static const uint32 MAX_PP_DISCIPLINES = 200; // was 100
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
@@ -407,7 +408,7 @@ struct Spawn_Struct
|
||||
/*0000*/ //uint8 nullterm1; // hack to null terminate name
|
||||
/*0064*/ uint32 spawnId;
|
||||
/*0068*/ uint8 level;
|
||||
/*0069*/ float unknown1;
|
||||
/*0069*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||
Spawn_Struct_Bitfields Bitfields;
|
||||
/*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable
|
||||
@@ -1096,8 +1097,8 @@ union
|
||||
/*01012*/ AA_Array aa_array[MAX_PP_AA_ARRAY]; // [300] 3600 bytes - AAs 12 bytes each
|
||||
/*04612*/ uint32 skill_count; // Seen 100
|
||||
/*04616*/ uint32 skills[MAX_PP_SKILL]; // [100] 400 bytes - List of skills
|
||||
/*05016*/ uint32 unknown15_count; // Seen 25
|
||||
/*05020*/ uint32 unknown_rof15[25]; // Most are 255 or 0
|
||||
/*05016*/ uint32 InnateSkills_count; // Seen 25
|
||||
/*05020*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL]; // Most are 255 or 0
|
||||
/*05120*/ uint32 discipline_count; // Seen 200
|
||||
/*05124*/ Disciplines_Struct disciplines; // [200] 800 bytes Known disciplines
|
||||
/*05924*/ uint32 timestamp_count; // Seen 20
|
||||
@@ -1449,17 +1450,17 @@ struct Action_Struct
|
||||
{
|
||||
/*00*/ uint16 target; // id of target
|
||||
/*02*/ uint16 source; // id of caster
|
||||
/*04*/ uint16 level; // level of caster - Seen 0
|
||||
/*06*/ uint32 unknown06;
|
||||
/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
|
||||
/*10*/ float instrument_mod;
|
||||
/*14*/ uint32 bard_focus_id; // seen 0
|
||||
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again
|
||||
/*22*/ uint32 unknown22;
|
||||
/*26*/ uint8 type;
|
||||
/*27*/ uint32 damage;
|
||||
/*31*/ uint16 unknown31;
|
||||
/*14*/ float force;
|
||||
/*18*/ float hit_heading;
|
||||
/*22*/ float hit_pitch;
|
||||
/*26*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*27*/ uint32 damage; // OSX says min_damage
|
||||
/*31*/ uint16 unknown31; // OSX says tohit
|
||||
/*33*/ uint32 spell; // spell id being cast
|
||||
/*37*/ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
|
||||
/*39*/
|
||||
};
|
||||
@@ -1471,25 +1472,21 @@ struct ActionAlt_Struct
|
||||
{
|
||||
/*00*/ uint16 target; // id of target
|
||||
/*02*/ uint16 source; // id of caster
|
||||
/*04*/ uint16 level; // level of caster - Seen 0
|
||||
/*06*/ uint32 unknown06;
|
||||
/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
|
||||
/*10*/ float instrument_mod;
|
||||
/*14*/ uint32 bard_focus_id; // seen 0
|
||||
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again
|
||||
/*22*/ uint32 unknown22;
|
||||
/*26*/ uint8 type;
|
||||
/*27*/ uint32 damage;
|
||||
/*31*/ uint16 unknown31;
|
||||
/*14*/ float force;
|
||||
/*18*/ float hit_heading;
|
||||
/*22*/ float hit_pitch;
|
||||
/*26*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*27*/ uint32 damage; // OSX says min_damage
|
||||
/*31*/ uint16 unknown31; // OSX says tohit
|
||||
/*33*/ uint32 spell; // spell id being cast
|
||||
/*37*/ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/*37*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
/*38*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
|
||||
/*39*/ uint32 unknown39; // New field to Underfoot - Seen 14
|
||||
/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0
|
||||
/*44*/ uint8 unknown44; // New field to Underfoot - Seen 17
|
||||
/*45*/ uint8 unknown45; // New field to Underfoot - Seen 0
|
||||
/*46*/ int32 unknown46; // New field to Underfoot - Seen -1
|
||||
/*50*/ uint32 unknown50; // New field to Underfoot - Seen 0
|
||||
/*54*/ uint16 unknown54; // New field to Underfoot - Seen 0
|
||||
/*39*/ uint8 spell_gem;
|
||||
/*40*/ InventorySlot_Struct slot;
|
||||
/*52*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
|
||||
/*56*/
|
||||
};
|
||||
|
||||
@@ -1504,9 +1501,9 @@ struct CombatDamage_Struct
|
||||
/* 05 */ uint32 spellid;
|
||||
/* 09 */ int32 damage;
|
||||
/* 13 */ float force; // cd cc cc 3d
|
||||
/* 17 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 21 */ float meleepush_z;
|
||||
/* 25 */ uint8 unknown25; // was [9]
|
||||
/* 17 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 21 */ float hit_pitch;
|
||||
/* 25 */ uint8 secondary; // 0 for primary hand, 1 for secondary
|
||||
/* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||
/* 30 */
|
||||
};
|
||||
@@ -3544,21 +3541,6 @@ struct GuildSetRank_Struct
|
||||
/*80*/
|
||||
};
|
||||
|
||||
struct BugStruct{
|
||||
/*0000*/ char chartype[64];
|
||||
/*0064*/ char name[96];
|
||||
/*0160*/ char ui[128];
|
||||
/*0288*/ float x;
|
||||
/*0292*/ float y;
|
||||
/*0296*/ float z;
|
||||
/*0300*/ float heading;
|
||||
/*0304*/ uint32 unknown304;
|
||||
/*0308*/ uint32 type;
|
||||
/*0312*/ char unknown312[2144];
|
||||
/*2456*/ char bug[1024];
|
||||
/*3480*/ char placeholder[2];
|
||||
/*3482*/ char system_info[4098];
|
||||
};
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -3585,20 +3567,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -5019,6 +5002,23 @@ struct MercenaryMerchantRequest_Struct {
|
||||
struct MercenaryMerchantResponse_Struct {
|
||||
/*0000*/ uint32 ResponseType;
|
||||
/*0004*/
|
||||
};
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char Augment6[5];
|
||||
/*036*/ char IsEvolving[1];
|
||||
/*037*/ char EvolveGroup[4];
|
||||
/*041*/ char EvolveLevel[1];
|
||||
/*042*/ char OrnamentIcon[5];
|
||||
/*047*/ char Hash[8];
|
||||
/*055*/
|
||||
};
|
||||
|
||||
}; /*structs*/
|
||||
|
||||
+46
-65
@@ -53,11 +53,11 @@ namespace SoD
|
||||
static inline uint32 SoDToServerSlot(uint32 sodSlot);
|
||||
static inline uint32 SoDToServerCorpseSlot(uint32 sodCorpseSlot);
|
||||
|
||||
// server to client text link converter
|
||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink);
|
||||
// server to client say link converter
|
||||
static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink);
|
||||
|
||||
// client to server text link converter
|
||||
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink);
|
||||
// client to server say link converter
|
||||
static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink);
|
||||
|
||||
static inline CastingSlot ServerToSoDCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot SoDToServerCastingSlot(CastingSlot slot);
|
||||
@@ -161,15 +161,14 @@ namespace SoD
|
||||
OUT(source);
|
||||
OUT(level);
|
||||
OUT(instrument_mod);
|
||||
eq->sequence = emu->sequence;
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(type);
|
||||
//OUT(damage);
|
||||
OUT(spell);
|
||||
eq->level2 = emu->level;
|
||||
OUT(buff_unknown); // if this is 4, a buff icon is made
|
||||
//eq->unknown0036 = -1;
|
||||
//eq->unknown0040 = -1;
|
||||
//eq->unknown0044 = -1;
|
||||
OUT(spell_level);
|
||||
OUT(effect_flag); // if this is 4, a buff icon is made
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -346,7 +345,7 @@ namespace SoD
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToSoDTextLink(new_message, old_message);
|
||||
ServerToSoDSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
|
||||
@@ -458,8 +457,8 @@ namespace SoD
|
||||
OUT(spellid);
|
||||
OUT(damage);
|
||||
OUT(force);
|
||||
OUT(meleepush_xy);
|
||||
OUT(meleepush_z);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(special);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -625,7 +624,7 @@ namespace SoD
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToSoDTextLink(new_message, old_message);
|
||||
ServerToSoDSayLink(new_message, old_message);
|
||||
|
||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||
// new_message = new_message.substr(0, 512);
|
||||
@@ -677,7 +676,7 @@ namespace SoD
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
if (old_message_array[i].length() == 0) { break; }
|
||||
ServerToSoDTextLink(new_message_array[i], old_message_array[i]);
|
||||
ServerToSoDSayLink(new_message_array[i], old_message_array[i]);
|
||||
new_message_size += new_message_array[i].length() + 1;
|
||||
}
|
||||
|
||||
@@ -1605,6 +1604,7 @@ namespace SoD
|
||||
OUT(copper_cursor);
|
||||
|
||||
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
|
||||
OUT_array(InnateSkills, structs::MAX_PP_INNATE_SKILL); // 1:1 direct copy (25 dword)
|
||||
|
||||
// OUT(unknown04760[236]);
|
||||
OUT(toxicity);
|
||||
@@ -2155,7 +2155,7 @@ namespace SoD
|
||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||
std::string new_message;
|
||||
|
||||
ServerToSoDTextLink(new_message, old_message);
|
||||
ServerToSoDSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||
@@ -2251,7 +2251,7 @@ namespace SoD
|
||||
|
||||
std::string old_message = InBuffer; // start 'Reward' as string
|
||||
std::string new_message;
|
||||
ServerToSoDTextLink(new_message, old_message);
|
||||
ServerToSoDSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
||||
@@ -2932,25 +2932,6 @@ namespace SoD
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_Bug)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::BugStruct);
|
||||
SETUP_DIRECT_DECODE(BugStruct, structs::BugStruct);
|
||||
|
||||
strn0cpy(emu->chartype, eq->chartype, sizeof(emu->chartype));
|
||||
strn0cpy(emu->name, eq->name, sizeof(emu->name));
|
||||
strn0cpy(emu->ui, eq->ui, sizeof(emu->ui));
|
||||
IN(x);
|
||||
IN(y);
|
||||
IN(z);
|
||||
IN(heading);
|
||||
strn0cpy(emu->target_name, eq->target_name, sizeof(emu->target_name));
|
||||
strn0cpy(emu->bug, eq->bug, sizeof(emu->bug));
|
||||
strn0cpy(emu->system_info, eq->system_info, sizeof(emu->system_info));
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_CastSpell)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
@@ -2971,7 +2952,7 @@ namespace SoD
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[sizeof(ChannelMessage_Struct)];
|
||||
std::string new_message;
|
||||
SoDToServerTextLink(new_message, old_message);
|
||||
SoDToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -3085,7 +3066,7 @@ namespace SoD
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||
std::string new_message;
|
||||
SoDToServerTextLink(new_message, old_message);
|
||||
SoDToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(Emote_Struct);
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -3935,19 +3916,19 @@ namespace SoD
|
||||
return (sodCorpseSlot - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToSoDTextLink(std::string& sodTextLink, const std::string& serverTextLink)
|
||||
static inline void ServerToSoDSayLink(std::string& sodSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sodTextLink = serverTextLink;
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
sodSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverTextLink, '\x12');
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
sodTextLink.append(segments[segment_iter]);
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
sodSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -3957,37 +3938,37 @@ namespace SoD
|
||||
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
sodTextLink.push_back('\x12');
|
||||
sodTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
sodTextLink.append(segments[segment_iter].substr(36, 5));
|
||||
sodSayLink.push_back('\x12');
|
||||
sodSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
sodSayLink.append(segments[segment_iter].substr(36, 5));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
sodTextLink.push_back(segments[segment_iter][42]);
|
||||
sodSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
sodTextLink.push_back('F');
|
||||
sodSayLink.push_back('F');
|
||||
|
||||
sodTextLink.append(segments[segment_iter].substr(43));
|
||||
sodTextLink.push_back('\x12');
|
||||
sodSayLink.append(segments[segment_iter].substr(43));
|
||||
sodSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
sodTextLink.append(segments[segment_iter]);
|
||||
sodSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void SoDToServerTextLink(std::string& serverTextLink, const std::string& sodTextLink)
|
||||
static inline void SoDToServerSayLink(std::string& serverSayLink, const std::string& sodSayLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sodTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sodTextLink;
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sodSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = sodSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(sodTextLink, '\x12');
|
||||
auto segments = SplitString(sodSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -3997,16 +3978,16 @@ namespace SoD
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
serverTextLink.push_back('\x12');
|
||||
serverTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverTextLink.append("00000");
|
||||
serverTextLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverTextLink.push_back('0');
|
||||
serverTextLink.append(segments[segment_iter].substr(36));
|
||||
serverTextLink.push_back('\x12');
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.append(segments[segment_iter].substr(36));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,6 @@ D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_BazaarSearch)
|
||||
D(OP_Buff)
|
||||
D(OP_Bug)
|
||||
D(OP_CastSpell)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_CharacterCreate)
|
||||
|
||||
@@ -292,7 +292,7 @@ struct Spawn_Struct
|
||||
/*0000*/ //uint8 nullterm1; // hack to null terminate name
|
||||
/*0064*/ uint32 spawnId;
|
||||
/*0068*/ uint8 level;
|
||||
/*0069*/ float unknown1;
|
||||
/*0069*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||
Spawn_Struct_Bitfields Bitfields;
|
||||
/*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable
|
||||
@@ -818,6 +818,7 @@ static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -923,7 +924,8 @@ struct PlayerProfile_Struct
|
||||
/*06488*/ uint32 silver_cursor; // Silver Pieces on cursor
|
||||
/*06492*/ uint32 copper_cursor; // Copper Pieces on cursor
|
||||
/*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
|
||||
/*06896*/ uint8 unknown04760[136];
|
||||
/*06896*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL];
|
||||
/*06996*/ uint8 unknown04760[36];
|
||||
/*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
|
||||
/*07036*/ uint32 thirst_level; // Drink (ticks till next drink)
|
||||
/*07040*/ uint32 hunger_level; // Food (ticks till next eat)
|
||||
@@ -1213,20 +1215,18 @@ struct Action_Struct
|
||||
{
|
||||
/* 00 */ uint16 target; // id of target
|
||||
/* 02 */ uint16 source; // id of caster
|
||||
/* 04 */ uint16 level; // level of caster
|
||||
/* 06 */ uint16 instrument_mod; // seems to be fixed to 0x0A
|
||||
/* 08 */ uint32 unknown08;
|
||||
/* 12 */ uint16 unknown16;
|
||||
// some kind of sequence that's the same in both actions
|
||||
// as well as the combat damage, to tie em together?
|
||||
/* 14 */ float sequence; // was uint32
|
||||
/* 18 */ uint32 unknown18;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells
|
||||
/* 23 */ uint32 unknown23;
|
||||
/* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
|
||||
/* 10 */ float force;
|
||||
/* 14 */ float hit_heading;
|
||||
/* 18 */ float hit_pitch;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/* 23 */ uint16 unknown23; // OSX says min_damage
|
||||
/* 25 */ uint16 unknown25; // OSX says tohit
|
||||
/* 27 */ uint16 spell; // spell id being cast
|
||||
/* 29 */ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/* 29 */ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
// this field seems to be some sort of success flag, if it's 4
|
||||
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made
|
||||
/* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
@@ -1235,26 +1235,23 @@ struct Action_Struct
|
||||
// has to do with buff blocking??
|
||||
struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes
|
||||
{
|
||||
/*0000*/ uint16 target; // Target ID
|
||||
/*0002*/ uint16 source; // SourceID
|
||||
/*0004*/ uint16 level; // level of caster
|
||||
/*0006*/ uint16 instrument_mod; // seems to be fixed to 0x0A
|
||||
/*0008*/ uint32 unknown08;
|
||||
/*0012*/ uint16 unknown16;
|
||||
/*0014*/ uint32 sequence;
|
||||
/*0018*/ uint32 unknown18;
|
||||
/*0022*/ uint8 type; // Casts, Falls, Bashes, etc...
|
||||
/*0023*/ uint32 damage; // Amount of Damage
|
||||
/*0027*/ uint16 spell; // SpellID
|
||||
/*0029*/ uint8 unknown29;
|
||||
/*0030*/ uint8 buff_unknown; // if this is 4, a buff icon is made
|
||||
/*0031*/ uint32 unknown0031; // seen 00 00 00 00
|
||||
/*0035*/ uint8 unknown0035; // seen 00
|
||||
/*0036*/ uint32 unknown0036; // seen ff ff ff ff
|
||||
/*0040*/ uint32 unknown0040; // seen ff ff ff ff
|
||||
/*0044*/ uint32 unknown0044; // seen ff ff ff ff
|
||||
/*0048*/ uint32 unknown0048; // seen 00 00 00 00
|
||||
/*0052*/ uint32 unknown0052; // seen 00 00 00 00
|
||||
/*0000*/ uint16 target; // id of target
|
||||
/*0002*/ uint16 source; // id of caster
|
||||
/*0004*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*0006*/ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
|
||||
/*0010*/ float force;
|
||||
/*0014*/ float hit_heading;
|
||||
/*0018*/ float hit_pitch;
|
||||
/*0022*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*0023*/ uint16 unknown23; // OSX says min_damage
|
||||
/*0025*/ uint16 unknown25; // OSX says tohit
|
||||
/*0027*/ uint16 spell; // spell id being cast
|
||||
/*0029*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
// this field seems to be some sort of success flag, if it's 4
|
||||
/*0030*/ uint8 effect_flag; // if this is 4, a buff icon is made
|
||||
/*0031*/ uint8 spell_slot;
|
||||
/*0032*/ uint32 slot[5];
|
||||
/*0052*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
|
||||
/*0056*/
|
||||
};
|
||||
|
||||
@@ -1269,9 +1266,9 @@ struct CombatDamage_Struct
|
||||
/* 05 */ uint16 spellid;
|
||||
/* 07 */ int32 damage;
|
||||
/* 11 */ float force; // cd cc cc 3d
|
||||
/* 15 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 19 */ float meleepush_z;
|
||||
/* 23 */ uint8 unknown23; // was [9]
|
||||
/* 15 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 19 */ float hit_pitch;
|
||||
/* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary
|
||||
/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||
/* 28 */
|
||||
};
|
||||
@@ -3006,24 +3003,6 @@ struct GuildMakeLeader{
|
||||
char target[64];
|
||||
};
|
||||
|
||||
struct BugStruct{
|
||||
/*0000*/ uint32 type1; //seems to be just a different way of seeing type; seems to be ordered completely differently
|
||||
/*0004*/ char chartype[64];
|
||||
/*0068*/ char name[96];
|
||||
/*0164*/ char ui[128];
|
||||
/*0292*/ float x;
|
||||
/*0296*/ float y;
|
||||
/*0300*/ float z;
|
||||
/*0304*/ float heading;
|
||||
/*0308*/ uint32 unknown304;
|
||||
/*0312*/ char unknown308[160];
|
||||
/*0472*/ char target_name[64];
|
||||
/*0536*/ uint32 type;
|
||||
/*0540*/ char unknown536[2052];
|
||||
/*2588*/ char bug[2048];
|
||||
/*4636*/ char unknown4632[6];
|
||||
/*4642*/ char system_info[4094];
|
||||
};
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -3050,20 +3029,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -4400,6 +4380,22 @@ struct MercenaryAssign_Struct {
|
||||
/*0004*/ uint32 MercUnk01; //
|
||||
/*0008*/ uint32 MercUnk02; //
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char IsEvolving[1];
|
||||
/*032*/ char EvolveGroup[4];
|
||||
/*036*/ char EvolveLevel[1];
|
||||
/*037*/ char OrnamentIcon[5];
|
||||
/*042*/ char Hash[8];
|
||||
/*050*/
|
||||
};
|
||||
|
||||
}; /*structs*/
|
||||
|
||||
+57
-46
@@ -53,11 +53,11 @@ namespace SoF
|
||||
static inline uint32 SoFToServerSlot(uint32 sofSlot);
|
||||
static inline uint32 SoFToServerCorpseSlot(uint32 sofCorpseSlot);
|
||||
|
||||
// server to client text link converter
|
||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink);
|
||||
// server to client say link converter
|
||||
static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink);
|
||||
|
||||
// client to server text link converter
|
||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink);
|
||||
// client to server say link converter
|
||||
static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink);
|
||||
|
||||
static inline CastingSlot ServerToSoFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot SoFToServerCastingSlot(CastingSlot slot, uint32 itemlocation);
|
||||
@@ -161,15 +161,14 @@ namespace SoF
|
||||
OUT(source);
|
||||
OUT(level);
|
||||
OUT(instrument_mod);
|
||||
eq->sequence = emu->sequence;
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(type);
|
||||
//OUT(damage);
|
||||
OUT(spell);
|
||||
eq->level2 = emu->level;
|
||||
OUT(buff_unknown); // if this is 4, a buff icon is made
|
||||
//eq->unknown0036 = -1;
|
||||
//eq->unknown0040 = -1;
|
||||
//eq->unknown0044 = -1;
|
||||
OUT(spell_level);
|
||||
OUT(effect_flag); // if this is 4, a buff icon is made
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -328,7 +327,7 @@ namespace SoF
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToSoFTextLink(new_message, old_message);
|
||||
ServerToSoFSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
|
||||
@@ -440,8 +439,8 @@ namespace SoF
|
||||
OUT(spellid);
|
||||
OUT(damage);
|
||||
OUT(force);
|
||||
OUT(meleepush_xy);
|
||||
OUT(meleepush_z);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -613,7 +612,7 @@ namespace SoF
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToSoFTextLink(new_message, old_message);
|
||||
ServerToSoFSayLink(new_message, old_message);
|
||||
|
||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||
// new_message = new_message.substr(0, 512);
|
||||
@@ -665,7 +664,7 @@ namespace SoF
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
if (old_message_array[i].length() == 0) { break; }
|
||||
ServerToSoFTextLink(new_message_array[i], old_message_array[i]);
|
||||
ServerToSoFSayLink(new_message_array[i], old_message_array[i]);
|
||||
new_message_size += new_message_array[i].length() + 1;
|
||||
}
|
||||
|
||||
@@ -1276,6 +1275,7 @@ namespace SoF
|
||||
OUT(copper_cursor);
|
||||
|
||||
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
|
||||
OUT_array(InnateSkills, structs::MAX_PP_INNATE_SKILL); // 1:1 direct copy (25 dword)
|
||||
|
||||
// OUT(unknown04760[236]);
|
||||
OUT(toxicity);
|
||||
@@ -1813,7 +1813,7 @@ namespace SoF
|
||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||
std::string new_message;
|
||||
|
||||
ServerToSoFTextLink(new_message, old_message);
|
||||
ServerToSoFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||
@@ -1881,7 +1881,7 @@ namespace SoF
|
||||
|
||||
std::string old_message = InBuffer; // start 'Reward' as string
|
||||
std::string new_message;
|
||||
ServerToSoFTextLink(new_message, old_message);
|
||||
ServerToSoFSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
||||
@@ -2384,6 +2384,17 @@ namespace SoF
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_Bug)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::BugReport_Struct);
|
||||
SETUP_DIRECT_DECODE(BugReport_Struct, structs::BugReport_Struct);
|
||||
|
||||
emu->category_id = EQEmu::bug::CategoryNameToCategoryID(eq->category_name);
|
||||
memcpy(emu->category_name, eq, sizeof(structs::BugReport_Struct));
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_CastSpell)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
@@ -2403,7 +2414,7 @@ namespace SoF
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[sizeof(ChannelMessage_Struct)];
|
||||
std::string new_message;
|
||||
SoFToServerTextLink(new_message, old_message);
|
||||
SoFToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -2517,7 +2528,7 @@ namespace SoF
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||
std::string new_message;
|
||||
SoFToServerTextLink(new_message, old_message);
|
||||
SoFToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(Emote_Struct);
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -3304,19 +3315,19 @@ namespace SoF
|
||||
return (sofCorpseSlot - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToSoFTextLink(std::string& sofTextLink, const std::string& serverTextLink)
|
||||
static inline void ServerToSoFSayLink(std::string& sofSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
sofTextLink = serverTextLink;
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
sofSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverTextLink, '\x12');
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
sofTextLink.append(segments[segment_iter]);
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
sofSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -3326,37 +3337,37 @@ namespace SoF
|
||||
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
sofTextLink.push_back('\x12');
|
||||
sofTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
sofTextLink.append(segments[segment_iter].substr(36, 5));
|
||||
sofSayLink.push_back('\x12');
|
||||
sofSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
sofSayLink.append(segments[segment_iter].substr(36, 5));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
sofTextLink.push_back(segments[segment_iter][42]);
|
||||
sofSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
sofTextLink.push_back('F');
|
||||
sofSayLink.push_back('F');
|
||||
|
||||
sofTextLink.append(segments[segment_iter].substr(43));
|
||||
sofTextLink.push_back('\x12');
|
||||
sofSayLink.append(segments[segment_iter].substr(43));
|
||||
sofSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
sofTextLink.append(segments[segment_iter]);
|
||||
sofSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void SoFToServerTextLink(std::string& serverTextLink, const std::string& sofTextLink)
|
||||
static inline void SoFToServerSayLink(std::string& serverSayLink, const std::string& sofSayLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (sofTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = sofTextLink;
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (sofSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = sofSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(sofTextLink, '\x12');
|
||||
auto segments = SplitString(sofSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -3366,16 +3377,16 @@ namespace SoF
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
serverTextLink.push_back('\x12');
|
||||
serverTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverTextLink.append("00000");
|
||||
serverTextLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverTextLink.push_back('0');
|
||||
serverTextLink.append(segments[segment_iter].substr(36));
|
||||
serverTextLink.push_back('\x12');
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.append(segments[segment_iter].substr(36));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ D(OP_ApplyPoison)
|
||||
D(OP_AugmentInfo)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_Buff)
|
||||
D(OP_Bug)
|
||||
D(OP_CastSpell)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_CharacterCreate)
|
||||
|
||||
+122
-66
@@ -52,6 +52,25 @@ struct EnterWorld_Struct {
|
||||
struct WorldObjectsSent_Struct {
|
||||
};
|
||||
|
||||
// yep, even SoF had a version of the new inventory system, used by OP_MoveMultipleItems
|
||||
struct InventorySlot_Struct
|
||||
{
|
||||
/*000*/ int32 Type; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Trade = 3, World = 4, Limbo = 5
|
||||
/*004*/ int32 Slot;
|
||||
/*008*/ int32 SubIndex;
|
||||
/*012*/ int32 AugIndex;
|
||||
/*016*/ int32 Unknown01;
|
||||
};
|
||||
|
||||
// unsure if they have a version of this, completeness though
|
||||
struct TypelessInventorySlot_Struct
|
||||
{
|
||||
/*000*/ int32 Slot;
|
||||
/*004*/ int32 SubIndex;
|
||||
/*008*/ int32 AugIndex;
|
||||
/*012*/ int32 Unknown01;
|
||||
};
|
||||
|
||||
/* Name Approval Struct */
|
||||
/* Len: */
|
||||
/* Opcode: 0x8B20*/
|
||||
@@ -307,7 +326,8 @@ union
|
||||
/*0725*/ uint8 targetable; // 1 = Targetable 0 = Not Targetable (is_npc?)
|
||||
/*0726*/ uint8 unknown0726[4];
|
||||
/*0730*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||
/*0731*/ uint8 unknown0731[11];
|
||||
/*0731*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0735*/ uint8 unknown0731[7];
|
||||
/*0742*/ uint8 targetable_with_hotkey;
|
||||
/*0743*/ signed padding00:12; // ***Placeholder
|
||||
signed x:19; // x coord
|
||||
@@ -799,6 +819,7 @@ static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now
|
||||
static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -903,7 +924,8 @@ struct PlayerProfile_Struct //23576 Octets
|
||||
/*06488*/ uint32 silver_cursor; // Silver Pieces on cursor
|
||||
/*06492*/ uint32 copper_cursor; // Copper Pieces on cursor
|
||||
/*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
|
||||
/*06896*/ uint8 unknown04760[136];
|
||||
/*06896*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL];
|
||||
/*06996*/ uint8 unknown04760[36];
|
||||
/*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
|
||||
/*07036*/ uint32 thirst_level; // Drink (ticks till next drink)
|
||||
/*07040*/ uint32 hunger_level; // Food (ticks till next eat)
|
||||
@@ -1193,20 +1215,18 @@ struct Action_Struct
|
||||
{
|
||||
/* 00 */ uint16 target; // id of target
|
||||
/* 02 */ uint16 source; // id of caster
|
||||
/* 04 */ uint16 level; // level of caster
|
||||
/* 06 */ uint16 instrument_mod; // seems to be fixed to 0x0A
|
||||
/* 08 */ uint32 unknown08;
|
||||
/* 12 */ uint16 unknown16;
|
||||
// some kind of sequence that's the same in both actions
|
||||
// as well as the combat damage, to tie em together?
|
||||
/* 14 */ float sequence; // was uint32
|
||||
/* 18 */ uint32 unknown18;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells
|
||||
/* 23 */ uint32 unknown23;
|
||||
/* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
|
||||
/* 10 */ float force;
|
||||
/* 14 */ float hit_heading;
|
||||
/* 18 */ float hit_pitch;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/* 23 */ uint16 unknown23; // OSX says min_damage
|
||||
/* 25 */ uint16 unknown25; // OSX says tohit
|
||||
/* 27 */ uint16 spell; // spell id being cast
|
||||
/* 29 */ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/* 29 */ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
// this field seems to be some sort of success flag, if it's 4
|
||||
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made
|
||||
/* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
@@ -1215,26 +1235,23 @@ struct Action_Struct
|
||||
// has to do with buff blocking??
|
||||
struct ActionAlt_Struct // ActionAlt_Struct - Size: 56 bytes
|
||||
{
|
||||
/*0000*/ uint16 target; // Target ID
|
||||
/*0002*/ uint16 source; // SourceID
|
||||
/*0004*/ uint16 level; // level of caster
|
||||
/*0006*/ uint16 instrument_mod; // seems to be fixed to 0x0A
|
||||
/*0008*/ uint32 unknown08;
|
||||
/*0012*/ uint16 unknown16;
|
||||
/*0014*/ uint32 sequence;
|
||||
/*0018*/ uint32 unknown18;
|
||||
/*0022*/ uint8 type; // Casts, Falls, Bashes, etc...
|
||||
/*0023*/ uint32 damage; // Amount of Damage
|
||||
/*0027*/ uint16 spell; // SpellID
|
||||
/*0029*/ uint8 unknown29;
|
||||
/*0030*/ uint8 buff_unknown; // if this is 4, a buff icon is made
|
||||
/*0031*/ uint32 unknown0031; // seen 00 00 00 00
|
||||
/*0035*/ uint8 unknown0035; // seen 00
|
||||
/*0036*/ uint32 unknown0036; // seen ff ff ff ff
|
||||
/*0040*/ uint32 unknown0040; // seen ff ff ff ff
|
||||
/*0044*/ uint32 unknown0044; // seen ff ff ff ff
|
||||
/*0048*/ uint32 unknown0048; // seen 00 00 00 00
|
||||
/*0052*/ uint32 unknown0052; // seen 00 00 00 00
|
||||
/*0000*/ uint16 target; // id of target
|
||||
/*0002*/ uint16 source; // id of caster
|
||||
/*0004*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*0006*/ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
|
||||
/*0010*/ float force;
|
||||
/*0014*/ float hit_heading;
|
||||
/*0018*/ float hit_pitch;
|
||||
/*0022*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*0023*/ uint16 unknown23; // OSX says min_damage
|
||||
/*0025*/ uint16 unknown25; // OSX says tohit
|
||||
/*0027*/ uint16 spell; // spell id being cast
|
||||
/*0029*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
// this field seems to be some sort of success flag, if it's 4
|
||||
/*0030*/ uint8 effect_flag; // if this is 4, a buff icon is made
|
||||
/*0031*/ uint8 spell_slot;
|
||||
/*0032*/ uint32 slot[5];
|
||||
/*0052*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
|
||||
/*0056*/
|
||||
};
|
||||
|
||||
@@ -1249,9 +1266,10 @@ struct CombatDamage_Struct
|
||||
/* 05 */ uint16 spellid;
|
||||
/* 07 */ int32 damage;
|
||||
/* 11 */ float force; // cd cc cc 3d
|
||||
/* 15 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 19 */ float meleepush_z;
|
||||
/* 23 */ uint8 unknown23[5]; // was [9] this appears unrelated to the stuff the other clients do here?
|
||||
/* 15 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 19 */ float hit_pitch;
|
||||
/* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary
|
||||
/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage, Report function doesn't seem to check this :P
|
||||
/* 28 */
|
||||
};
|
||||
|
||||
@@ -1555,6 +1573,19 @@ struct MoveItem_Struct
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MultiMoveItemSub_Struct
|
||||
{
|
||||
/*0000*/ InventorySlot_Struct from_slot;
|
||||
/*0020*/ uint32 number_in_stack; // so the amount we are moving from the source
|
||||
/*0024*/ InventorySlot_Struct to_slot;
|
||||
};
|
||||
|
||||
struct MultiMoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 count;
|
||||
/*0004*/ MultiMoveItemSub_Struct moves[0];
|
||||
};
|
||||
|
||||
//
|
||||
// from_slot/to_slot
|
||||
// -1 - destroy
|
||||
@@ -2872,23 +2903,31 @@ struct GuildMakeLeader{
|
||||
char target[64];
|
||||
};
|
||||
|
||||
struct BugReport_Struct {
|
||||
/*0000*/ char category_name[64];
|
||||
/*0064*/ char character_name[64];
|
||||
/*0128*/ char unused_0128[32];
|
||||
/*0160*/ char ui_path[128];
|
||||
/*0288*/ float pos_x;
|
||||
/*0292*/ float pos_y;
|
||||
/*0296*/ float pos_z;
|
||||
/*0300*/ uint32 heading;
|
||||
/*0304*/ uint32 unused_0304;
|
||||
/*0308*/ uint32 time_played;
|
||||
/*0312*/ char padding_0312[8];
|
||||
/*0320*/ uint32 target_id;
|
||||
/*0324*/ char padding_0324[140];
|
||||
/*0464*/ uint32 unknown_0464; // seems to always be '0'
|
||||
/*0468*/ char target_name[64];
|
||||
/*0532*/ uint32 optional_info_mask;
|
||||
|
||||
|
||||
struct BugStruct{
|
||||
/*0000*/ char chartype[64];
|
||||
/*0064*/ char name[96];
|
||||
/*0160*/ char ui[128];
|
||||
/*0288*/ float x;
|
||||
/*0292*/ float y;
|
||||
/*0296*/ float z;
|
||||
/*0300*/ float heading;
|
||||
/*0304*/ uint32 unknown304;
|
||||
/*0308*/ uint32 type;
|
||||
/*0312*/ char unknown312[2144];
|
||||
/*2456*/ char bug[1024];
|
||||
/*3480*/ char placeholder[2];
|
||||
/*3482*/ char system_info[4098];
|
||||
// this looks like a butchered 8k buffer with 2 trailing dword fields
|
||||
/*0536*/ char unused_0536[2052];
|
||||
/*2588*/ char bug_report[2050];
|
||||
/*4638*/ char system_info[4098];
|
||||
/*8736*/
|
||||
};
|
||||
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -2915,20 +2954,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -4112,6 +4152,22 @@ struct AltCurrencySellItem_Struct {
|
||||
/*004*/ uint32 slot_id;
|
||||
/*006*/ uint32 charges;
|
||||
/*010*/ uint32 cost;
|
||||
};
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char IsEvolving[1];
|
||||
/*032*/ char EvolveGroup[4];
|
||||
/*036*/ char EvolveLevel[1];
|
||||
/*037*/ char OrnamentIcon[5];
|
||||
/*042*/ char Hash[8];
|
||||
/*050*/
|
||||
};
|
||||
|
||||
}; /*structs*/
|
||||
|
||||
+59
-44
@@ -52,11 +52,11 @@ namespace Titanium
|
||||
static inline uint32 TitaniumToServerSlot(int16 titaniumSlot);
|
||||
static inline uint32 TitaniumToServerCorpseSlot(int16 titaniumCorpseSlot);
|
||||
|
||||
// server to client text link converter
|
||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink);
|
||||
// server to client say link converter
|
||||
static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink);
|
||||
|
||||
// client to server text link converter
|
||||
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink);
|
||||
// client to server say link converter
|
||||
static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink);
|
||||
|
||||
static inline CastingSlot ServerToTitaniumCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot TitaniumToServerCastingSlot(CastingSlot slot, uint32 itemlocation);
|
||||
@@ -164,11 +164,14 @@ namespace Titanium
|
||||
OUT(source);
|
||||
OUT(level);
|
||||
OUT(instrument_mod);
|
||||
OUT(sequence);
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(type);
|
||||
//OUT(damage);
|
||||
OUT(spell);
|
||||
OUT(buff_unknown); // if this is 4, a buff icon is made
|
||||
OUT(spell_level);
|
||||
OUT(effect_flag); // if this is 4, a buff icon is made
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -290,7 +293,7 @@ namespace Titanium
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToTitaniumTextLink(new_message, old_message);
|
||||
ServerToTitaniumSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
|
||||
@@ -358,8 +361,8 @@ namespace Titanium
|
||||
OUT(spellid);
|
||||
OUT(damage);
|
||||
OUT(force);
|
||||
OUT(meleepush_xy);
|
||||
OUT(meleepush_z);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -532,7 +535,7 @@ namespace Titanium
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToTitaniumTextLink(new_message, old_message);
|
||||
ServerToTitaniumSayLink(new_message, old_message);
|
||||
|
||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||
// new_message = new_message.substr(0, 512);
|
||||
@@ -574,7 +577,7 @@ namespace Titanium
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
if (old_message_array[i].length() == 0) { break; }
|
||||
ServerToTitaniumTextLink(new_message_array[i], old_message_array[i]);
|
||||
ServerToTitaniumSayLink(new_message_array[i], old_message_array[i]);
|
||||
new_message_size += new_message_array[i].length() + 1;
|
||||
}
|
||||
|
||||
@@ -1020,6 +1023,7 @@ namespace Titanium
|
||||
OUT(copper_cursor);
|
||||
|
||||
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
|
||||
OUT_array(InnateSkills, structs::MAX_PP_INNATE_SKILL); // 1:1 direct copy (25 dword)
|
||||
|
||||
// OUT(unknown04760[236]);
|
||||
OUT(toxicity);
|
||||
@@ -1401,7 +1405,7 @@ namespace Titanium
|
||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||
std::string new_message;
|
||||
|
||||
ServerToTitaniumTextLink(new_message, old_message);
|
||||
ServerToTitaniumSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||
@@ -1457,7 +1461,7 @@ namespace Titanium
|
||||
|
||||
std::string old_message = InBuffer; // start 'Reward' as string
|
||||
std::string new_message;
|
||||
ServerToTitaniumTextLink(new_message, old_message);
|
||||
ServerToTitaniumSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct) +
|
||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct) +
|
||||
@@ -1788,6 +1792,17 @@ namespace Titanium
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_Bug)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::BugReport_Struct);
|
||||
SETUP_DIRECT_DECODE(BugReport_Struct, structs::BugReport_Struct);
|
||||
|
||||
emu->category_id = EQEmu::bug::CategoryNameToCategoryID(eq->category_name);
|
||||
memcpy(emu->category_name, eq, sizeof(structs::BugReport_Struct));
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
|
||||
DECODE(OP_CastSpell)
|
||||
{
|
||||
DECODE_LENGTH_EXACT(structs::CastSpell_Struct);
|
||||
@@ -1807,7 +1822,7 @@ namespace Titanium
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[sizeof(ChannelMessage_Struct)];
|
||||
std::string new_message;
|
||||
TitaniumToServerTextLink(new_message, old_message);
|
||||
TitaniumToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -1879,7 +1894,7 @@ namespace Titanium
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||
std::string new_message;
|
||||
TitaniumToServerTextLink(new_message, old_message);
|
||||
TitaniumToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(Emote_Struct);
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -2473,19 +2488,19 @@ namespace Titanium
|
||||
return titaniumCorpseSlot;
|
||||
}
|
||||
|
||||
static inline void ServerToTitaniumTextLink(std::string& titaniumTextLink, const std::string& serverTextLink)
|
||||
static inline void ServerToTitaniumSayLink(std::string& titaniumSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
titaniumTextLink = serverTextLink;
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
titaniumSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverTextLink, '\x12');
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
titaniumTextLink.append(segments[segment_iter]);
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
titaniumSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -2495,37 +2510,37 @@ namespace Titanium
|
||||
// 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45)
|
||||
// Diff: ^^^^^ ^ ^^^^^
|
||||
|
||||
titaniumTextLink.push_back('\x12');
|
||||
titaniumTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
titaniumTextLink.append(segments[segment_iter].substr(36, 5));
|
||||
titaniumSayLink.push_back('\x12');
|
||||
titaniumSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
titaniumSayLink.append(segments[segment_iter].substr(36, 5));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
titaniumTextLink.push_back(segments[segment_iter][42]);
|
||||
titaniumSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
titaniumTextLink.push_back('F');
|
||||
titaniumSayLink.push_back('F');
|
||||
|
||||
titaniumTextLink.append(segments[segment_iter].substr(48));
|
||||
titaniumTextLink.push_back('\x12');
|
||||
titaniumSayLink.append(segments[segment_iter].substr(48));
|
||||
titaniumSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
titaniumTextLink.append(segments[segment_iter]);
|
||||
titaniumSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void TitaniumToServerTextLink(std::string& serverTextLink, const std::string& titaniumTextLink)
|
||||
static inline void TitaniumToServerSayLink(std::string& serverSayLink, const std::string& titaniumSayLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (titaniumTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = titaniumTextLink;
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (titaniumSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = titaniumSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(titaniumTextLink, '\x12');
|
||||
auto segments = SplitString(titaniumSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -2535,18 +2550,18 @@ namespace Titanium
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^^^^^ ^ ^^^^^
|
||||
|
||||
serverTextLink.push_back('\x12');
|
||||
serverTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverTextLink.append("00000");
|
||||
serverTextLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverTextLink.push_back('0');
|
||||
serverTextLink.push_back(segments[segment_iter][36]);
|
||||
serverTextLink.append("00000");
|
||||
serverTextLink.append(segments[segment_iter].substr(37));
|
||||
serverTextLink.push_back('\x12');
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.push_back(segments[segment_iter][36]);
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(37));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ D(OP_AdventureMerchantSell)
|
||||
D(OP_ApplyPoison)
|
||||
D(OP_AugmentItem)
|
||||
D(OP_Buff)
|
||||
D(OP_Bug)
|
||||
D(OP_CastSpell)
|
||||
D(OP_ChannelMessage)
|
||||
D(OP_CharacterCreate)
|
||||
|
||||
@@ -48,6 +48,23 @@ struct EnterWorld_Struct {
|
||||
/*068*/ uint32 return_home; // 01 on "Return Home", 00 if not
|
||||
};
|
||||
|
||||
// yep, even tit had a version of the new inventory system, used by OP_MoveMultipleItems
|
||||
struct InventorySlot_Struct
|
||||
{
|
||||
/*000*/ int32 Type; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Trade = 3, World = 4, Limbo = 5
|
||||
/*004*/ int32 Slot;
|
||||
/*008*/ int32 SubIndex; // no aug index in Tit
|
||||
/*012*/ int32 Unknown01;
|
||||
};
|
||||
|
||||
// unsure if they have a version of this, completeness though
|
||||
struct TypelessInventorySlot_Struct
|
||||
{
|
||||
/*000*/ int32 Slot;
|
||||
/*004*/ int32 SubIndex; // no aug index in Tit
|
||||
/*008*/ int32 Unknown01;
|
||||
};
|
||||
|
||||
/* Name Approval Struct */
|
||||
/* Len: */
|
||||
/* Opcode: 0x8B20*/
|
||||
@@ -310,7 +327,7 @@ union
|
||||
// horse: 0=brown, 1=white, 2=black, 3=tan
|
||||
};
|
||||
/*0340*/ uint32 spawnId; // Spawn Id
|
||||
/*0344*/ uint8 unknown0344[4];
|
||||
/*0344*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0348*/ TintProfile equipment_tint;
|
||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||
/*0385*/
|
||||
@@ -740,6 +757,7 @@ static const uint32 MAX_PP_LANGUAGE = 28;
|
||||
static const uint32 MAX_PP_SPELLBOOK = 400;
|
||||
static const uint32 MAX_PP_MEMSPELL = 9;
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 240;
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -844,7 +862,8 @@ struct PlayerProfile_Struct
|
||||
/*04452*/ uint32 silver_cursor; // Silver Pieces on cursor
|
||||
/*04456*/ uint32 copper_cursor; // Copper Pieces on cursor
|
||||
/*04460*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
|
||||
/*04860*/ uint8 unknown04760[136];
|
||||
/*04860*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL];
|
||||
/*04960*/ uint8 unknown04760[36];
|
||||
/*04996*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
|
||||
/*05000*/ uint32 thirst_level; // Drink (ticks till next drink)
|
||||
/*05004*/ uint32 hunger_level; // Food (ticks till next eat)
|
||||
@@ -1100,20 +1119,18 @@ struct Action_Struct
|
||||
{
|
||||
/* 00 */ uint16 target; // id of target
|
||||
/* 02 */ uint16 source; // id of caster
|
||||
/* 04 */ uint16 level; // level of caster
|
||||
/* 06 */ uint16 instrument_mod;
|
||||
/* 08 */ uint32 unknown08;
|
||||
/* 12 */ uint16 unknown16;
|
||||
// some kind of sequence that's the same in both actions
|
||||
// as well as the combat damage, to tie em together?
|
||||
/* 14 */ uint32 sequence;
|
||||
/* 18 */ uint32 unknown18;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells
|
||||
/* 23 */ uint32 unknown23;
|
||||
/* 04 */ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/* 06 */ uint32 instrument_mod; // OSX dump says base damage, spells use it for bard song (different from newer clients)
|
||||
/* 10 */ float force;
|
||||
/* 14 */ float hit_heading;
|
||||
/* 18 */ float hit_pitch;
|
||||
/* 22 */ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/* 23 */ uint16 unknown23; // OSX says min_damage
|
||||
/* 25 */ uint16 unknown25; // OSX says tohit
|
||||
/* 27 */ uint16 spell; // spell id being cast
|
||||
/* 29 */ uint8 unknown29;
|
||||
/* 29 */ uint8 spell_level;
|
||||
// this field seems to be some sort of success flag, if it's 4
|
||||
/* 30 */ uint8 buff_unknown; // if this is 4, a buff icon is made
|
||||
/* 30 */ uint8 effect_flag; // if this is 4, a buff icon is made
|
||||
/* 31 */
|
||||
};
|
||||
|
||||
@@ -1124,12 +1141,12 @@ struct CombatDamage_Struct
|
||||
{
|
||||
/* 00 */ uint16 target;
|
||||
/* 02 */ uint16 source;
|
||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells, skill
|
||||
/* 05 */ uint16 spellid;
|
||||
/* 07 */ uint32 damage;
|
||||
/* 11 */ float force;
|
||||
/* 15 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 19 */ float meleepush_z;
|
||||
/* 15 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 19 */ float hit_pitch;
|
||||
/* 23 */
|
||||
};
|
||||
|
||||
@@ -1327,6 +1344,19 @@ struct MoveItem_Struct
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct MultiMoveItemSub_Struct
|
||||
{
|
||||
/*0000*/ InventorySlot_Struct from_slot;
|
||||
/*0016*/ uint32 number_in_stack; // so the amount we are moving from the source
|
||||
/*0020*/ InventorySlot_Struct to_slot;
|
||||
};
|
||||
|
||||
struct MultiMoveItem_Struct
|
||||
{
|
||||
/*0000*/ uint32 count;
|
||||
/*0004*/ MultiMoveItemSub_Struct moves[0];
|
||||
};
|
||||
|
||||
//
|
||||
// from_slot/to_slot
|
||||
// -1 - destroy
|
||||
@@ -2539,21 +2569,32 @@ struct GuildMakeLeader{
|
||||
char name[64];
|
||||
char target[64];
|
||||
};
|
||||
struct BugStruct{
|
||||
/*0000*/ char chartype[64];
|
||||
/*0064*/ char name[96];
|
||||
/*0160*/ char ui[128];
|
||||
/*0288*/ float x;
|
||||
/*0292*/ float y;
|
||||
/*0296*/ float z;
|
||||
/*0300*/ float heading;
|
||||
/*0304*/ uint32 unknown304;
|
||||
/*0308*/ uint32 type;
|
||||
/*0312*/ char unknown312[2144];
|
||||
/*2456*/ char bug[1024];
|
||||
/*3480*/ char placeholder[2];
|
||||
/*3482*/ char system_info[4098];
|
||||
|
||||
struct BugReport_Struct {
|
||||
/*0000*/ char category_name[64];
|
||||
/*0064*/ char character_name[64];
|
||||
/*0128*/ char unused_0128[32];
|
||||
/*0160*/ char ui_path[128];
|
||||
/*0288*/ float pos_x;
|
||||
/*0292*/ float pos_y;
|
||||
/*0296*/ float pos_z;
|
||||
/*0300*/ uint32 heading;
|
||||
/*0304*/ uint32 unused_0304;
|
||||
/*0308*/ uint32 time_played;
|
||||
/*0312*/ char padding_0312[8];
|
||||
/*0320*/ uint32 target_id;
|
||||
/*0324*/ char padding_0324[140];
|
||||
/*0464*/ uint32 unknown_0464; // seems to always be '0'
|
||||
/*0468*/ char target_name[64];
|
||||
/*0532*/ uint32 optional_info_mask;
|
||||
|
||||
// this looks like a butchered 8k buffer with 2 trailing dword fields
|
||||
/*0536*/ char unused_0536[2052];
|
||||
/*2588*/ char bug_report[2050];
|
||||
/*4638*/ char system_info[4098];
|
||||
/*8736*/
|
||||
};
|
||||
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -2580,20 +2621,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -3521,6 +3563,21 @@ struct LFGuild_GuildToggle_Struct
|
||||
// char ScrollName; // '0'
|
||||
//};
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char IsEvolving[1];
|
||||
/*032*/ char EvolveGroup[4];
|
||||
/*036*/ char EvolveLevel[1];
|
||||
/*037*/ char Hash[8];
|
||||
/*045*/
|
||||
};
|
||||
|
||||
}; /*structs*/
|
||||
|
||||
}; /*Titanium*/
|
||||
|
||||
+56
-64
@@ -53,11 +53,11 @@ namespace UF
|
||||
static inline uint32 UFToServerSlot(uint32 ufSlot);
|
||||
static inline uint32 UFToServerCorpseSlot(uint32 ufCorpseSlot);
|
||||
|
||||
// server to client text link converter
|
||||
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink);
|
||||
// server to client say link converter
|
||||
static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink);
|
||||
|
||||
// client to server text link converter
|
||||
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink);
|
||||
// client to server say link converter
|
||||
static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink);
|
||||
|
||||
static inline CastingSlot ServerToUFCastingSlot(EQEmu::CastingSlot slot);
|
||||
static inline EQEmu::CastingSlot UFToServerCastingSlot(CastingSlot slot);
|
||||
@@ -161,29 +161,20 @@ namespace UF
|
||||
OUT(source);
|
||||
OUT(level);
|
||||
eq->instrument_mod = 1.0f + (emu->instrument_mod - 10) / 10.0f;
|
||||
eq->knockback_angle = emu->sequence;
|
||||
OUT(force);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(type);
|
||||
OUT(spell);
|
||||
eq->level2 = eq->level;
|
||||
eq->effect_flag = emu->buff_unknown;
|
||||
eq->unknown37 = 0x01;
|
||||
eq->unknown44 = 0xFFFFFFFF;
|
||||
eq->unknown48 = 0xFFFFFFFF;
|
||||
eq->unknown52 = 0xFFFFFFFF;
|
||||
|
||||
/*OUT(target);
|
||||
OUT(source);
|
||||
OUT(level);
|
||||
OUT(instrument_mod);
|
||||
eq->sequence = emu->sequence;
|
||||
OUT(type);
|
||||
//OUT(damage);
|
||||
OUT(spell);
|
||||
eq->level2 = emu->level;
|
||||
OUT(buff_unknown); // if this is 4, a buff icon is made
|
||||
//eq->unknown0036 = -1;
|
||||
//eq->unknown0040 = -1;
|
||||
//eq->unknown0044 = -1;*/
|
||||
OUT(spell_level);
|
||||
OUT(effect_flag);
|
||||
eq->spell_gem = 0;
|
||||
eq->slot[0] = -1; // type
|
||||
eq->slot[1] = -1; // slot
|
||||
eq->slot[2] = -1; // sub index
|
||||
eq->slot[3] = -1; // aug index
|
||||
eq->slot[4] = -1; // unknown
|
||||
eq->item_cast_type = 0;
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
@@ -391,7 +382,7 @@ namespace UF
|
||||
{
|
||||
SETUP_VAR_ENCODE(BuffIcon_Struct);
|
||||
|
||||
uint32 sz = 12 + (17 * emu->count);
|
||||
uint32 sz = 12 + (17 * emu->count) + emu->name_lengths; // 17 includes nullterm
|
||||
__packet->size = sz;
|
||||
__packet->pBuffer = new unsigned char[sz];
|
||||
memset(__packet->pBuffer, 0, sz);
|
||||
@@ -407,7 +398,7 @@ namespace UF
|
||||
__packet->WriteUInt32(emu->entries[i].spell_id);
|
||||
__packet->WriteUInt32(emu->entries[i].tics_remaining);
|
||||
__packet->WriteUInt32(emu->entries[i].num_hits);
|
||||
__packet->WriteString("");
|
||||
__packet->WriteString(emu->entries[i].caster);
|
||||
}
|
||||
__packet->WriteUInt8(emu->type);
|
||||
|
||||
@@ -463,7 +454,7 @@ namespace UF
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToUFTextLink(new_message, old_message);
|
||||
ServerToUFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = strlen(emu->sender) + 1 + strlen(emu->targetname) + 1 + strlen(emu->message) + 1 + 36;
|
||||
in->size = strlen(emu->sender) + strlen(emu->targetname) + new_message.length() + 39;
|
||||
@@ -586,8 +577,8 @@ namespace UF
|
||||
OUT(spellid);
|
||||
OUT(damage);
|
||||
OUT(force);
|
||||
OUT(meleepush_xy);
|
||||
OUT(meleepush_z);
|
||||
OUT(hit_heading);
|
||||
OUT(hit_pitch);
|
||||
OUT(special);
|
||||
|
||||
FINISH_ENCODE();
|
||||
@@ -762,7 +753,7 @@ namespace UF
|
||||
|
||||
std::string old_message = emu->message;
|
||||
std::string new_message;
|
||||
ServerToUFTextLink(new_message, old_message);
|
||||
ServerToUFSayLink(new_message, old_message);
|
||||
|
||||
//if (new_message.length() > 512) // length restricted in packet building function due vari-length name size (no nullterm)
|
||||
// new_message = new_message.substr(0, 512);
|
||||
@@ -814,7 +805,7 @@ namespace UF
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
if (old_message_array[i].length() == 0) { break; }
|
||||
ServerToUFTextLink(new_message_array[i], old_message_array[i]);
|
||||
ServerToUFSayLink(new_message_array[i], old_message_array[i]);
|
||||
new_message_size += new_message_array[i].length() + 1;
|
||||
}
|
||||
|
||||
@@ -1850,6 +1841,7 @@ namespace UF
|
||||
OUT(copper_cursor);
|
||||
|
||||
OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword)
|
||||
OUT_array(InnateSkills, structs::MAX_PP_INNATE_SKILL); // 1:1 direct copy (25 dword)
|
||||
|
||||
// OUT(unknown04760[236]);
|
||||
OUT(toxicity);
|
||||
@@ -2468,7 +2460,7 @@ namespace UF
|
||||
std::string old_message = &emu->message[strlen(emu->sayer)];
|
||||
std::string new_message;
|
||||
|
||||
ServerToUFTextLink(new_message, old_message);
|
||||
ServerToUFSayLink(new_message, old_message);
|
||||
|
||||
//in->size = 3 + 4 + 4 + strlen(emu->sayer) + 1 + 12 + new_message.length() + 1;
|
||||
in->size = strlen(emu->sayer) + new_message.length() + 25;
|
||||
@@ -2538,7 +2530,7 @@ namespace UF
|
||||
|
||||
std::string old_message = InBuffer; // start 'Reward' as string
|
||||
std::string new_message;
|
||||
ServerToUFTextLink(new_message, old_message);
|
||||
ServerToUFSayLink(new_message, old_message);
|
||||
|
||||
in->size = sizeof(TaskDescriptionHeader_Struct) + sizeof(TaskDescriptionData1_Struct)+
|
||||
sizeof(TaskDescriptionData2_Struct) + sizeof(TaskDescriptionTrailer_Struct)+
|
||||
@@ -3286,7 +3278,7 @@ namespace UF
|
||||
|
||||
std::string old_message = InBuffer;
|
||||
std::string new_message;
|
||||
UFToServerTextLink(new_message, old_message);
|
||||
UFToServerSayLink(new_message, old_message);
|
||||
|
||||
//__packet->size = sizeof(ChannelMessage_Struct)+strlen(InBuffer) + 1;
|
||||
__packet->size = sizeof(ChannelMessage_Struct) + new_message.length() + 1;
|
||||
@@ -3397,7 +3389,7 @@ namespace UF
|
||||
IN(type);
|
||||
IN(spellid);
|
||||
IN(damage);
|
||||
IN(meleepush_xy);
|
||||
IN(hit_heading);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
@@ -3420,7 +3412,7 @@ namespace UF
|
||||
|
||||
std::string old_message = (char *)&__eq_buffer[4]; // unknown01 offset
|
||||
std::string new_message;
|
||||
UFToServerTextLink(new_message, old_message);
|
||||
UFToServerSayLink(new_message, old_message);
|
||||
|
||||
__packet->size = sizeof(Emote_Struct);
|
||||
__packet->pBuffer = new unsigned char[__packet->size];
|
||||
@@ -4289,19 +4281,19 @@ namespace UF
|
||||
return (ufCorpseSlot - 1);
|
||||
}
|
||||
|
||||
static inline void ServerToUFTextLink(std::string& ufTextLink, const std::string& serverTextLink)
|
||||
static inline void ServerToUFSayLink(std::string& ufSayLink, const std::string& serverSayLink)
|
||||
{
|
||||
if ((constants::SayLinkBodySize == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) || (serverTextLink.find('\x12') == std::string::npos)) {
|
||||
ufTextLink = serverTextLink;
|
||||
if ((constants::SayLinkBodySize == EQEmu::constants::SayLinkBodySize) || (serverSayLink.find('\x12') == std::string::npos)) {
|
||||
ufSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverTextLink, '\x12');
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= EQEmu::legacy::TEXT_LINK_BODY_LENGTH) {
|
||||
ufTextLink.append(segments[segment_iter]);
|
||||
if (segments[segment_iter].length() <= EQEmu::constants::SayLinkBodySize) {
|
||||
ufSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -4311,37 +4303,37 @@ namespace UF
|
||||
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
ufTextLink.push_back('\x12');
|
||||
ufTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
ufTextLink.append(segments[segment_iter].substr(36, 5));
|
||||
ufSayLink.push_back('\x12');
|
||||
ufSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
ufSayLink.append(segments[segment_iter].substr(36, 5));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
ufTextLink.push_back(segments[segment_iter][42]);
|
||||
ufSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
ufTextLink.push_back('F');
|
||||
ufSayLink.push_back('F');
|
||||
|
||||
ufTextLink.append(segments[segment_iter].substr(43));
|
||||
ufTextLink.push_back('\x12');
|
||||
ufSayLink.append(segments[segment_iter].substr(43));
|
||||
ufSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
ufTextLink.append(segments[segment_iter]);
|
||||
ufSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void UFToServerTextLink(std::string& serverTextLink, const std::string& ufTextLink)
|
||||
static inline void UFToServerSayLink(std::string& serverSayLink, const std::string& ufSayLink)
|
||||
{
|
||||
if ((EQEmu::legacy::TEXT_LINK_BODY_LENGTH == constants::SayLinkBodySize) || (ufTextLink.find('\x12') == std::string::npos)) {
|
||||
serverTextLink = ufTextLink;
|
||||
if ((EQEmu::constants::SayLinkBodySize == constants::SayLinkBodySize) || (ufSayLink.find('\x12') == std::string::npos)) {
|
||||
serverSayLink = ufSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(ufTextLink, '\x12');
|
||||
auto segments = SplitString(ufSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= constants::SayLinkBodySize) {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
@@ -4351,16 +4343,16 @@ namespace UF
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
serverTextLink.push_back('\x12');
|
||||
serverTextLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverTextLink.append("00000");
|
||||
serverTextLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverTextLink.push_back('0');
|
||||
serverTextLink.append(segments[segment_iter].substr(36));
|
||||
serverTextLink.push_back('\x12');
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.append(segments[segment_iter].substr(36));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverTextLink.append(segments[segment_iter]);
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+62
-65
@@ -292,7 +292,7 @@ struct Spawn_Struct
|
||||
/*0000*/ //uint8 nullterm1; // hack to null terminate name
|
||||
/*0064*/ uint32 spawnId;
|
||||
/*0068*/ uint8 level;
|
||||
/*0069*/ float unknown1;
|
||||
/*0069*/ float bounding_radius; // used in melee, overrides calc
|
||||
/*0073*/ uint8 NPC; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||
Spawn_Struct_Bitfields Bitfields;
|
||||
/*0000*/ uint8 otherData; // & 4 - has title, & 8 - has suffix, & 1 - it's a chest or untargetable
|
||||
@@ -848,6 +848,7 @@ static const uint32 MAX_PP_LANGUAGE = 25; //
|
||||
static const uint32 MAX_PP_SPELLBOOK = 720; // Confirmed 60 pages on Underfoot now
|
||||
static const uint32 MAX_PP_MEMSPELL = 12; //was 9 now 10 on Underfoot
|
||||
static const uint32 MAX_PP_SKILL = PACKET_SKILL_ARRAY_SIZE; // 100 - actual skills buffer size
|
||||
static const uint32 MAX_PP_INNATE_SKILL = 25;
|
||||
static const uint32 MAX_PP_AA_ARRAY = 300; //was 299
|
||||
static const uint32 MAX_GROUP_MEMBERS = 6;
|
||||
static const uint32 MAX_RECAST_TYPES = 20;
|
||||
@@ -954,7 +955,8 @@ struct PlayerProfile_Struct
|
||||
/*07336*/ uint32 silver_cursor; // Silver Pieces on cursor
|
||||
/*07340*/ uint32 copper_cursor; // Copper Pieces on cursor
|
||||
/*07344*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer
|
||||
/*07744*/ uint8 unknown07644[136];
|
||||
/*07744*/ uint32 InnateSkills[MAX_PP_INNATE_SKILL];
|
||||
/*07844*/ uint8 unknown07644[36];
|
||||
/*07880*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3)
|
||||
/*07884*/ uint32 thirst_level; // Drink (ticks till next drink)
|
||||
/*07888*/ uint32 hunger_level; // Food (ticks till next eat)
|
||||
@@ -1250,19 +1252,19 @@ struct Action_Struct
|
||||
{
|
||||
/*00*/ uint16 target; // id of target
|
||||
/*02*/ uint16 source; // id of caster
|
||||
/*04*/ uint16 level; // level of caster - Seen 0
|
||||
/*06*/ uint32 unknown06;
|
||||
/*10*/ uint16 instrument_focus;
|
||||
/*12*/ uint16 unknown12; // seems to always be set to something and it doesn't change between casts except in special cases like changing instrument mods
|
||||
/*14*/ uint32 unknown14; // seen 0
|
||||
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again
|
||||
/*22*/ uint32 unknown22;
|
||||
/*26*/ uint8 type;
|
||||
/*27*/ uint32 damage;
|
||||
/*31*/ uint16 unknown31;
|
||||
/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
|
||||
/*10*/ float instrument_mod;
|
||||
/*14*/ float force;
|
||||
/*18*/ float hit_heading;
|
||||
/*22*/ float hit_pitch;
|
||||
/*26*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*27*/ uint32 damage; // OSX says min_damage
|
||||
/*31*/ uint16 unknown31; // OSX says tohit
|
||||
/*33*/ uint16 spell; // spell id being cast
|
||||
/*35*/ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/*35*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
/*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
|
||||
/*37*/
|
||||
};
|
||||
|
||||
|
||||
@@ -1274,27 +1276,22 @@ struct ActionAlt_Struct
|
||||
{
|
||||
/*00*/ uint16 target; // id of target
|
||||
/*02*/ uint16 source; // id of caster
|
||||
/*04*/ uint16 level; // level of caster - Seen 0
|
||||
/*06*/ uint32 unknown06;
|
||||
/*04*/ uint16 level; // level of caster for spells, OSX dump says attack rating, guess spells use it for level
|
||||
/*06*/ uint32 unknown06; // OSX dump says base_damage, was used for bard mod too, this is 0'd :(
|
||||
/*10*/ float instrument_mod;
|
||||
/*14*/ uint32 unknown14; // seen 0
|
||||
/*18*/ float knockback_angle; //seems to go from 0-512 then it rolls over again
|
||||
/*22*/ uint32 unknown22;
|
||||
/*26*/ uint8 type;
|
||||
/*27*/ uint32 damage;
|
||||
/*31*/ uint16 unknown31;
|
||||
/*14*/ float force;
|
||||
/*18*/ float hit_heading;
|
||||
/*22*/ float hit_pitch;
|
||||
/*26*/ uint8 type; // 231 (0xE7) for spells, skill
|
||||
/*27*/ uint32 damage; // OSX says min_damage
|
||||
/*31*/ uint16 unknown31; // OSX says tohit
|
||||
/*33*/ uint16 spell; // spell id being cast
|
||||
/*35*/ uint8 level2; // level of caster again? Or maybe the castee
|
||||
/*35*/ uint8 spell_level; // level of caster again? Or maybe the castee
|
||||
/*36*/ uint8 effect_flag; // if this is 4, the effect is valid: or if two are sent at the same time?
|
||||
/*37*/ uint32 unknown37; // New field to Underfoot - Seen 14
|
||||
/*41*/ uint8 unknown41; // New field to Underfoot - Seen 0
|
||||
/*42*/ uint8 unknown42; // New field to Underfoot - Seen 0
|
||||
/*43*/ uint8 unknown43; // New field to Underfoot - Seen 0
|
||||
/*44*/ uint32 unknown44; // New field to Underfoot - Seen 23
|
||||
/*48*/ uint32 unknown48; // New field to Underfoot - Seen -1
|
||||
/*52*/ uint32 unknown52; // New field to Underfoot - Seen -1
|
||||
/*56*/ uint32 unknown56; // New field to Underfoot - Seen 0
|
||||
/*60*/ uint32 unknown60; // New field to Underfoot - Seen 0
|
||||
/*37*/ uint8 spell_gem;
|
||||
/*38*/ uint8 padding38[2];
|
||||
/*40*/ uint32 slot[5];
|
||||
/*60*/ uint32 item_cast_type; // ItemSpellTypes enum from MQ2
|
||||
/*64*/
|
||||
};
|
||||
|
||||
@@ -1309,9 +1306,9 @@ struct CombatDamage_Struct
|
||||
/* 05 */ uint16 spellid;
|
||||
/* 07 */ int32 damage;
|
||||
/* 11 */ float force; // cd cc cc 3d
|
||||
/* 15 */ float meleepush_xy; // see above notes in Action_Struct
|
||||
/* 19 */ float meleepush_z;
|
||||
/* 23 */ uint8 unknown23; // was [9]
|
||||
/* 15 */ float hit_heading; // see above notes in Action_Struct
|
||||
/* 19 */ float hit_pitch;
|
||||
/* 23 */ uint8 secondary; // 0 for primary hand, 1 for secondary
|
||||
/* 24 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||
/* 28 */
|
||||
};
|
||||
@@ -3058,23 +3055,6 @@ struct GuildMakeLeader{
|
||||
char target[64];
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct BugStruct{
|
||||
/*0000*/ char chartype[64];
|
||||
/*0064*/ char name[96];
|
||||
/*0160*/ char ui[128];
|
||||
/*0288*/ float x;
|
||||
/*0292*/ float y;
|
||||
/*0296*/ float z;
|
||||
/*0300*/ float heading;
|
||||
/*0304*/ uint32 unknown304;
|
||||
/*0308*/ uint32 type;
|
||||
/*0312*/ char unknown312[2144];
|
||||
/*2456*/ char bug[1024];
|
||||
/*3480*/ char placeholder[2];
|
||||
/*3482*/ char system_info[4098];
|
||||
};
|
||||
struct Make_Pet_Struct { //Simple struct for getting pet info
|
||||
uint8 level;
|
||||
uint8 class_;
|
||||
@@ -3101,20 +3081,21 @@ struct Ground_Spawn{
|
||||
struct Ground_Spawns {
|
||||
struct Ground_Spawn spawn[50]; //Assigned max number to allow
|
||||
};
|
||||
struct PetitionBug_Struct{
|
||||
uint32 petition_number;
|
||||
uint32 unknown4;
|
||||
char accountname[64];
|
||||
uint32 zoneid;
|
||||
char name[64];
|
||||
uint32 level;
|
||||
uint32 class_;
|
||||
uint32 race;
|
||||
uint32 unknown152[3];
|
||||
uint32 time;
|
||||
uint32 unknown168;
|
||||
char text[1028];
|
||||
};
|
||||
|
||||
//struct PetitionBug_Struct{
|
||||
// uint32 petition_number;
|
||||
// uint32 unknown4;
|
||||
// char accountname[64];
|
||||
// uint32 zoneid;
|
||||
// char name[64];
|
||||
// uint32 level;
|
||||
// uint32 class_;
|
||||
// uint32 race;
|
||||
// uint32 unknown152[3];
|
||||
// uint32 time;
|
||||
// uint32 unknown168;
|
||||
// char text[1028];
|
||||
//};
|
||||
|
||||
struct ApproveZone_Struct {
|
||||
char name[64];
|
||||
@@ -4503,6 +4484,22 @@ struct MercenaryAssign_Struct {
|
||||
/*0004*/ uint32 MercUnk01; //
|
||||
/*0008*/ uint32 MercUnk02; //
|
||||
/*0012*/
|
||||
};
|
||||
|
||||
struct SayLinkBodyFrame_Struct {
|
||||
/*000*/ char ActionID[1];
|
||||
/*001*/ char ItemID[5];
|
||||
/*006*/ char Augment1[5];
|
||||
/*011*/ char Augment2[5];
|
||||
/*016*/ char Augment3[5];
|
||||
/*021*/ char Augment4[5];
|
||||
/*026*/ char Augment5[5];
|
||||
/*031*/ char IsEvolving[1];
|
||||
/*032*/ char EvolveGroup[4];
|
||||
/*036*/ char EvolveLevel[1];
|
||||
/*037*/ char OrnamentIcon[5];
|
||||
/*042*/ char Hash[8];
|
||||
/*050*/
|
||||
};
|
||||
|
||||
}; /*structs*/
|
||||
|
||||
+27
-11
@@ -44,6 +44,7 @@ RULE_INT(Character, DeathExpLossMaxLevel, 255) // Any level greater than this wi
|
||||
RULE_INT(Character, DeathItemLossLevel, 10)
|
||||
RULE_INT(Character, DeathExpLossMultiplier, 3) //Adjust how much exp is lost
|
||||
RULE_BOOL(Character, UseDeathExpLossMult, false) //Adjust to use the above multiplier or to use code default.
|
||||
RULE_BOOL(Character, UseOldRaceRezEffects, false) // older clients had ID 757 for races with high starting STR, but it doesn't seem used anymore
|
||||
RULE_INT(Character, CorpseDecayTimeMS, 10800000)
|
||||
RULE_INT(Character, CorpseResTimeMS, 10800000) // time before cant res corpse(3 hours)
|
||||
RULE_BOOL(Character, LeaveCorpses, true)
|
||||
@@ -66,11 +67,12 @@ RULE_INT(Character, AutosaveIntervalS, 300) //0=disabled
|
||||
RULE_INT(Character, HPRegenMultiplier, 100)
|
||||
RULE_INT(Character, ManaRegenMultiplier, 100)
|
||||
RULE_INT(Character, EnduranceRegenMultiplier, 100)
|
||||
RULE_BOOL(Character, OldMinMana, false) // this is used for servers that want to follow older skill cap formulas so they can still have some regen w/o mediate
|
||||
RULE_INT(Character, ConsumptionMultiplier, 100) //item's hunger restored = this value * item's food level, 100 = normal, 50 = people eat 2x as fast, 200 = people eat 2x as slow
|
||||
RULE_BOOL(Character, HealOnLevel, false)
|
||||
RULE_BOOL(Character, FeignKillsPet, false)
|
||||
RULE_INT(Character, ItemManaRegenCap, 15)
|
||||
RULE_INT(Character, ItemHealthRegenCap, 35)
|
||||
RULE_INT(Character, ItemHealthRegenCap, 30)
|
||||
RULE_INT(Character, ItemDamageShieldCap, 30)
|
||||
RULE_INT(Character, ItemAccuracyCap, 150)
|
||||
RULE_INT(Character, ItemAvoidanceCap, 100)
|
||||
@@ -91,10 +93,12 @@ RULE_INT(Character, HasteCap, 100) // Haste cap for non-v3(overhaste) haste.
|
||||
RULE_INT(Character, SkillUpModifier, 100) //skill ups are at 100%
|
||||
RULE_BOOL(Character, SharedBankPlat, false) //off by default to prevent duping for now
|
||||
RULE_BOOL(Character, BindAnywhere, false)
|
||||
RULE_INT(Character, RestRegenPercent, 0) // Set to >0 to enable rest state bonus HP and mana regen.
|
||||
RULE_BOOL(Character, RestRegenEnabled, true) // Enable OOC Regen
|
||||
RULE_INT(Character, RestRegenHP, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180
|
||||
RULE_INT(Character, RestRegenMana, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180
|
||||
RULE_INT(Character, RestRegenEnd, 180) // seconds until full from 0. this is actually zone setable, but most or all zones are 180
|
||||
RULE_INT(Character, RestRegenTimeToActivate, 30) // Time in seconds for rest state regen to kick in.
|
||||
RULE_INT(Character, RestRegenRaidTimeToActivate, 300) // Time in seconds for rest state regen to kick in with a raid target.
|
||||
RULE_BOOL(Character, RestRegenEndurance, false) // Whether rest regen will work for endurance or not.
|
||||
RULE_INT(Character, KillsPerGroupLeadershipAA, 250) // Number of dark blues or above per Group Leadership AA
|
||||
RULE_INT(Character, KillsPerRaidLeadershipAA, 250) // Number of dark blues or above per Raid Leadership AA
|
||||
RULE_INT(Character, MaxFearDurationForPlayerCharacter, 4) //4 tics, each tic calculates every 6 seconds.
|
||||
@@ -117,7 +121,8 @@ RULE_BOOL(Character, EnableDiscoveredItems, true) // If enabled, it enables EVEN
|
||||
RULE_BOOL(Character, EnableXTargetting, true) // Enable Extended Targetting Window, for users with UF and later clients.
|
||||
RULE_BOOL(Character, EnableAggroMeter, true) // Enable Aggro Meter, for users with RoF and later clients.
|
||||
RULE_BOOL(Character, KeepLevelOverMax, false) // Don't delevel a character that has somehow gone over the level cap
|
||||
RULE_INT(Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update
|
||||
RULE_INT(Character, FoodLossPerUpdate, 32) // How much food/water you lose per stamina update
|
||||
RULE_BOOL(Character, EnableHungerPenalties, false) // being hungry/thirsty has negative effects -- it does appear normal live servers do not have penalties
|
||||
RULE_INT(Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
|
||||
RULE_BOOL(Character, UseSpellFileSongCap, true) // When they removed the AA that increased the cap they removed the above and just use the spell field
|
||||
RULE_INT(Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225.
|
||||
@@ -151,6 +156,7 @@ RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound beh
|
||||
RULE_BOOL(Character, GrantHoTTOnCreate, false) // Grant Health of Target's Target leadership AA on character creation
|
||||
RULE_BOOL(Character, UseOldConSystem, false) // Grant Health of Target's Target leadership AA on character creation
|
||||
RULE_BOOL(Character, OPClientUpdateVisualDebug, false) // Shows a pulse and forward directional particle each time the client sends its position to server
|
||||
RULE_BOOL(Character, PetsUseReagents, true) //Pets use reagent on spells
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Mercs)
|
||||
@@ -186,12 +192,14 @@ RULE_INT(Skills, MaxTrainSpecializations, 50) // Max level a GM trainer will tra
|
||||
RULE_INT(Skills, SwimmingStartValue, 100)
|
||||
RULE_BOOL(Skills, TrainSenseHeading, false)
|
||||
RULE_INT(Skills, SenseHeadingStartValue, 200)
|
||||
RULE_BOOL(Skills, SelfLanguageLearning, true)
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Pets)
|
||||
RULE_REAL(Pets, AttackCommandRange, 150)
|
||||
RULE_BOOL(Pets, UnTargetableSwarmPet, false)
|
||||
RULE_REAL(Pets, PetPowerLevelCap, 10) // Max number of levels your pet can go up with pet power
|
||||
RULE_BOOL(Pets, CanTakeNoDrop, false) // Can everyone trade nodrop gear to pets
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(GM)
|
||||
@@ -226,6 +234,7 @@ RULE_INT(World, TitaniumStartZoneID, -1) //Sets the Starting Zone for Titanium C
|
||||
RULE_INT(World, ExpansionSettings, 16383) // Sets the expansion settings for the server, This is sent on login to world and affects client expansion settings. Defaults to all expansions enabled up to TSS.
|
||||
RULE_BOOL(World, UseClientBasedExpansionSettings, true) // if true it will overrule World, ExpansionSettings and set someone's expansion based on the client they're using
|
||||
RULE_INT(World, PVPSettings, 0) // Sets the PVP settings for the server, 1 = Rallos Zek RuleSet, 2 = Tallon/Vallon Zek Ruleset, 4 = Sullon Zek Ruleset, 6 = Discord Ruleset, anything above 6 is the Discord Ruleset without the no-drop restrictions removed. TODO: Edit IsAttackAllowed in Zone to accomodate for these rules.
|
||||
RULE_INT(World, PVPMinLevel, 0) // minimum level to pvp
|
||||
RULE_BOOL (World, IsGMPetitionWindowEnabled, false)
|
||||
RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items.
|
||||
RULE_BOOL (World, IPLimitDisconnectAll, false)
|
||||
@@ -268,17 +277,10 @@ RULE_INT(Zone, GlobalLootMultiplier, 1) // Sets Global Loot drop multiplier for
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Map)
|
||||
//enable these to help prevent mob hopping when they are pathing
|
||||
RULE_BOOL(Map, FixPathingZWhenLoading, true) //increases zone boot times a bit to reduce hopping.
|
||||
RULE_BOOL(Map, FixPathingZAtWaypoints, false) //alternative to `WhenLoading`, accomplishes the same thing but does it at each waypoint instead of once at boot time.
|
||||
RULE_BOOL(Map, FixPathingZWhenMoving, false) //very CPU intensive, but helps hopping with widely spaced waypoints.
|
||||
RULE_BOOL(Map, FixPathingZOnSendTo, false) //try to repair Z coords in the SendTo routine as well.
|
||||
RULE_BOOL(Map, FixZWhenMoving, true) // Automatically fix NPC Z coordinates when moving/pathing/engaged (Far less CPU intensive than its predecessor)
|
||||
RULE_BOOL(Map, MobZVisualDebug, false) // Displays spell effects determining whether or not NPC is hitting Best Z calcs (blue for hit, red for miss)
|
||||
RULE_REAL(Map, FixPathingZMaxDeltaMoving, 20) //at runtime while pathing: max change in Z to allow the BestZ code to apply.
|
||||
RULE_REAL(Map, FixPathingZMaxDeltaWaypoint, 20) //at runtime at each waypoint: max change in Z to allow the BestZ code to apply.
|
||||
RULE_REAL(Map, FixPathingZMaxDeltaSendTo, 20) //at runtime in SendTo: max change in Z to allow the BestZ code to apply.
|
||||
RULE_REAL(Map, FixPathingZMaxDeltaLoading, 45) //while loading each waypoint: max change in Z to allow the BestZ code to apply.
|
||||
RULE_INT(Map, FindBestZHeightAdjust, 1) // Adds this to the current Z before seeking the best Z position
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
@@ -400,6 +402,7 @@ RULE_BOOL(Spells, IgnoreSpellDmgLvlRestriction, false) // ignore the 5 level spr
|
||||
RULE_BOOL(Spells, AllowItemTGB, false) // TGB doesn't work with items on live, custom servers want it though
|
||||
RULE_BOOL(Spells, NPCInnateProcOverride, true) // NPC innate procs override the target type to single target.
|
||||
RULE_BOOL(Spells, OldRainTargets, false) // use old incorrectly implemented max targets for rains
|
||||
RULE_BOOL(Spells, NPCSpellPush, false) // enable spell push on NPCs
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Combat)
|
||||
@@ -502,6 +505,7 @@ RULE_INT(Combat, NPCAssistCapTimer, 6000) // Time in milliseconds a NPC will tak
|
||||
RULE_BOOL(Combat, UseRevampHandToHand, false) // use h2h revamped dmg/delays I believe this was implemented during SoF
|
||||
RULE_BOOL(Combat, ClassicMasterWu, false) // classic master wu uses a random special, modern doesn't
|
||||
RULE_INT(Combat, LevelToStopDamageCaps, 0) // 1 will effectively disable them, 20 should give basically same results as old incorrect system
|
||||
RULE_BOOL(Combat, ClassicNPCBackstab, false) // true disables npc facestab - npcs get normal attack if not behind
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(NPC)
|
||||
@@ -668,6 +672,12 @@ RULE_CATEGORY_END()
|
||||
RULE_CATEGORY(AA)
|
||||
RULE_INT(AA, ExpPerPoint, 23976503) //Amount of exp per AA. Is the same as the amount of exp to go from level 51 to level 52.
|
||||
RULE_BOOL(AA, Stacking, true) //Allow AA that belong to the same group to stack on SOF+ clients.
|
||||
RULE_BOOL(AA, NormalizedAAEnabled, false) // TSS+ change to AA that normalizes AA XP to a fixed # of white con kills independent of level.
|
||||
RULE_INT(AA, NormalizedAANumberOfWhiteConPerAA, 25) // The number of white con kills per AA point.
|
||||
RULE_BOOL(AA, ModernAAScalingEnabled, false) // Are we linearly scaling AA XP based on total # of earned AA?
|
||||
RULE_REAL(AA, ModernAAScalingStartPercent, 1000) // 1000% or 10x AA XP at the start of the scaling range
|
||||
RULE_INT(AA, ModernAAScalingAAMinimum, 0) // The minimum number of earned AA before AA XP scaling begins.
|
||||
RULE_INT(AA, ModernAAScalingAALimit, 4000) // The number of earned AA when AA XP scaling ends
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Console)
|
||||
@@ -713,6 +723,12 @@ RULE_BOOL(Client, UseLiveFactionMessage, false) // Allows players to see faction
|
||||
RULE_BOOL(Client, UseLiveBlockedMessage, false) // Allows players to see faction adjustments like Live
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Bugs)
|
||||
RULE_BOOL(Bugs, ReportingSystemActive, true) // Activates bug reporting
|
||||
RULE_BOOL(Bugs, UseOldReportingMethod, true) // Forces the use of the old bug reporting system
|
||||
RULE_BOOL(Bugs, DumpTargetEntity, false) // Dumps the target entity, if one is provided
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
#undef RULE_CATEGORY
|
||||
#undef RULE_INT
|
||||
#undef RULE_REAL
|
||||
|
||||
+51
-53
@@ -29,10 +29,10 @@
|
||||
bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct, const std::string& say_link_body)
|
||||
{
|
||||
memset(&say_link_body_struct, 0, sizeof(say_link_body_struct));
|
||||
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
||||
if (say_link_body.length() != EQEmu::constants::SayLinkBodySize)
|
||||
return false;
|
||||
|
||||
say_link_body_struct.unknown_1 = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16);
|
||||
say_link_body_struct.action_id = (uint8)strtol(say_link_body.substr(0, 1).c_str(), nullptr, 16);
|
||||
say_link_body_struct.item_id = (uint32)strtol(say_link_body.substr(1, 5).c_str(), nullptr, 16);
|
||||
say_link_body_struct.augment_1 = (uint32)strtol(say_link_body.substr(6, 5).c_str(), nullptr, 16);
|
||||
say_link_body_struct.augment_2 = (uint32)strtol(say_link_body.substr(11, 5).c_str(), nullptr, 16);
|
||||
@@ -44,7 +44,7 @@ bool EQEmu::saylink::DegenerateLinkBody(SayLinkBody_Struct& say_link_body_struct
|
||||
say_link_body_struct.evolve_group = (uint32)strtol(say_link_body.substr(37, 4).c_str(), nullptr, 16);
|
||||
say_link_body_struct.evolve_level = (uint8)strtol(say_link_body.substr(41, 2).c_str(), nullptr, 16);
|
||||
say_link_body_struct.ornament_icon = (uint32)strtol(say_link_body.substr(43, 5).c_str(), nullptr, 16);
|
||||
say_link_body_struct.hash = (int)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16);
|
||||
say_link_body_struct.hash = (uint32)strtol(say_link_body.substr(48, 8).c_str(), nullptr, 16);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB
|
||||
{
|
||||
say_link_body = StringFormat(
|
||||
"%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X",
|
||||
(0x0F & say_link_body_struct.unknown_1),
|
||||
(0x0F & say_link_body_struct.action_id),
|
||||
(0x000FFFFF & say_link_body_struct.item_id),
|
||||
(0x000FFFFF & say_link_body_struct.augment_1),
|
||||
(0x000FFFFF & say_link_body_struct.augment_2),
|
||||
@@ -68,7 +68,7 @@ bool EQEmu::saylink::GenerateLinkBody(std::string& say_link_body, const SayLinkB
|
||||
(0xFFFFFFFF & say_link_body_struct.hash)
|
||||
);
|
||||
|
||||
if (say_link_body.length() != EQEmu::legacy::TEXT_LINK_BODY_LENGTH)
|
||||
if (say_link_body.length() != EQEmu::constants::SayLinkBodySize)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -79,7 +79,7 @@ EQEmu::SayLinkEngine::SayLinkEngine()
|
||||
Reset();
|
||||
}
|
||||
|
||||
std::string EQEmu::SayLinkEngine::GenerateLink()
|
||||
const std::string& EQEmu::SayLinkEngine::GenerateLink()
|
||||
{
|
||||
m_Link.clear();
|
||||
m_LinkBody.clear();
|
||||
@@ -88,18 +88,26 @@ std::string EQEmu::SayLinkEngine::GenerateLink()
|
||||
generate_body();
|
||||
generate_text();
|
||||
|
||||
if ((m_LinkBody.length() == EQEmu::legacy::TEXT_LINK_BODY_LENGTH) && (m_LinkText.length() > 0)) {
|
||||
if ((m_LinkBody.length() == EQEmu::constants::SayLinkBodySize) && (m_LinkText.length() > 0)) {
|
||||
m_Link.push_back(0x12);
|
||||
m_Link.append(m_LinkBody);
|
||||
m_Link.append(m_LinkText);
|
||||
m_Link.push_back(0x12);
|
||||
}
|
||||
|
||||
if ((m_Link.length() == 0) || (m_Link.length() > 250)) {
|
||||
if ((m_Link.length() == 0) || (m_Link.length() > (EQEmu::constants::SayLinkMaximumSize))) {
|
||||
m_Error = true;
|
||||
m_Link = "<LINKER ERROR>";
|
||||
Log(Logs::General, Logs::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})",
|
||||
m_LinkType, m_Link.length(), m_LinkBody.length(), m_LinkText.length());
|
||||
Log(Logs::General, Logs::Error, "SayLinkEngine::GenerateLink() failed to generate a useable say link");
|
||||
Log(Logs::General, Logs::Error, ">> LinkType: %i, Lengths: {link: %u(%u), body: %u(%u), text: %u(%u)}",
|
||||
m_LinkType,
|
||||
m_Link.length(),
|
||||
EQEmu::constants::SayLinkMaximumSize,
|
||||
m_LinkBody.length(),
|
||||
EQEmu::constants::SayLinkBodySize,
|
||||
m_LinkText.length(),
|
||||
EQEmu::constants::SayLinkTextSize
|
||||
);
|
||||
Log(Logs::General, Logs::Error, ">> LinkBody: %s", m_LinkBody.c_str());
|
||||
Log(Logs::General, Logs::Error, ">> LinkText: %s", m_LinkText.c_str());
|
||||
}
|
||||
@@ -113,20 +121,10 @@ void EQEmu::SayLinkEngine::Reset()
|
||||
m_ItemData = nullptr;
|
||||
m_LootData = nullptr;
|
||||
m_ItemInst = nullptr;
|
||||
m_Proxy_unknown_1 = 0;
|
||||
m_ProxyItemID = 0;
|
||||
m_ProxyAugment1ID = 0;
|
||||
m_ProxyAugment2ID = 0;
|
||||
m_ProxyAugment3ID = 0;
|
||||
m_ProxyAugment4ID = 0;
|
||||
m_ProxyAugment5ID = 0;
|
||||
m_ProxyAugment6ID = 0;
|
||||
m_ProxyIsEvolving = 0;
|
||||
m_ProxyEvolveGroup = 0;
|
||||
m_ProxyEvolveLevel = 0;
|
||||
m_ProxyOrnamentIcon = 0;
|
||||
m_ProxyHash = 0;
|
||||
m_ProxyText = nullptr;
|
||||
|
||||
memset(&m_LinkBodyStruct, 0, sizeof(SayLinkBody_Struct));
|
||||
memset(&m_LinkProxyStruct, 0, sizeof(SayLinkProxy_Struct));
|
||||
|
||||
m_TaskUse = false;
|
||||
m_Link.clear();
|
||||
m_LinkBody.clear();
|
||||
@@ -194,32 +192,32 @@ void EQEmu::SayLinkEngine::generate_body()
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_Proxy_unknown_1)
|
||||
m_LinkBodyStruct.unknown_1 = m_Proxy_unknown_1;
|
||||
if (m_ProxyItemID)
|
||||
m_LinkBodyStruct.item_id = m_ProxyItemID;
|
||||
if (m_ProxyAugment1ID)
|
||||
m_LinkBodyStruct.augment_1 = m_ProxyAugment1ID;
|
||||
if (m_ProxyAugment2ID)
|
||||
m_LinkBodyStruct.augment_2 = m_ProxyAugment2ID;
|
||||
if (m_ProxyAugment3ID)
|
||||
m_LinkBodyStruct.augment_3 = m_ProxyAugment3ID;
|
||||
if (m_ProxyAugment4ID)
|
||||
m_LinkBodyStruct.augment_4 = m_ProxyAugment4ID;
|
||||
if (m_ProxyAugment5ID)
|
||||
m_LinkBodyStruct.augment_5 = m_ProxyAugment5ID;
|
||||
if (m_ProxyAugment6ID)
|
||||
m_LinkBodyStruct.augment_6 = m_ProxyAugment6ID;
|
||||
if (m_ProxyIsEvolving)
|
||||
m_LinkBodyStruct.is_evolving = m_ProxyIsEvolving;
|
||||
if (m_ProxyEvolveGroup)
|
||||
m_LinkBodyStruct.evolve_group = m_ProxyEvolveGroup;
|
||||
if (m_ProxyEvolveLevel)
|
||||
m_LinkBodyStruct.evolve_level = m_ProxyEvolveLevel;
|
||||
if (m_ProxyOrnamentIcon)
|
||||
m_LinkBodyStruct.ornament_icon = m_ProxyOrnamentIcon;
|
||||
if (m_ProxyHash)
|
||||
m_LinkBodyStruct.hash = m_ProxyHash;
|
||||
if (m_LinkProxyStruct.action_id)
|
||||
m_LinkBodyStruct.action_id = m_LinkProxyStruct.action_id;
|
||||
if (m_LinkProxyStruct.item_id)
|
||||
m_LinkBodyStruct.item_id = m_LinkProxyStruct.item_id;
|
||||
if (m_LinkProxyStruct.augment_1)
|
||||
m_LinkBodyStruct.augment_1 = m_LinkProxyStruct.augment_1;
|
||||
if (m_LinkProxyStruct.augment_2)
|
||||
m_LinkBodyStruct.augment_2 = m_LinkProxyStruct.augment_2;
|
||||
if (m_LinkProxyStruct.augment_3)
|
||||
m_LinkBodyStruct.augment_3 = m_LinkProxyStruct.augment_3;
|
||||
if (m_LinkProxyStruct.augment_4)
|
||||
m_LinkBodyStruct.augment_4 = m_LinkProxyStruct.augment_4;
|
||||
if (m_LinkProxyStruct.augment_5)
|
||||
m_LinkBodyStruct.augment_5 = m_LinkProxyStruct.augment_5;
|
||||
if (m_LinkProxyStruct.augment_6)
|
||||
m_LinkBodyStruct.augment_6 = m_LinkProxyStruct.augment_6;
|
||||
if (m_LinkProxyStruct.is_evolving)
|
||||
m_LinkBodyStruct.is_evolving = m_LinkProxyStruct.is_evolving;
|
||||
if (m_LinkProxyStruct.evolve_group)
|
||||
m_LinkBodyStruct.evolve_group = m_LinkProxyStruct.evolve_group;
|
||||
if (m_LinkProxyStruct.evolve_level)
|
||||
m_LinkBodyStruct.evolve_level = m_LinkProxyStruct.evolve_level;
|
||||
if (m_LinkProxyStruct.ornament_icon)
|
||||
m_LinkBodyStruct.ornament_icon = m_LinkProxyStruct.ornament_icon;
|
||||
if (m_LinkProxyStruct.hash)
|
||||
m_LinkBodyStruct.hash = m_LinkProxyStruct.hash;
|
||||
|
||||
|
||||
if (m_TaskUse)
|
||||
@@ -227,7 +225,7 @@ void EQEmu::SayLinkEngine::generate_body()
|
||||
|
||||
m_LinkBody = StringFormat(
|
||||
"%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%04X" "%02X" "%05X" "%08X",
|
||||
(0x0F & m_LinkBodyStruct.unknown_1),
|
||||
(0x0F & m_LinkBodyStruct.action_id),
|
||||
(0x000FFFFF & m_LinkBodyStruct.item_id),
|
||||
(0x000FFFFF & m_LinkBodyStruct.augment_1),
|
||||
(0x000FFFFF & m_LinkBodyStruct.augment_2),
|
||||
@@ -245,8 +243,8 @@ void EQEmu::SayLinkEngine::generate_body()
|
||||
|
||||
void EQEmu::SayLinkEngine::generate_text()
|
||||
{
|
||||
if (m_ProxyText != nullptr) {
|
||||
m_LinkText = m_ProxyText;
|
||||
if (m_LinkProxyStruct.text != nullptr) {
|
||||
m_LinkText = m_LinkProxyStruct.text;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+28
-37
@@ -47,7 +47,7 @@ namespace EQEmu
|
||||
} /*saylink*/
|
||||
|
||||
struct SayLinkBody_Struct {
|
||||
uint8 unknown_1; /* %1X */
|
||||
uint8 action_id; /* %1X */
|
||||
uint32 item_id; /* %05X */
|
||||
uint32 augment_1; /* %05X */
|
||||
uint32 augment_2; /* %05X */
|
||||
@@ -56,13 +56,18 @@ namespace EQEmu
|
||||
uint32 augment_5; /* %05X */
|
||||
uint32 augment_6; /* %05X */
|
||||
uint8 is_evolving; /* %1X */
|
||||
uint32 evolve_group; /* %05X */
|
||||
uint32 evolve_group; /* %04X */
|
||||
uint8 evolve_level; /* %02X */
|
||||
uint32 ornament_icon; /* %05X */
|
||||
int hash; /* %08X */
|
||||
uint32 hash; /* %08X */
|
||||
};
|
||||
|
||||
struct SayLinkProxy_Struct : SayLinkBody_Struct {
|
||||
const char* text;
|
||||
};
|
||||
|
||||
class SayLinkEngine {
|
||||
// TODO: consider methods for direct 'saylink' assignments
|
||||
public:
|
||||
SayLinkEngine();
|
||||
|
||||
@@ -72,29 +77,29 @@ namespace EQEmu
|
||||
void SetItemInst(const ItemInstance* item_inst) { m_ItemInst = item_inst; }
|
||||
|
||||
// mainly for saylinks..but, not limited to
|
||||
void SetProxyUnknown1(uint8 proxy_unknown_1) { m_Proxy_unknown_1 = proxy_unknown_1; }
|
||||
void SetProxyItemID(uint32 proxy_item_id) { m_ProxyItemID = proxy_item_id; }
|
||||
void SetProxyAugment1ID(uint32 proxy_augment_id) { m_ProxyAugment1ID = proxy_augment_id; }
|
||||
void SetProxyAugment2ID(uint32 proxy_augment_id) { m_ProxyAugment2ID = proxy_augment_id; }
|
||||
void SetProxyAugment3ID(uint32 proxy_augment_id) { m_ProxyAugment3ID = proxy_augment_id; }
|
||||
void SetProxyAugment4ID(uint32 proxy_augment_id) { m_ProxyAugment4ID = proxy_augment_id; }
|
||||
void SetProxyAugment5ID(uint32 proxy_augment_id) { m_ProxyAugment5ID = proxy_augment_id; }
|
||||
void SetProxyAugment6ID(uint32 proxy_augment_id) { m_ProxyAugment6ID = proxy_augment_id; }
|
||||
void SetProxyIsEvolving(uint8 proxy_is_evolving) { m_ProxyIsEvolving = proxy_is_evolving; }
|
||||
void SetProxyEvolveGroup(uint32 proxy_evolve_group) { m_ProxyEvolveGroup = proxy_evolve_group; }
|
||||
void SetProxyEvolveLevel(uint8 proxy_evolve_level) { m_ProxyEvolveLevel = proxy_evolve_level; }
|
||||
void SetProxyOrnamentIcon(uint32 proxy_ornament_icon) { m_ProxyOrnamentIcon = proxy_ornament_icon; }
|
||||
void SetProxyHash(int proxy_hash) { m_ProxyHash = proxy_hash; }
|
||||
void SetProxyActionID(uint8 proxy_action_id) { m_LinkProxyStruct.action_id = proxy_action_id; } // should always be '0'
|
||||
void SetProxyItemID(uint32 proxy_item_id) { m_LinkProxyStruct.item_id = proxy_item_id; }
|
||||
void SetProxyAugment1ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_1 = proxy_augment_id; }
|
||||
void SetProxyAugment2ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_2 = proxy_augment_id; }
|
||||
void SetProxyAugment3ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_3 = proxy_augment_id; }
|
||||
void SetProxyAugment4ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_4 = proxy_augment_id; }
|
||||
void SetProxyAugment5ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_5 = proxy_augment_id; }
|
||||
void SetProxyAugment6ID(uint32 proxy_augment_id) { m_LinkProxyStruct.augment_6 = proxy_augment_id; }
|
||||
void SetProxyIsEvolving(uint8 proxy_is_evolving) { m_LinkProxyStruct.is_evolving = proxy_is_evolving; }
|
||||
void SetProxyEvolveGroup(uint32 proxy_evolve_group) { m_LinkProxyStruct.evolve_group = proxy_evolve_group; }
|
||||
void SetProxyEvolveLevel(uint8 proxy_evolve_level) { m_LinkProxyStruct.evolve_level = proxy_evolve_level; }
|
||||
void SetProxyOrnamentIcon(uint32 proxy_ornament_icon) { m_LinkProxyStruct.ornament_icon = proxy_ornament_icon; }
|
||||
void SetProxyHash(uint32 proxy_hash) { m_LinkProxyStruct.hash = proxy_hash; }
|
||||
|
||||
void SetProxyText(const char* proxy_text) { m_ProxyText = proxy_text; } // overrides standard text use
|
||||
void SetProxyText(const char* proxy_text) { m_LinkProxyStruct.text = proxy_text; } // overrides standard text use
|
||||
void SetTaskUse() { m_TaskUse = true; }
|
||||
|
||||
std::string GenerateLink();
|
||||
const std::string& GenerateLink();
|
||||
bool LinkError() { return m_Error; }
|
||||
|
||||
std::string Link() { return m_Link; } // contains full string format: '/12x' '<LinkBody>' '<LinkText>' '/12x'
|
||||
std::string LinkBody() { return m_LinkBody; } // contains string format: '<LinkBody>'
|
||||
std::string LinkText() { return m_LinkText; } // contains string format: '<LinkText>'
|
||||
const std::string& Link() { return m_Link; } // contains full string format: '\x12' '<LinkBody>' '<LinkText>' '\x12'
|
||||
const std::string& LinkBody() { return m_LinkBody; } // contains string format: '<LinkBody>'
|
||||
const std::string& LinkText() { return m_LinkText; } // contains string format: '<LinkText>'
|
||||
|
||||
void Reset();
|
||||
|
||||
@@ -106,23 +111,9 @@ namespace EQEmu
|
||||
const ItemData* m_ItemData;
|
||||
const ServerLootItem_Struct* m_LootData;
|
||||
const ItemInstance* m_ItemInst;
|
||||
|
||||
uint8 m_Proxy_unknown_1;
|
||||
uint32 m_ProxyItemID;
|
||||
uint32 m_ProxyAugment1ID;
|
||||
uint32 m_ProxyAugment2ID;
|
||||
uint32 m_ProxyAugment3ID;
|
||||
uint32 m_ProxyAugment4ID;
|
||||
uint32 m_ProxyAugment5ID;
|
||||
uint32 m_ProxyAugment6ID;
|
||||
uint8 m_ProxyIsEvolving;
|
||||
uint32 m_ProxyEvolveGroup;
|
||||
uint8 m_ProxyEvolveLevel;
|
||||
uint32 m_ProxyOrnamentIcon;
|
||||
int m_ProxyHash;
|
||||
const char* m_ProxyText;
|
||||
bool m_TaskUse;
|
||||
SayLinkBody_Struct m_LinkBodyStruct;
|
||||
SayLinkProxy_Struct m_LinkProxyStruct;
|
||||
bool m_TaskUse;
|
||||
std::string m_Link;
|
||||
std::string m_LinkBody;
|
||||
std::string m_LinkText;
|
||||
|
||||
@@ -190,6 +190,8 @@
|
||||
#define ServerOP_ReloadLogs 0x4010
|
||||
#define ServerOP_ReloadPerlExportSettings 0x4011
|
||||
#define ServerOP_CZSetEntityVariableByClientName 0x4012
|
||||
#define ServerOP_UCSServerStatusRequest 0x4013
|
||||
#define ServerOP_UCSServerStatusReply 0x4014
|
||||
/* Query Server OP Codes */
|
||||
#define ServerOP_QSPlayerLogTrades 0x5010
|
||||
#define ServerOP_QSPlayerLogHandins 0x5011
|
||||
@@ -1278,6 +1280,17 @@ struct ServerRequestTellQueue_Struct {
|
||||
char name[64];
|
||||
};
|
||||
|
||||
struct UCSServerStatus_Struct {
|
||||
uint8 available; // non-zero=true, 0=false
|
||||
union {
|
||||
struct {
|
||||
uint16 port;
|
||||
uint16 unused;
|
||||
};
|
||||
uint32 timestamp;
|
||||
};
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
+37
-2
@@ -110,6 +110,41 @@ uint32 SharedDatabase::GetTotalTimeEntitledOnAccount(uint32 AccountID) {
|
||||
return EntitledTime;
|
||||
}
|
||||
|
||||
void SharedDatabase::SetMailKey(int CharID, int IPAddress, int MailKey)
|
||||
{
|
||||
char MailKeyString[17];
|
||||
|
||||
if (RuleB(Chat, EnableMailKeyIPVerification) == true)
|
||||
sprintf(MailKeyString, "%08X%08X", IPAddress, MailKey);
|
||||
else
|
||||
sprintf(MailKeyString, "%08X", MailKey);
|
||||
|
||||
std::string query = StringFormat("UPDATE character_data SET mailkey = '%s' WHERE id = '%i'",
|
||||
MailKeyString, CharID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log(Logs::General, Logs::Error, "SharedDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
std::string SharedDatabase::GetMailKey(int CharID, bool key_only)
|
||||
{
|
||||
std::string query = StringFormat("SELECT `mailkey` FROM `character_data` WHERE `id`='%i' LIMIT 1", CharID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::MySQLError, "Error retrieving mailkey from database: %s", results.ErrorMessage().c_str());
|
||||
return std::string();
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
std::string mail_key = row[0];
|
||||
|
||||
if (mail_key.length() > 8 && key_only)
|
||||
return mail_key.substr(8);
|
||||
else
|
||||
return mail_key;
|
||||
}
|
||||
|
||||
bool SharedDatabase::SaveCursor(uint32 char_id, std::list<EQEmu::ItemInstance*>::const_iterator &start, std::list<EQEmu::ItemInstance*>::const_iterator &end)
|
||||
{
|
||||
// Delete cursor items
|
||||
@@ -1817,8 +1852,8 @@ void SharedDatabase::LoadBaseData(void *data, int max_level) {
|
||||
bd->base_hp = atof(row[2]);
|
||||
bd->base_mana = atof(row[3]);
|
||||
bd->base_end = atof(row[4]);
|
||||
bd->unk1 = atof(row[5]);
|
||||
bd->unk2 = atof(row[6]);
|
||||
bd->hp_regen = atof(row[5]);
|
||||
bd->end_regen = atof(row[6]);
|
||||
bd->hp_factor = atof(row[7]);
|
||||
bd->mana_factor = atof(row[8]);
|
||||
bd->endurance_factor = atof(row[9]);
|
||||
|
||||
@@ -72,6 +72,8 @@ class SharedDatabase : public Database
|
||||
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
||||
bool GetCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &command_settings);
|
||||
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
|
||||
void SetMailKey(int CharID, int IPAddress, int MailKey);
|
||||
std::string GetMailKey(int CharID, bool key_only = false);
|
||||
|
||||
/*
|
||||
Character InventoryProfile
|
||||
|
||||
+7
-1
@@ -73,6 +73,8 @@ enum SpellTypes : uint32
|
||||
SpellTypes_Detrimental = (SpellType_Nuke | SpellType_Root | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Charm | SpellType_Debuff | SpellType_Slow),
|
||||
SpellTypes_Beneficial = (SpellType_Heal | SpellType_Buff | SpellType_Escape | SpellType_Pet | SpellType_InCombatBuff | SpellType_Cure | SpellType_HateRedux | SpellType_InCombatBuffSong | SpellType_OutOfCombatBuffSong | SpellType_PreCombatBuff | SpellType_PreCombatBuffSong),
|
||||
|
||||
SpellTypes_Innate = (SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root),
|
||||
|
||||
SpellType_Any = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
@@ -131,6 +133,11 @@ enum SpellAffectIndex {
|
||||
SAI_NPC_Special_80 = 80,
|
||||
SAI_Trap_Lock = 88
|
||||
};
|
||||
|
||||
enum class GlobalGroup {
|
||||
Lich = 46,
|
||||
};
|
||||
|
||||
enum RESISTTYPE
|
||||
{
|
||||
RESIST_NONE = 0,
|
||||
@@ -965,7 +972,6 @@ bool IsCastWhileInvis(uint16 spell_id);
|
||||
bool IsEffectIgnoredInStacking(int spa);
|
||||
|
||||
int CalcPetHp(int levelb, int classb, int STA = 75);
|
||||
const char *GetRandPetName();
|
||||
int GetSpellEffectDescNum(uint16 spell_id);
|
||||
DmgShieldType GetDamageShieldType(uint16 spell_id, int32 DSType = 0);
|
||||
bool DetrimentalSpellAllowsRest(uint16 spell_id);
|
||||
|
||||
+2
-2
@@ -30,9 +30,9 @@
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9114
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9122
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9017
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9018
|
||||
#else
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
||||
#endif
|
||||
|
||||
@@ -1719,6 +1719,8 @@ FMT_DEFINE_INT_FORMATTERS(unsigned long)
|
||||
FMT_DEFINE_INT_FORMATTERS(LongLong)
|
||||
FMT_DEFINE_INT_FORMATTERS(ULongLong)
|
||||
|
||||
#define CHAR_WIDTH 1
|
||||
|
||||
/**
|
||||
\rst
|
||||
Returns a string formatter that pads the formatted argument with the fill
|
||||
@@ -1823,7 +1825,7 @@ class ArgFormatterBase : public ArgVisitor<Impl, void> {
|
||||
typedef typename BasicWriter<Char>::CharPtr CharPtr;
|
||||
Char fill = internal::CharTraits<Char>::cast(spec_.fill());
|
||||
CharPtr out = CharPtr();
|
||||
const unsigned CHAR_WIDTH = 1;
|
||||
|
||||
if (spec_.width_ > CHAR_WIDTH) {
|
||||
out = writer_.grow_buffer(spec_.width_);
|
||||
if (spec_.align_ == ALIGN_RIGHT) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Protobuf
|
||||
|
||||
* [https://developers.google.com/protocol-buffers/](Learn more about protobuf)
|
||||
* Version is 3.5.1 (latest). In order to modify *.pb.cpp files, you need to have the [https://github.com/google/protobuf/releases](protoc binary).
|
||||
* If you add any new .proto files, you need to include them into the CMakeList.txt entry of the respective dir, likely common/CMakeList.txt.
|
||||
* By default, the generated cpp files are placed in the common/proto/* directory, while this is not best practice to have them versioned as they are auto generated files, it simplifies compiling source by not requiring protoc. (Perhaps later, we can look into adding this flow into cmake)
|
||||
* Run build.bat or build.sh to build protobuf for different platforms.
|
||||
* Look at each language subdirectory to learn more about building them
|
||||
@@ -0,0 +1,8 @@
|
||||
@echo off
|
||||
mkdir go\eqproto python\proto java\eqproto csharp\proto
|
||||
del /q ..\common\proto\*
|
||||
del /q go\eqproto\*
|
||||
del /q python\proto\*
|
||||
del /q java\eqproto\*
|
||||
del /q csharp\proto\*
|
||||
..\dependencies\protobuf\bin\protoc --go_out=go/eqproto --python_out=python/proto --csharp_out=csharp/proto --java_out=java --proto_path=../common message.proto
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "Cleaning up existing .pb files"
|
||||
rm -rf ../common/proto/* go/eqproto/* csharp/proto/*.cs java/eqproto/*.java python/proto/*pb2*
|
||||
protoc --go_out=go/eqproto --python_out=python/proto --csharp_out=csharp/proto --java_out=java -I ../common/ message.proto
|
||||
@@ -0,0 +1,883 @@
|
||||
syntax = "proto3";
|
||||
package eqproto;
|
||||
|
||||
message ChannelMessage {
|
||||
int32 chan_num = 1;
|
||||
int32 language = 2;
|
||||
string from = 3;
|
||||
string to = 4;
|
||||
string message = 5;
|
||||
int32 guilddbid = 6;
|
||||
string deliverto = 7;
|
||||
int32 type = 8;
|
||||
int32 minstatus = 9;
|
||||
int32 fromadmin = 10;
|
||||
bool noreply = 11;
|
||||
bool is_emote = 12;
|
||||
//0 not queued, 1 queued, 2 queue full, 3 offline
|
||||
int32 queued = 13;
|
||||
//You can specify a zone id if you want a message exclusively to one zone
|
||||
int32 zone_id = 14;
|
||||
}
|
||||
|
||||
message CommandMessage {
|
||||
string author = 1;
|
||||
string command = 2;
|
||||
repeated string params = 3;
|
||||
string result = 4;
|
||||
bytes payload = 5;
|
||||
}
|
||||
|
||||
//Daily Gain is a special system for tracking players progression in a daily snapshot.
|
||||
message DailyGain {
|
||||
int32 account_id = 1;
|
||||
int32 character_id = 2;
|
||||
int32 levels_gained = 3;
|
||||
int32 experience_gained = 4;
|
||||
int32 money_earned = 5;
|
||||
string identity = 6;
|
||||
}
|
||||
|
||||
//Entity is full of entity data.
|
||||
message Entity {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
int32 type = 3;
|
||||
int32 hp = 4;
|
||||
int32 level = 5;
|
||||
Position position = 6;
|
||||
int32 race = 7;
|
||||
int32 class = 8;
|
||||
}
|
||||
|
||||
message Entities {
|
||||
repeated Entity entities = 1;
|
||||
}
|
||||
|
||||
message Position {
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
float h = 4;
|
||||
}
|
||||
|
||||
message TextureProfile {
|
||||
Texture Head = 1;
|
||||
Texture Chest = 2;
|
||||
Texture Arms = 3;
|
||||
Texture Wrist = 4;
|
||||
Texture Hands = 5;
|
||||
Texture Legs = 6;
|
||||
Texture Feet = 7;
|
||||
Texture Primary = 8;
|
||||
Texture Secondary = 9;
|
||||
}
|
||||
|
||||
message Texture {
|
||||
uint32 material = 1;
|
||||
uint32 unknown1 = 2;
|
||||
uint32 EliteModel = 3;
|
||||
uint32 HerosForgeModel = 4;
|
||||
uint32 Unknown2 = 5;
|
||||
}
|
||||
|
||||
message TintProfile {
|
||||
Tint Head = 1;
|
||||
Tint Chest = 2;
|
||||
Tint Arms = 3;
|
||||
Tint Wrist = 4;
|
||||
Tint Hands = 5;
|
||||
Tint Legs = 6;
|
||||
Tint Feet = 7;
|
||||
Tint Primary = 8;
|
||||
Tint Secondary = 9;
|
||||
}
|
||||
|
||||
message Tint {
|
||||
uint32 Blue = 1;
|
||||
uint32 Green = 2;
|
||||
uint32 Red = 3;
|
||||
uint32 UseTint = 4; // if there's a tint, this is FF
|
||||
uint32 Color = 5;
|
||||
}
|
||||
|
||||
message Event {
|
||||
OpCode op = 1;
|
||||
bytes payload = 2;
|
||||
}
|
||||
|
||||
//OP_Death
|
||||
message DeathEvent {
|
||||
uint32 spawn_id = 1;
|
||||
uint32 killer_id = 2;
|
||||
uint32 corpse_id = 3;
|
||||
uint32 bind_zone_id = 4;
|
||||
uint32 spell_id = 5;
|
||||
uint32 attack_skill_id = 6;
|
||||
uint32 damage = 7;
|
||||
uint32 unknown028 = 8;
|
||||
}
|
||||
|
||||
//OP_Damage
|
||||
message DamageEvent {
|
||||
uint32 target = 1;
|
||||
uint32 source = 2;
|
||||
uint32 type = 3; //slashing, etc. 231 (0xE7) for spells
|
||||
uint32 spellid = 4;
|
||||
uint32 damage = 5;
|
||||
float force = 6;
|
||||
float meleepush_xy = 7; // see above notes in Action_Struct
|
||||
float meleepush_z = 8;
|
||||
}
|
||||
|
||||
//OP_Assist OP_Camp
|
||||
message EntityEvent {
|
||||
uint32 entity_id = 1; //source of event trigger.
|
||||
uint32 target_id = 2; //target or other/source/target entity
|
||||
}
|
||||
|
||||
//OP_ChannelMessage
|
||||
message ChannelMessageEvent {
|
||||
string target_name = 1; // Tell recipient
|
||||
string sender = 2; // The senders name (len might be wrong)
|
||||
uint32 language = 3; // Language
|
||||
uint32 chan_num = 4; // Channel
|
||||
uint32 cm_unknown4 = 5; // ***Placeholder
|
||||
uint32 skill_in_language = 6; // The players skill in this language? might be wrong
|
||||
string message = 7; // Variable length message
|
||||
}
|
||||
|
||||
//OP_WearChange
|
||||
message WearChangeEvent {
|
||||
uint32 spawn_id = 1;
|
||||
uint32 material = 2;
|
||||
uint32 unknown06 = 3;
|
||||
uint32 elite_material = 4; // 1 for Drakkin Elite Material
|
||||
uint32 hero_forge_model = 5; // New to VoA
|
||||
uint32 unknown18 = 6; // New to RoF
|
||||
Tint color = 7;
|
||||
uint32 wear_slot_id = 8;
|
||||
}
|
||||
|
||||
//OP_DeleteSpawn
|
||||
message DeleteSpawnEvent {
|
||||
uint32 spawn_id = 1; // Spawn ID to delete
|
||||
uint32 decay = 2; // 0 = vanish immediately, 1 = 'Decay' sparklies for corpses.
|
||||
}
|
||||
|
||||
//OP_MobHealth, OP_HPUpdate
|
||||
message HPEvent {
|
||||
uint32 spawn_id = 1;
|
||||
uint32 cur_hp = 2;
|
||||
uint32 max_hp = 3;
|
||||
}
|
||||
|
||||
//OP_ClientUpdate
|
||||
message PlayerPositionUpdateEvent {
|
||||
uint32 spawn_id = 1;
|
||||
int32 delta_heading = 2; // change in heading
|
||||
int32 x_pos = 3; // x coord
|
||||
int32 padding0002 = 4; // ***Placeholder
|
||||
int32 y_pos = 5; // y coord
|
||||
int32 animation = 6; // animation
|
||||
int32 padding0006 = 7; // ***Placeholder
|
||||
int32 z_pos = 8; // z coord
|
||||
int32 delta_y = 9; // change in y
|
||||
int32 delta_x = 10; // change in x
|
||||
int32 heading = 11; // heading
|
||||
int32 padding0014 = 12; // ***Placeholder
|
||||
int32 delta_z = 13; // change in z
|
||||
int32 padding0018 = 14; // ***Placeholder
|
||||
}
|
||||
|
||||
//OP_Animation
|
||||
message AnimationEvent {
|
||||
uint32 spawnid = 1;
|
||||
uint32 speed = 2;
|
||||
uint32 action = 3;
|
||||
}
|
||||
|
||||
//OP_ZoneEntry OP_NewSpawn
|
||||
message SpawnEvent {
|
||||
uint32 unknown0000= 1;
|
||||
uint32 gm = 2; // 0=no, 1=gm
|
||||
uint32 unknown0003 = 3;
|
||||
uint32 aaitle = 4; // 0=none, 1=general, 2=archtype, 3=class
|
||||
uint32 unknown0004 = 5;
|
||||
uint32 anon = 6; // 0=normal, 1=anon, 2=roleplay
|
||||
uint32 face = 7; // Face id for players
|
||||
string name = 8; // Player's Name
|
||||
uint32 deity = 9; // Player's Deity
|
||||
uint32 unknown0073 = 10;
|
||||
float size = 11; // Model size
|
||||
uint32 unknown0079 = 12;
|
||||
uint32 NPC = 13; // 0=player,1=npc,2=pc corpse,3=npc corpse,a
|
||||
uint32 invis = 14; // Invis (0=not, 1=invis)
|
||||
uint32 haircolor = 15; // Hair color
|
||||
uint32 curHp = 16; // Current hp %%% wrong
|
||||
uint32 max_hp = 17; // (name prolly wrong)takes on the value 100 for players, 100 or 110 for NPCs and 120 for PC corpses...
|
||||
uint32 findable = 18; // 0=can't be found, 1=can be found
|
||||
uint32 unknown0089 = 19;
|
||||
int32 deltaHeading = 20; // change in heading
|
||||
int32 x = 21; // x coord
|
||||
int32 padding0054 = 22; // ***Placeholder
|
||||
int32 y = 23; // y coord
|
||||
int32 animation = 24; // animation
|
||||
int32 padding0058 = 25; // ***Placeholder
|
||||
int32 z = 26; // z coord
|
||||
int32 deltaY = 27; // change in y
|
||||
int32 deltaX = 28; // change in x
|
||||
uint32 heading = 29; // heading
|
||||
int32 padding0066 = 30; // ***Placeholder
|
||||
int32 deltaZ = 31; // change in z
|
||||
int32 padding0070 = 32; // ***Placeholder
|
||||
uint32 eyecolor1 = 33; // Player's left eye color
|
||||
uint32 unknown0115 = 34; // Was [24]
|
||||
uint32 StandState = 35; // stand state for SoF+ 0x64 for normal animation
|
||||
uint32 drakkin_heritage = 36; // Added for SoF
|
||||
uint32 drakkin_tattoo = 37; // Added for SoF
|
||||
uint32 drakkin_details = 38; // Added for SoF
|
||||
uint32 showhelm = 39; // 0=no, 1=yes
|
||||
uint32 unknown0140 = 40;
|
||||
uint32 is_npc = 41; // 0=no, 1=yes
|
||||
uint32 hairstyle = 42; // Hair style
|
||||
uint32 beard = 43; // Beard style (not totally, sure but maybe!)
|
||||
uint32 unknown0147 = 44;
|
||||
uint32 level = 45; // Spawn Level
|
||||
uint32 PlayerState = 46; // Controls animation stuff // None = 0, Open = 1, WeaponSheathed = 2, Aggressive = 4, ForcedAggressive = 8, InstrumentEquipped = 16, Stunned = 32, PrimaryWeaponEquipped = 64, SecondaryWeaponEquipped = 128
|
||||
uint32 beardcolor = 47; // Beard color
|
||||
string suffix = 48; // Player's suffix (of Veeshan, etc.)
|
||||
uint32 petOwnerId = 49; // If this is a pet, the spawn id of owner
|
||||
uint32 guildrank = 50; // 0=normal, 1=officer, 2=leader
|
||||
uint32 unknown0194 = 51;
|
||||
TextureProfile equipment = 52;
|
||||
float runspeed = 53; // Speed when running
|
||||
uint32 afk = 54; // 0=no, 1=afk
|
||||
uint32 guildID = 55; // Current guild
|
||||
string title = 56; // Title
|
||||
uint32 unknown0274 = 57; // non-zero prefixes name with '!'
|
||||
uint32 set_to_0xFF = 58; // ***Placeholder (all ff)
|
||||
uint32 helm = 59; // Helm texture
|
||||
uint32 race = 60; // Spawn race
|
||||
uint32 unknown0288 = 61;
|
||||
string lastName = 62; // Player's Lastname
|
||||
float walkspeed = 63; // Speed when walking
|
||||
uint32 unknown0328 = 64;
|
||||
uint32 is_pet = 65; // 0=no, 1=yes
|
||||
uint32 light = 66; // Spawn's lightsource %%% wrong
|
||||
uint32 class_ = 67; // Player's class
|
||||
uint32 eyecolor2 = 68; // Left eye color
|
||||
uint32 flymode = 69;
|
||||
uint32 gender = 70; // Gender (0=male, 1=female)
|
||||
uint32 bodytype = 71; // Bodytype
|
||||
uint32 unknown0336 = 72;
|
||||
//union
|
||||
uint32 equip_chest2 = 73; // Second place in packet for chest texture (usually 0xFF in live packets) // Not sure why there are 2 of them, but it effects chest texture!
|
||||
uint32 mount_color = 74; // drogmor: 0=white, 1=black, 2=green, 3=red horse: 0=brown, 1=white, 2=black, 3=tan
|
||||
//endunion
|
||||
uint32 spawnId = 75; // Spawn Id
|
||||
uint32 unknown0344 = 76;
|
||||
uint32 IsMercenary = 77;
|
||||
TintProfile equipment_tint = 78;
|
||||
uint32 lfg = 79; // 0=off, 1=lfg on
|
||||
bool DestructibleObject = 80; // Only used to flag as a destrible object
|
||||
string DestructibleModel = 82; // Model of the Destructible Object - Required - Seen "DEST_TNT_G"
|
||||
string DestructibleName2 = 83; // Secondary name - Not Required - Seen "a_tent"
|
||||
string DestructibleString = 84; // Unknown - Not Required - Seen "ZoneActor_01186"
|
||||
uint32 DestructibleAppearance = 85; // Damage Appearance
|
||||
uint32 DestructibleUnk1 = 86;
|
||||
uint32 DestructibleID1 = 87;
|
||||
uint32 DestructibleID2 = 88;
|
||||
uint32 DestructibleID3 = 89;
|
||||
uint32 DestructibleID4 = 90;
|
||||
uint32 DestructibleUnk2 = 91;
|
||||
uint32 DestructibleUnk3 = 92;
|
||||
uint32 DestructibleUnk4 = 93;
|
||||
uint32 DestructibleUnk5 = 94;
|
||||
uint32 DestructibleUnk6 = 95;
|
||||
uint32 DestructibleUnk7 = 96;
|
||||
uint32 DestructibleUnk8 = 97;
|
||||
uint32 DestructibleUnk9 = 98;
|
||||
bool targetable_with_hotkey = 99;
|
||||
bool show_name= 100;
|
||||
}
|
||||
|
||||
enum OpCode {
|
||||
//option allow_alias = true;
|
||||
OP_Unknown = 0;
|
||||
OP_ExploreUnknown = 1;
|
||||
OP_0x0193 = 2;
|
||||
OP_0x0347 = 3;
|
||||
OP_AAAction = 4;
|
||||
OP_AAExpUpdate = 5;
|
||||
OP_AcceptNewTask = 6;
|
||||
OP_AckPacket = 7;
|
||||
OP_Action = 8;
|
||||
OP_Action2 = 9;
|
||||
OP_AddNimbusEffect = 10;
|
||||
OP_AdventureData = 11;
|
||||
OP_AdventureDetails = 12;
|
||||
OP_AdventureFinish = 13;
|
||||
OP_AdventureInfo = 14;
|
||||
OP_AdventureInfoRequest = 15;
|
||||
OP_AdventureLeaderboardReply = 16;
|
||||
OP_AdventureLeaderboardRequest = 17;
|
||||
OP_AdventureMerchantPurchase = 18;
|
||||
OP_AdventureMerchantRequest = 19;
|
||||
OP_AdventureMerchantResponse = 20;
|
||||
OP_AdventureMerchantSell = 21;
|
||||
OP_AdventurePointsUpdate = 22;
|
||||
OP_AdventureRequest = 23;
|
||||
OP_AdventureStatsReply = 24;
|
||||
OP_AdventureStatsRequest = 25;
|
||||
OP_AdventureUpdate = 26;
|
||||
OP_AggroMeterLockTarget = 27;
|
||||
OP_AggroMeterTargetInfo = 28;
|
||||
OP_AggroMeterUpdate = 29;
|
||||
OP_AltCurrency = 30;
|
||||
OP_AltCurrencyMerchantReply = 31;
|
||||
OP_AltCurrencyMerchantRequest = 32;
|
||||
OP_AltCurrencyPurchase = 33;
|
||||
OP_AltCurrencyReclaim = 34;
|
||||
OP_AltCurrencySell = 35;
|
||||
OP_AltCurrencySellSelection = 36;
|
||||
OP_Animation = 37; //supported
|
||||
OP_AnnoyingZoneUnknown = 38;
|
||||
OP_ApplyPoison = 39;
|
||||
OP_ApproveName = 40;
|
||||
OP_ApproveWorld = 41;
|
||||
OP_ApproveZone = 42;
|
||||
OP_Assist = 43; //supported
|
||||
OP_AssistGroup = 44;
|
||||
OP_AugmentInfo = 45;
|
||||
OP_AugmentItem = 46;
|
||||
OP_AutoAttack = 47;
|
||||
OP_AutoAttack2 = 48;
|
||||
OP_AutoFire = 49;
|
||||
OP_Bandolier = 50;
|
||||
OP_BankerChange = 51;
|
||||
OP_Barter = 52;
|
||||
OP_Bazaar = 53;
|
||||
OP_BazaarInspect = 54;
|
||||
OP_BazaarSearch = 55;
|
||||
OP_BecomeCorpse = 56;
|
||||
OP_BecomeTrader = 57;
|
||||
OP_Begging = 58;
|
||||
OP_BeginCast = 59;
|
||||
OP_Bind_Wound = 60;
|
||||
OP_BlockedBuffs = 61;
|
||||
OP_BoardBoat = 62;
|
||||
OP_Buff = 63;
|
||||
OP_BuffCreate = 64;
|
||||
OP_BuffRemoveRequest = 65;
|
||||
OP_Bug = 66;
|
||||
OP_CameraEffect = 67;
|
||||
OP_Camp = 68; //supported
|
||||
OP_CancelSneakHide = 69;
|
||||
OP_CancelTask = 70;
|
||||
OP_CancelTrade = 71;
|
||||
OP_CastSpell = 72;
|
||||
OP_ChangeSize = 73;
|
||||
OP_ChannelMessage = 74;
|
||||
OP_CharacterCreate = 75;
|
||||
OP_CharacterCreateRequest = 76;
|
||||
OP_CharInventory = 77;
|
||||
OP_Charm = 78;
|
||||
OP_ChatMessage = 79; //used by lua
|
||||
OP_ClearAA = 80;
|
||||
OP_ClearBlockedBuffs = 81;
|
||||
OP_ClearLeadershipAbilities = 82;
|
||||
OP_ClearNPCMarks = 83;
|
||||
OP_ClearObject = 84;
|
||||
OP_ClearSurname = 85;
|
||||
OP_ClickDoor = 86;
|
||||
OP_ClickObject = 87;
|
||||
OP_ClickObjectAction = 88;
|
||||
OP_ClientError = 89;
|
||||
OP_ClientReady = 90;
|
||||
OP_ClientTimeStamp = 91;
|
||||
OP_ClientUpdate = 92; //supported
|
||||
OP_CloseContainer = 93;
|
||||
OP_CloseTributeMaster = 94;
|
||||
OP_ColoredText = 95;
|
||||
OP_CombatAbility = 96;
|
||||
OP_Command = 97;
|
||||
OP_CompletedTasks = 98;
|
||||
OP_ConfirmDelete = 99;
|
||||
OP_Consent = 100;
|
||||
OP_ConsentDeny = 101;
|
||||
OP_ConsentResponse = 102;
|
||||
OP_Consider = 103;
|
||||
OP_ConsiderCorpse = 104;
|
||||
OP_Consume = 105;
|
||||
OP_ControlBoat = 106;
|
||||
OP_CorpseDrag = 107;
|
||||
OP_CorpseDrop = 108;
|
||||
OP_CrashDump = 109;
|
||||
OP_CrystalCountUpdate = 110;
|
||||
OP_CrystalCreate = 111;
|
||||
OP_CrystalReclaim = 112;
|
||||
OP_CustomTitles = 113;
|
||||
OP_Damage = 114;
|
||||
OP_Death = 115;
|
||||
OP_DelegateAbility = 116;
|
||||
OP_DeleteCharacter = 117;
|
||||
OP_DeleteCharge = 118;
|
||||
OP_DeleteItem = 119;
|
||||
OP_DeletePetition = 120;
|
||||
OP_DeleteSpawn = 121; //supported
|
||||
OP_DeleteSpell = 122;
|
||||
OP_DenyResponse = 123;
|
||||
OP_Disarm = 124;
|
||||
OP_DisarmTraps = 125;
|
||||
OP_DisciplineTimer = 126;
|
||||
OP_DisciplineUpdate = 127;
|
||||
OP_DiscordMerchantInventory = 128;
|
||||
OP_DoGroupLeadershipAbility = 129;
|
||||
OP_DuelResponse = 130;
|
||||
OP_DuelResponse2 = 131;
|
||||
OP_DumpName = 132;
|
||||
OP_Dye = 133;
|
||||
OP_DynamicWall = 134;
|
||||
OP_DzAddPlayer = 135;
|
||||
OP_DzChooseZone = 136;
|
||||
OP_DzCompass = 137;
|
||||
OP_DzExpeditionEndsWarning = 138;
|
||||
OP_DzExpeditionInfo = 139;
|
||||
OP_DzExpeditionList = 140;
|
||||
OP_DzJoinExpeditionConfirm = 141;
|
||||
OP_DzJoinExpeditionReply = 142;
|
||||
OP_DzLeaderStatus = 143;
|
||||
OP_DzListTimers = 144;
|
||||
OP_DzMakeLeader = 145;
|
||||
OP_DzMemberList = 146;
|
||||
OP_DzMemberStatus = 147;
|
||||
OP_DzPlayerList = 148;
|
||||
OP_DzQuit = 149;
|
||||
OP_DzRemovePlayer = 150;
|
||||
OP_DzSwapPlayer = 151;
|
||||
OP_Emote = 152;
|
||||
OP_EndLootRequest = 153;
|
||||
OP_EnduranceUpdate = 154;
|
||||
OP_EnterChat = 155;
|
||||
OP_EnterWorld = 156;
|
||||
OP_EnvDamage = 157;
|
||||
OP_ExpansionInfo = 158;
|
||||
OP_ExpUpdate = 159;
|
||||
OP_FaceChange = 160;
|
||||
OP_Feedback = 161;
|
||||
OP_FeignDeath = 162;
|
||||
OP_FellowshipUpdate = 163;
|
||||
OP_FindPersonReply = 164;
|
||||
OP_FindPersonRequest = 165;
|
||||
OP_FinishTrade = 166;
|
||||
OP_FinishWindow = 167;
|
||||
OP_FinishWindow2 = 168;
|
||||
OP_Fishing = 169;
|
||||
OP_Fling = 170;
|
||||
OP_FloatListThing = 171;
|
||||
OP_Forage = 172;
|
||||
OP_ForceFindPerson = 173;
|
||||
OP_FormattedMessage = 174;
|
||||
OP_FriendsWho = 175;
|
||||
OP_GetGuildMOTD = 176;
|
||||
OP_GetGuildMOTDReply = 177;
|
||||
OP_GetGuildsList = 178;
|
||||
OP_GiveMoney = 179;
|
||||
OP_GMApproval = 180;
|
||||
OP_GMBecomeNPC = 181;
|
||||
OP_GMDelCorpse = 182;
|
||||
OP_GMEmoteZone = 183;
|
||||
OP_GMEndTraining = 184;
|
||||
OP_GMEndTrainingResponse = 185;
|
||||
OP_GMFind = 186;
|
||||
OP_GMGoto = 187;
|
||||
OP_GMHideMe = 188;
|
||||
OP_GMKick = 189;
|
||||
OP_GMKill = 190;
|
||||
OP_GMLastName = 191;
|
||||
OP_GMNameChange = 192;
|
||||
OP_GMSearchCorpse = 193;
|
||||
OP_GMServers = 194;
|
||||
OP_GMSummon = 195;
|
||||
OP_GMToggle = 196;
|
||||
OP_GMTraining = 197;
|
||||
OP_GMTrainSkill = 198;
|
||||
OP_GMTrainSkillConfirm = 199;
|
||||
OP_GMZoneRequest = 200;
|
||||
OP_GMZoneRequest2 = 201;
|
||||
OP_GroundSpawn = 202;
|
||||
OP_GroupAcknowledge = 203;
|
||||
OP_GroupCancelInvite = 204;
|
||||
OP_GroupDelete = 205;
|
||||
OP_GroupDisband = 206;
|
||||
OP_GroupDisbandOther = 207;
|
||||
OP_GroupDisbandYou = 208;
|
||||
OP_GroupFollow = 209;
|
||||
OP_GroupFollow2 = 210;
|
||||
OP_GroupInvite = 211;
|
||||
OP_GroupInvite2 = 212;
|
||||
OP_GroupLeaderChange = 213;
|
||||
OP_GroupLeadershipAAUpdate = 214;
|
||||
OP_GroupMakeLeader = 215;
|
||||
OP_GroupMentor = 216;
|
||||
OP_GroupRoles = 217;
|
||||
OP_GroupUpdate = 218;
|
||||
OP_GroupUpdateB = 219;
|
||||
OP_GroupUpdateLeaderAA = 220;
|
||||
OP_GuildBank = 221;
|
||||
OP_GuildBankItemList = 222;
|
||||
OP_GuildCreate = 223;
|
||||
OP_GuildDelete = 224;
|
||||
OP_GuildDemote = 225;
|
||||
OP_GuildInvite = 226;
|
||||
OP_GuildInviteAccept = 227;
|
||||
OP_GuildLeader = 228;
|
||||
OP_GuildManageAdd = 229;
|
||||
OP_GuildManageBanker = 230;
|
||||
OP_GuildManageRemove = 231;
|
||||
OP_GuildManageStatus = 232;
|
||||
OP_GuildMemberLevelUpdate = 233;
|
||||
OP_GuildMemberList = 234;
|
||||
OP_GuildMemberUpdate = 235;
|
||||
OP_GuildMOTD = 236;
|
||||
OP_GuildPeace = 237;
|
||||
OP_GuildPromote = 238;
|
||||
OP_GuildPublicNote = 239;
|
||||
OP_GuildRemove = 240;
|
||||
OP_GuildsList = 241;
|
||||
OP_GuildStatus = 242;
|
||||
OP_GuildTributeInfo = 243;
|
||||
OP_GuildUpdateURLAndChannel = 244;
|
||||
OP_GuildWar = 245;
|
||||
OP_Heartbeat = 246;
|
||||
OP_Hide = 247;
|
||||
OP_HideCorpse = 248;
|
||||
OP_HPUpdate = 249; //supported
|
||||
OP_Illusion = 250;
|
||||
OP_IncreaseStats = 251;
|
||||
OP_InitialHPUpdate = 252;
|
||||
OP_InitialMobHealth = 253;
|
||||
OP_InspectAnswer = 254;
|
||||
OP_InspectBuffs = 255;
|
||||
OP_InspectMessageUpdate = 256;
|
||||
OP_InspectRequest = 257;
|
||||
OP_InstillDoubt = 258;
|
||||
OP_InterruptCast = 259;
|
||||
OP_ItemLinkClick = 260;
|
||||
OP_ItemLinkResponse = 261;
|
||||
OP_ItemLinkText = 262;
|
||||
OP_ItemName = 263;
|
||||
OP_ItemPacket = 264;
|
||||
OP_ItemPreview = 265;
|
||||
OP_ItemRecastDelay = 266;
|
||||
OP_ItemVerifyReply = 267;
|
||||
OP_ItemVerifyRequest = 268;
|
||||
OP_ItemViewUnknown = 269;
|
||||
OP_Jump = 270;
|
||||
OP_KeyRing = 271;
|
||||
OP_KnowledgeBase = 272;
|
||||
OP_LDoNButton = 273;
|
||||
OP_LDoNDisarmTraps = 274;
|
||||
OP_LDoNInspect = 275;
|
||||
OP_LDoNOpen = 276;
|
||||
OP_LDoNPickLock = 277;
|
||||
OP_LDoNSenseTraps = 278;
|
||||
OP_LeadershipExpToggle = 279;
|
||||
OP_LeadershipExpUpdate = 280;
|
||||
OP_LeaveAdventure = 281;
|
||||
OP_LeaveBoat = 282;
|
||||
OP_LevelAppearance = 283;
|
||||
OP_LevelUpdate = 284;
|
||||
OP_LFGAppearance = 285;
|
||||
OP_LFGCommand = 286;
|
||||
OP_LFGGetMatchesRequest = 287;
|
||||
OP_LFGGetMatchesResponse = 288;
|
||||
OP_LFGResponse = 289;
|
||||
OP_LFGuild = 290;
|
||||
OP_LFPCommand = 291;
|
||||
OP_LFPGetMatchesRequest = 292;
|
||||
OP_LFPGetMatchesResponse = 293;
|
||||
OP_LinkedReuse = 294;
|
||||
OP_LoadSpellSet = 295;
|
||||
OP_LocInfo = 296;
|
||||
OP_LockoutTimerInfo = 297;
|
||||
OP_Login = 298;
|
||||
OP_LoginAccepted = 299;
|
||||
OP_LoginComplete = 300;
|
||||
OP_LoginUnknown1 = 301;
|
||||
OP_LoginUnknown2 = 302;
|
||||
OP_Logout = 303;
|
||||
OP_LogoutReply = 304;
|
||||
OP_LogServer = 305;
|
||||
OP_LootComplete = 306;
|
||||
OP_LootItem = 307;
|
||||
OP_LootRequest = 308;
|
||||
OP_ManaChange = 309;
|
||||
OP_ManaUpdate = 310;
|
||||
OP_MarkNPC = 311;
|
||||
OP_Marquee = 312;
|
||||
OP_MemorizeSpell = 313;
|
||||
OP_Mend = 314;
|
||||
OP_MendHPUpdate = 315;
|
||||
OP_MercenaryAssign = 316;
|
||||
OP_MercenaryCommand = 317;
|
||||
OP_MercenaryDataRequest = 318;
|
||||
OP_MercenaryDataResponse = 319;
|
||||
OP_MercenaryDataUpdate = 320;
|
||||
OP_MercenaryDataUpdateRequest = 321;
|
||||
OP_MercenaryDismiss = 322;
|
||||
OP_MercenaryHire = 323;
|
||||
OP_MercenarySuspendRequest = 324;
|
||||
OP_MercenarySuspendResponse = 325;
|
||||
OP_MercenaryTimer = 326;
|
||||
OP_MercenaryTimerRequest = 327;
|
||||
OP_MercenaryUnknown1 = 328;
|
||||
OP_MercenaryUnsuspendResponse = 329;
|
||||
OP_MobEnduranceUpdate = 330;
|
||||
OP_MobHealth = 331; //supported
|
||||
OP_MobManaUpdate = 332;
|
||||
OP_MobRename = 333;
|
||||
OP_MobUpdate = 334; // not used anymore, here for lecacy reasons eqextractor
|
||||
OP_MoneyOnCorpse = 335;
|
||||
OP_MoneyUpdate = 336;
|
||||
OP_MOTD = 337;
|
||||
OP_MoveCoin = 338;
|
||||
OP_MoveDoor = 339;
|
||||
OP_MoveItem = 340;
|
||||
OP_MoveLogDisregard = 341;
|
||||
OP_MoveLogRequest = 342;
|
||||
OP_MultiLineMsg = 343;
|
||||
OP_NewSpawn = 344; //supported
|
||||
OP_NewTitlesAvailable = 345;
|
||||
OP_NewZone = 346;
|
||||
OP_OnLevelMessage = 347;
|
||||
OP_OpenContainer = 348;
|
||||
OP_OpenDiscordMerchant = 349;
|
||||
OP_OpenGuildTributeMaster = 350;
|
||||
OP_OpenInventory = 351;
|
||||
OP_OpenNewTasksWindow = 352;
|
||||
OP_OpenTributeMaster = 353;
|
||||
OP_PDeletePetition = 354;
|
||||
OP_PetBuffWindow = 355;
|
||||
OP_PetCommands = 356;
|
||||
OP_PetCommandState = 357;
|
||||
OP_PetHoTT = 358;
|
||||
OP_Petition = 359;
|
||||
OP_PetitionBug = 360;
|
||||
OP_PetitionCheckIn = 361;
|
||||
OP_PetitionCheckout = 362;
|
||||
OP_PetitionCheckout2 = 363;
|
||||
OP_PetitionDelete = 364;
|
||||
OP_PetitionQue = 365;
|
||||
OP_PetitionRefresh = 366;
|
||||
OP_PetitionResolve = 367;
|
||||
OP_PetitionSearch = 368;
|
||||
OP_PetitionSearchResults = 369;
|
||||
OP_PetitionSearchText = 370;
|
||||
OP_PetitionUnCheckout = 371;
|
||||
OP_PetitionUpdate = 372;
|
||||
OP_PickPocket = 373;
|
||||
OP_PlayerProfile = 374;
|
||||
OP_PlayerStateAdd = 375;
|
||||
OP_PlayerStateRemove = 376;
|
||||
OP_PlayEverquestRequest = 377;
|
||||
OP_PlayEverquestResponse = 378;
|
||||
OP_PlayMP3 = 379;
|
||||
OP_Poll = 380;
|
||||
OP_PollResponse = 381;
|
||||
OP_PopupResponse = 382;
|
||||
OP_PostEnterWorld = 383; //this is really OP_WorldAccessGrant
|
||||
OP_PotionBelt = 384;
|
||||
OP_PreLogoutReply = 385;
|
||||
OP_PurchaseLeadershipAA = 386;
|
||||
OP_PVPLeaderBoardDetailsReply = 387;
|
||||
OP_PVPLeaderBoardDetailsRequest = 388;
|
||||
OP_PVPLeaderBoardReply = 389;
|
||||
OP_PVPLeaderBoardRequest = 390;
|
||||
OP_PVPStats = 391;
|
||||
OP_QueryResponseThing = 392;
|
||||
OP_RaidInvite = 393;
|
||||
OP_RaidJoin = 394;
|
||||
OP_RaidUpdate = 395;
|
||||
OP_RandomNameGenerator = 396;
|
||||
OP_RandomReply = 397;
|
||||
OP_RandomReq = 398;
|
||||
OP_ReadBook = 399;
|
||||
OP_RecipeAutoCombine = 400;
|
||||
OP_RecipeDetails = 401;
|
||||
OP_RecipeReply = 402;
|
||||
OP_RecipesFavorite = 403;
|
||||
OP_RecipesSearch = 404;
|
||||
OP_ReclaimCrystals = 405;
|
||||
OP_ReloadUI = 406;
|
||||
OP_RemoveAllDoors = 407;
|
||||
OP_RemoveBlockedBuffs = 408;
|
||||
OP_RemoveNimbusEffect = 409;
|
||||
OP_RemoveTrap = 410;
|
||||
OP_Report = 411;
|
||||
OP_ReqClientSpawn = 412;
|
||||
OP_ReqNewZone = 413;
|
||||
OP_RequestClientZoneChange = 414;
|
||||
OP_RequestDuel = 415;
|
||||
OP_RequestKnowledgeBase = 416;
|
||||
OP_RequestTitles = 417;
|
||||
OP_RespawnWindow = 418;
|
||||
OP_RespondAA = 419;
|
||||
OP_RestState = 420;
|
||||
OP_Rewind = 421;
|
||||
OP_RezzAnswer = 422;
|
||||
OP_RezzComplete = 423;
|
||||
OP_RezzRequest = 424;
|
||||
OP_Sacrifice = 425;
|
||||
OP_SafeFallSuccess = 426;
|
||||
OP_SafePoint = 427;
|
||||
OP_Save = 428;
|
||||
OP_SaveOnZoneReq = 429;
|
||||
OP_SelectTribute = 430;
|
||||
OP_SendAAStats = 431;
|
||||
OP_SendAATable = 432;
|
||||
OP_SendCharInfo = 433;
|
||||
OP_SendExpZonein = 434;
|
||||
OP_SendFindableNPCs = 435;
|
||||
OP_SendGuildTributes = 436;
|
||||
OP_SendLoginInfo = 437;
|
||||
OP_SendMaxCharacters = 438;
|
||||
OP_SendMembership = 439;
|
||||
OP_SendMembershipDetails = 440;
|
||||
OP_SendSystemStats = 441;
|
||||
OP_SendTitleList = 442;
|
||||
OP_SendTributes = 443;
|
||||
OP_SendZonepoints = 444;
|
||||
OP_SenseHeading = 445;
|
||||
OP_SenseTraps = 446;
|
||||
OP_ServerListRequest = 447;
|
||||
OP_ServerListResponse = 448;
|
||||
OP_SessionReady = 449;
|
||||
OP_SetChatServer = 450;
|
||||
OP_SetChatServer2 = 451;
|
||||
OP_SetGroupTarget = 452;
|
||||
OP_SetGuildMOTD = 453;
|
||||
OP_SetGuildRank = 454;
|
||||
OP_SetRunMode = 455;
|
||||
OP_SetServerFilter = 456;
|
||||
OP_SetStartCity = 457;
|
||||
OP_SetTitle = 458;
|
||||
OP_SetTitleReply = 459;
|
||||
OP_Shielding = 460;
|
||||
OP_ShopDelItem = 461;
|
||||
OP_ShopEnd = 462;
|
||||
OP_ShopEndConfirm = 463;
|
||||
OP_ShopItem = 464;
|
||||
OP_ShopPlayerBuy = 465;
|
||||
OP_ShopPlayerSell = 466;
|
||||
OP_ShopRequest = 467;
|
||||
OP_SimpleMessage = 468;
|
||||
OP_SkillUpdate = 469;
|
||||
OP_Sneak = 470;
|
||||
OP_Some3ByteHPUpdate = 471;
|
||||
OP_Some6ByteHPUpdate = 472;
|
||||
OP_SomeItemPacketMaybe = 473;
|
||||
OP_Sound = 474;
|
||||
OP_SpawnAppearance = 475;
|
||||
OP_SpawnDoor = 476;
|
||||
OP_SpawnPositionUpdate = 477;
|
||||
OP_SpecialMesg = 478;
|
||||
OP_SpellEffect = 479;
|
||||
OP_Split = 480;
|
||||
OP_Stamina = 481;
|
||||
OP_Stun = 482;
|
||||
OP_Surname = 483;
|
||||
OP_SwapSpell = 484;
|
||||
OP_TargetBuffs = 485;
|
||||
OP_TargetCommand = 486;
|
||||
OP_TargetHoTT = 487;
|
||||
OP_TargetMouse = 488;
|
||||
OP_TargetReject = 489;
|
||||
OP_TaskActivity = 490;
|
||||
OP_TaskActivityComplete = 491;
|
||||
OP_TaskDescription = 492;
|
||||
OP_TaskHistoryReply = 493;
|
||||
OP_TaskHistoryRequest = 494;
|
||||
OP_TaskMemberList = 495;
|
||||
OP_Taunt = 496;
|
||||
OP_TestBuff = 497;
|
||||
OP_TGB = 498;
|
||||
OP_TimeOfDay = 499;
|
||||
OP_Track = 500;
|
||||
OP_TrackTarget = 501;
|
||||
OP_TrackUnknown = 502;
|
||||
OP_TradeAcceptClick = 503;
|
||||
OP_TradeBusy = 504;
|
||||
OP_TradeCoins = 505;
|
||||
OP_TradeMoneyUpdate = 506;
|
||||
OP_Trader = 507;
|
||||
OP_TraderBuy = 508;
|
||||
OP_TraderDelItem = 509;
|
||||
OP_TradeRequest = 510;
|
||||
OP_TradeRequestAck = 511;
|
||||
OP_TraderItemUpdate = 512;
|
||||
OP_TraderShop = 513;
|
||||
OP_TradeSkillCombine = 514;
|
||||
OP_Translocate = 515;
|
||||
OP_TributeInfo = 516;
|
||||
OP_TributeItem = 517;
|
||||
OP_TributeMoney = 518;
|
||||
OP_TributeNPC = 519;
|
||||
OP_TributePointUpdate = 520;
|
||||
OP_TributeTimer = 521;
|
||||
OP_TributeToggle = 522;
|
||||
OP_TributeUpdate = 523;
|
||||
OP_Untargetable = 524;
|
||||
OP_UpdateAA = 525;
|
||||
OP_UpdateAura = 526;
|
||||
OP_UpdateLeadershipAA = 527;
|
||||
OP_VetClaimReply = 528;
|
||||
OP_VetClaimRequest = 529;
|
||||
OP_VetRewardsAvaliable = 530;
|
||||
OP_VoiceMacroIn = 531;
|
||||
OP_VoiceMacroOut = 532;
|
||||
OP_WeaponEquip1 = 533;
|
||||
OP_WearChange = 534; //supported
|
||||
OP_Weather = 535;
|
||||
OP_Weblink = 536;
|
||||
OP_WhoAllRequest = 537;
|
||||
OP_WhoAllResponse = 538;
|
||||
OP_World_Client_CRC1 = 539;
|
||||
OP_World_Client_CRC2 = 540;
|
||||
OP_WorldClientReady = 541;
|
||||
OP_WorldComplete = 542;
|
||||
OP_WorldLogout = 543;
|
||||
OP_WorldObjectsSent = 544;
|
||||
OP_WorldUnknown001 = 545;
|
||||
OP_XTargetAutoAddHaters = 546;
|
||||
OP_XTargetOpen = 547;
|
||||
OP_XTargetOpenResponse = 548;
|
||||
OP_XTargetRequest = 549;
|
||||
OP_XTargetResponse = 550;
|
||||
OP_YellForHelp = 551;
|
||||
OP_ZoneChange = 552;
|
||||
OP_ZoneComplete = 553;
|
||||
OP_ZoneEntry = 554; //supported
|
||||
OP_ZoneGuildList = 555;
|
||||
OP_ZoneInUnknown = 556;
|
||||
OP_ZonePlayerToBind = 557;
|
||||
OP_ZoneServerInfo = 558;
|
||||
OP_ZoneServerReady = 559;
|
||||
OP_ZoneSpawns = 560;
|
||||
OP_ZoneUnavail = 561;
|
||||
OP_ResetAA = 562;
|
||||
OP_Buddy = 563;
|
||||
OP_ChannelAnnounceJoin = 564;
|
||||
OP_ChannelAnnounceLeave = 565;
|
||||
OP_Ignore = 566;
|
||||
OP_Mail = 567;
|
||||
OP_MailboxChange = 568;
|
||||
OP_MailDeliveryStatus = 569;
|
||||
OP_MailHeader = 570;
|
||||
OP_MailHeaderCount = 571;
|
||||
OP_MailLogin = 572;
|
||||
OP_MailNew = 573;
|
||||
OP_MailSendBody = 574;
|
||||
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
_chat_config=new queryservconfig;
|
||||
_config=_chat_config;
|
||||
|
||||
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(),"server");
|
||||
return _config->parseFile();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+143
-1
@@ -28,6 +28,10 @@
|
||||
extern Database database;
|
||||
extern uint32 ChatMessagesSent;
|
||||
|
||||
void ServerToClient45SayLink(std::string& clientSayLink, const std::string& serverSayLink);
|
||||
void ServerToClient50SayLink(std::string& clientSayLink, const std::string& serverSayLink);
|
||||
void ServerToClient55SayLink(std::string& clientSayLink, const std::string& serverSayLink);
|
||||
|
||||
ChatChannel::ChatChannel(std::string inName, std::string inOwner, std::string inPassword, bool inPermanent, int inMinimumStatus) :
|
||||
DeleteTimer(0) {
|
||||
|
||||
@@ -384,6 +388,8 @@ void ChatChannel::SendMessageToChannel(std::string Message, Client* Sender) {
|
||||
|
||||
if(!Sender) return;
|
||||
|
||||
std::string cv_messages[EQEmu::versions::ClientVersionCount];
|
||||
|
||||
ChatMessagesSent++;
|
||||
|
||||
LinkedListIterator<Client*> iterator(ClientsInChannel);
|
||||
@@ -398,7 +404,28 @@ void ChatChannel::SendMessageToChannel(std::string Message, Client* Sender) {
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Sending message to %s from %s",
|
||||
ChannelClient->GetName().c_str(), Sender->GetName().c_str());
|
||||
ChannelClient->SendChannelMessage(Name, Message, Sender);
|
||||
|
||||
if (cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())].length() == 0) {
|
||||
switch (ChannelClient->GetClientVersion()) {
|
||||
case EQEmu::versions::ClientVersion::Titanium:
|
||||
ServerToClient45SayLink(cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())], Message);
|
||||
break;
|
||||
case EQEmu::versions::ClientVersion::SoF:
|
||||
case EQEmu::versions::ClientVersion::SoD:
|
||||
case EQEmu::versions::ClientVersion::UF:
|
||||
ServerToClient50SayLink(cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())], Message);
|
||||
break;
|
||||
case EQEmu::versions::ClientVersion::RoF:
|
||||
ServerToClient55SayLink(cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())], Message);
|
||||
break;
|
||||
case EQEmu::versions::ClientVersion::RoF2:
|
||||
default:
|
||||
cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())] = Message;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ChannelClient->SendChannelMessage(Name, cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())], Sender);
|
||||
}
|
||||
|
||||
iterator.Advance();
|
||||
@@ -655,3 +682,118 @@ std::string CapitaliseName(std::string inString) {
|
||||
return NormalisedName;
|
||||
}
|
||||
|
||||
void ServerToClient45SayLink(std::string& clientSayLink, const std::string& serverSayLink) {
|
||||
if (serverSayLink.find('\x12') == std::string::npos) {
|
||||
clientSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= 56) {
|
||||
clientSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
|
||||
// Idx: 0 1 6 11 16 21 26 31 36 37 41 43 48 (Source)
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45)
|
||||
// Diff: ^^^^^ ^ ^^^^^
|
||||
|
||||
clientSayLink.push_back('\x12');
|
||||
clientSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
clientSayLink.append(segments[segment_iter].substr(36, 5));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
clientSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
clientSayLink.push_back('F');
|
||||
|
||||
clientSayLink.append(segments[segment_iter].substr(48));
|
||||
clientSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
clientSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ServerToClient50SayLink(std::string& clientSayLink, const std::string& serverSayLink) {
|
||||
if (serverSayLink.find('\x12') == std::string::npos) {
|
||||
clientSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= 56) {
|
||||
clientSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
|
||||
// Idx: 0 1 6 11 16 21 26 31 36 37 41 43 48 (Source)
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
clientSayLink.push_back('\x12');
|
||||
clientSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
clientSayLink.append(segments[segment_iter].substr(36, 5));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
clientSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
clientSayLink.push_back('F');
|
||||
|
||||
clientSayLink.append(segments[segment_iter].substr(43));
|
||||
clientSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
clientSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ServerToClient55SayLink(std::string& clientSayLink, const std::string& serverSayLink) {
|
||||
if (serverSayLink.find('\x12') == std::string::npos) {
|
||||
clientSayLink = serverSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= 56) {
|
||||
clientSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
|
||||
// Idx: 0 1 6 11 16 21 26 31 36 37 41 43 48 (Source)
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// RoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (55)
|
||||
// Diff: ^
|
||||
|
||||
clientSayLink.push_back('\x12');
|
||||
clientSayLink.append(segments[segment_iter].substr(0, 41));
|
||||
|
||||
if (segments[segment_iter][41] == '0')
|
||||
clientSayLink.push_back(segments[segment_iter][42]);
|
||||
else
|
||||
clientSayLink.push_back('F');
|
||||
|
||||
clientSayLink.append(segments[segment_iter].substr(43));
|
||||
clientSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
clientSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+51
-21
@@ -513,6 +513,7 @@ Client::Client(std::shared_ptr<EQStreamInterface> eqs) {
|
||||
GlobalChatLimiterTimer = new Timer(RuleI(Chat, IntervalDurationMS));
|
||||
|
||||
TypeOfConnection = ConnectionTypeUnknown;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Unknown;
|
||||
|
||||
UnderfootOrLater = false;
|
||||
}
|
||||
@@ -681,6 +682,7 @@ void Clientlist::Process()
|
||||
it = ClientChatConnections.erase(it);
|
||||
continue;
|
||||
}
|
||||
|
||||
++it;
|
||||
}
|
||||
}
|
||||
@@ -2134,34 +2136,62 @@ void Client::SetConnectionType(char c) {
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 'S':
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoF/SoD)");
|
||||
break;
|
||||
}
|
||||
case 'U':
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (Underfoot+)");
|
||||
break;
|
||||
}
|
||||
case 'M':
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeMail;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Mail (6.2 or Titanium client)");
|
||||
break;
|
||||
}
|
||||
case 'C':
|
||||
case EQEmu::versions::ucsTitaniumChat:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeChat;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Chat (6.2 or Titanium client)");
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Titanium;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Chat (Titanium)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsTitaniumMail:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeMail;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Titanium;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Mail (Titanium)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsSoFCombined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::SoF;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoF)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsSoDCombined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::SoD;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoD)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsUFCombined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::UF;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (Underfoot)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsRoFCombined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::RoF;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (RoF)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsRoF2Combined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::RoF2;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (RoF2)");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeUnknown;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Unknown;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is unknown.");
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -139,8 +139,11 @@ public:
|
||||
std::string MailBoxName();
|
||||
int GetMailBoxNumber() { return CurrentMailBox; }
|
||||
int GetMailBoxNumber(std::string CharacterName);
|
||||
|
||||
void SetConnectionType(char c);
|
||||
ConnectionType GetConnectionType() { return TypeOfConnection; }
|
||||
EQEmu::versions::ClientVersion GetClientVersion() { return ClientVersion_; }
|
||||
|
||||
inline bool IsMailConnection() { return (TypeOfConnection == ConnectionTypeMail) || (TypeOfConnection == ConnectionTypeCombined); }
|
||||
void SendNotification(int MailBoxNumber, std::string From, std::string Subject, int MessageID);
|
||||
void ChangeMailBox(int NewMailBox);
|
||||
@@ -167,7 +170,9 @@ private:
|
||||
Timer *GlobalChatLimiterTimer; //60 seconds
|
||||
int AttemptedMessages;
|
||||
bool ForceDisconnect;
|
||||
|
||||
ConnectionType TypeOfConnection;
|
||||
EQEmu::versions::ClientVersion ClientVersion_;
|
||||
bool UnderfootOrLater;
|
||||
};
|
||||
|
||||
@@ -183,7 +188,6 @@ public:
|
||||
void ProcessOPMailCommand(Client *c, std::string CommandString);
|
||||
|
||||
private:
|
||||
|
||||
EQ::Net::EQStreamManager *chatsf;
|
||||
|
||||
std::list<Client*> ClientChatConnections;
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public:
|
||||
_chat_config=new ucsconfig;
|
||||
_config=_chat_config;
|
||||
|
||||
return _config->ParseFile(EQEmuConfig::ConfigFile.c_str(),"server");
|
||||
return _config->parseFile();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+130
-1
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "../common/misc_functions.h"
|
||||
#include "../common/packet_functions.h"
|
||||
#include "../common/md5.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "worldserver.h"
|
||||
#include "clientlist.h"
|
||||
#include "ucsconfig.h"
|
||||
@@ -41,6 +42,10 @@ extern Database database;
|
||||
|
||||
void ProcessMailTo(Client *c, std::string from, std::string subject, std::string message);
|
||||
|
||||
void Client45ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink);
|
||||
void Client50ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink);
|
||||
void Client55ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink);
|
||||
|
||||
WorldServer::WorldServer()
|
||||
{
|
||||
m_connection.reset(new EQ::Net::ServertalkClient(Config->WorldIP, Config->WorldTCPPort, false, "UCS", Config->SharedKey));
|
||||
@@ -94,7 +99,26 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
|
||||
if (Message[0] == ';')
|
||||
{
|
||||
c->SendChannelMessageByNumber(Message.substr(1, std::string::npos));
|
||||
std::string new_message;
|
||||
switch (c->GetClientVersion()) {
|
||||
case EQEmu::versions::ClientVersion::Titanium:
|
||||
Client45ToServerSayLink(new_message, Message.substr(1, std::string::npos));
|
||||
break;
|
||||
case EQEmu::versions::ClientVersion::SoF:
|
||||
case EQEmu::versions::ClientVersion::SoD:
|
||||
case EQEmu::versions::ClientVersion::UF:
|
||||
Client50ToServerSayLink(new_message, Message.substr(1, std::string::npos));
|
||||
break;
|
||||
case EQEmu::versions::ClientVersion::RoF:
|
||||
Client55ToServerSayLink(new_message, Message.substr(1, std::string::npos));
|
||||
break;
|
||||
case EQEmu::versions::ClientVersion::RoF2:
|
||||
default:
|
||||
new_message = Message.substr(1, std::string::npos);
|
||||
break;
|
||||
}
|
||||
|
||||
c->SendChannelMessageByNumber(new_message);
|
||||
}
|
||||
else if (Message[0] == '[')
|
||||
{
|
||||
@@ -116,3 +140,108 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Client45ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) {
|
||||
if (clientSayLink.find('\x12') == std::string::npos) {
|
||||
serverSayLink = clientSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(clientSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= 45) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
|
||||
// Idx: 0 1 6 11 16 21 26 31 32 36 37 (Source)
|
||||
// 6.2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXXXXX (45)
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^^^^^ ^ ^^^^^
|
||||
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.push_back(segments[segment_iter][36]);
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(37));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Client50ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) {
|
||||
if (clientSayLink.find('\x12') == std::string::npos) {
|
||||
serverSayLink = clientSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(clientSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= 50) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
|
||||
// Idx: 0 1 6 11 16 21 26 31 32 36 37 42 (Source)
|
||||
// SoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (50)
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^^^^^ ^
|
||||
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 31));
|
||||
serverSayLink.append("00000");
|
||||
serverSayLink.append(segments[segment_iter].substr(31, 5));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.append(segments[segment_iter].substr(36));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Client55ToServerSayLink(std::string& serverSayLink, const std::string& clientSayLink) {
|
||||
if (clientSayLink.find('\x12') == std::string::npos) {
|
||||
serverSayLink = clientSayLink;
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(clientSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
if (segments[segment_iter].length() <= 55) {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
// TODO: log size mismatch error
|
||||
continue;
|
||||
}
|
||||
|
||||
// Idx: 0 1 6 11 16 21 26 31 36 37 41 42 47 (Source)
|
||||
// RoF: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX X XXXXX XXXXXXXX (55)
|
||||
// RoF2: X XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX X XXXX XX XXXXX XXXXXXXX (56)
|
||||
// Diff: ^
|
||||
|
||||
serverSayLink.push_back('\x12');
|
||||
serverSayLink.append(segments[segment_iter].substr(0, 41));
|
||||
serverSayLink.push_back('0');
|
||||
serverSayLink.append(segments[segment_iter].substr(41));
|
||||
serverSayLink.push_back('\x12');
|
||||
}
|
||||
else {
|
||||
serverSayLink.append(segments[segment_iter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"server": {
|
||||
"world": {
|
||||
"shortname": "setme",
|
||||
"longname": "I Forgot To Edit My Config"
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"server": {
|
||||
"zones": {
|
||||
"defaultstatus": "20",
|
||||
"ports": {
|
||||
"low": "7000",
|
||||
"high": "7100"
|
||||
}
|
||||
},
|
||||
"database": {
|
||||
"password": "eq",
|
||||
"db": "eq",
|
||||
"host": "127.0.0.1",
|
||||
"port": "3306",
|
||||
"username": "eq"
|
||||
},
|
||||
"world": {
|
||||
"shortname": "setme",
|
||||
"longname": "I Forgot To Edit My Config",
|
||||
"loginserver": {
|
||||
"password": "",
|
||||
"host": "login.eqemulator.net",
|
||||
"port": "5998",
|
||||
"account": ""
|
||||
},
|
||||
"tcp": {
|
||||
"port": "9000",
|
||||
"telnet": "disable",
|
||||
"ip": "127.0.0.1"
|
||||
},
|
||||
"key": "some long random string",
|
||||
"http": {
|
||||
"mimefile": "mime.types",
|
||||
"port": "9080",
|
||||
"enabled": "false"
|
||||
}
|
||||
},
|
||||
"mailserver": {
|
||||
"host": "channels.eqemulator.net",
|
||||
"port": "7778"
|
||||
},
|
||||
"chatserver": {
|
||||
"host": "channels.eqemulator.net",
|
||||
"port": "7778"
|
||||
},
|
||||
"qsdatabase": {
|
||||
"host": "127.0.0.1",
|
||||
"port": "3306",
|
||||
"username": "eq",
|
||||
"password": "eq",
|
||||
"db": "eq"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
//Parses perl scripts
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func main() {
|
||||
path := "../../../zone/embparser_api.cpp"
|
||||
err := readFile(path)
|
||||
if err != nil {
|
||||
log.Panicf("Failed to read file: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
type API struct {
|
||||
Function string
|
||||
Arguments []*Argument
|
||||
}
|
||||
|
||||
type Argument struct {
|
||||
Name string
|
||||
Type string
|
||||
API *API
|
||||
}
|
||||
|
||||
func readFile(path string) (err error) {
|
||||
inFile, err := os.Open(path)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "Failed to open file")
|
||||
}
|
||||
defer inFile.Close()
|
||||
scanner := bufio.NewScanner(inFile)
|
||||
scanner.Split(bufio.ScanLines)
|
||||
|
||||
arguments := map[string][]*Argument{}
|
||||
functions := []*API{}
|
||||
reg, err := regexp.Compile(`\]+|\[+|\?+|[...]+`)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "Failed to compile regex")
|
||||
return
|
||||
}
|
||||
regType, err := regexp.Compile(`(unsigned long|long|int32|bool|uint[0-9]+|int|auto|float|unsigned int|char[ \*]).+([. a-zA-Z]+=)`)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "Failed to compile type regex")
|
||||
return
|
||||
}
|
||||
|
||||
lastArguments := []*Argument{}
|
||||
lastAPI := &API{}
|
||||
lineNum := 0
|
||||
for scanner.Scan() {
|
||||
lineNum++
|
||||
key := ""
|
||||
line := scanner.Text()
|
||||
if len(line) < 1 {
|
||||
continue
|
||||
}
|
||||
if len(lastArguments) > 0 { //existing args to parse
|
||||
for i, argument := range lastArguments {
|
||||
key = fmt.Sprintf("ST(%d)", i)
|
||||
if strings.Contains(line, key) {
|
||||
//We found a definition argument line
|
||||
if argument.Type != "" {
|
||||
continue
|
||||
}
|
||||
|
||||
match := regType.FindStringSubmatch(line)
|
||||
if len(match) < 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
//key = `int`
|
||||
//function = line[strings.Index(line, key)+len(key):]
|
||||
newType := ""
|
||||
|
||||
switch v := strings.TrimSpace(match[1]); v {
|
||||
case "int":
|
||||
newType = "int"
|
||||
case "int32":
|
||||
newType = "int"
|
||||
case "float":
|
||||
newType = "float"
|
||||
case "unsigned int":
|
||||
newType = "uint"
|
||||
case "uint32":
|
||||
newType = "uint"
|
||||
case "uint8":
|
||||
newType = "uint"
|
||||
case "uint":
|
||||
newType = "uint"
|
||||
case "bool":
|
||||
newType = "bool"
|
||||
case "uint16":
|
||||
newType = "uint"
|
||||
case "long":
|
||||
newType = "long"
|
||||
case "unsigned long":
|
||||
newType = "unsigned long"
|
||||
case "char":
|
||||
newType = "string"
|
||||
case "auto":
|
||||
//Auto is tricky
|
||||
if strings.Contains(line, "glm::vec4") {
|
||||
newType = "float"
|
||||
}
|
||||
|
||||
default:
|
||||
log.Printf(`Unknown type: "%s" on line %d`, v, lineNum)
|
||||
}
|
||||
//log.Println("Found arg type", newType, "on index", i, argument.Name)
|
||||
lastArguments[i].Type = newType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function := ""
|
||||
|
||||
argLine := ""
|
||||
args := []string{}
|
||||
//Find line
|
||||
key = `Perl_croak(aTHX_ "Usage:`
|
||||
if strings.Contains(line, key) {
|
||||
function = line[strings.Index(line, key)+len(key):]
|
||||
}
|
||||
|
||||
for _, argument := range lastArguments {
|
||||
arguments[argument.Name] = append(arguments[argument.Name], argument)
|
||||
}
|
||||
|
||||
lastArguments = []*Argument{}
|
||||
|
||||
//Trim off the endings
|
||||
key = `");`
|
||||
if strings.Contains(function, key) {
|
||||
function = function[0:strings.Index(function, key)]
|
||||
}
|
||||
//Strip out the arguments
|
||||
key = `(`
|
||||
if strings.Contains(function, key) {
|
||||
argLine = function[strings.Index(function, key)+len(key):]
|
||||
function = function[0:strings.Index(function, key)]
|
||||
key = `)`
|
||||
if strings.Contains(argLine, key) {
|
||||
argLine = argLine[:strings.Index(argLine, key)]
|
||||
}
|
||||
key = `=`
|
||||
if strings.Contains(argLine, key) {
|
||||
argLine = argLine[:strings.Index(argLine, key)]
|
||||
}
|
||||
argLine = reg.ReplaceAllString(argLine, "")
|
||||
}
|
||||
key = `,`
|
||||
argLine = strings.TrimSpace(argLine)
|
||||
|
||||
if strings.Contains(argLine, key) {
|
||||
args = strings.Split(argLine, key)
|
||||
}
|
||||
|
||||
if len(function) < 1 {
|
||||
continue
|
||||
}
|
||||
|
||||
newArgs := []string{}
|
||||
for j, _ := range args {
|
||||
args[j] = strings.TrimSpace(args[j])
|
||||
if len(args[j]) == 0 {
|
||||
continue
|
||||
}
|
||||
newArgs = append(newArgs, args[j])
|
||||
}
|
||||
|
||||
lastAPI = &API{
|
||||
Function: function,
|
||||
}
|
||||
|
||||
for _, arg := range newArgs {
|
||||
argType, _ := knownTypes[arg]
|
||||
argument := &Argument{
|
||||
Name: arg,
|
||||
Type: argType,
|
||||
API: lastAPI,
|
||||
}
|
||||
lastArguments = append(lastArguments, argument)
|
||||
}
|
||||
lastAPI.Arguments = lastArguments
|
||||
|
||||
functions = append(functions, lastAPI)
|
||||
}
|
||||
|
||||
foundCount := 0
|
||||
failCount := 0
|
||||
for key, val := range arguments {
|
||||
isMissing := false
|
||||
line := ""
|
||||
line = fmt.Sprintf("%s used by %d functions:", key, len(val))
|
||||
for _, fnc := range val {
|
||||
line += fmt.Sprintf("%s(%s %s), ", fnc.API.Function, fnc.Type, key)
|
||||
if fnc.Type == "" {
|
||||
isMissing = true
|
||||
}
|
||||
}
|
||||
if isMissing {
|
||||
fmt.Println(line)
|
||||
failCount++
|
||||
} else {
|
||||
foundCount++
|
||||
}
|
||||
}
|
||||
log.Println(foundCount, "functions properly identified,", failCount, "have errors")
|
||||
|
||||
line := ""
|
||||
for _, api := range functions {
|
||||
line += fmt.Sprintf("void %s(", strings.TrimSpace(api.Function))
|
||||
for _, argument := range api.Arguments {
|
||||
line += fmt.Sprintf("%s %s, ", argument.Type, argument.Name)
|
||||
}
|
||||
if len(api.Arguments) > 0 {
|
||||
line = line[0 : len(line)-2]
|
||||
}
|
||||
line += ")\n"
|
||||
}
|
||||
fmt.Println(line)
|
||||
return
|
||||
}
|
||||
|
||||
var knownTypes = map[string]string{
|
||||
"activity_id": "uint",
|
||||
"alt_mode": "bool",
|
||||
"anim_num": "int",
|
||||
"best_z": "float",
|
||||
"buttons": "int",
|
||||
"channel_id": "int",
|
||||
"char_id": "int",
|
||||
"charges": "int",
|
||||
"class_id": "int",
|
||||
"client_name": "string",
|
||||
"color": "int",
|
||||
"color_id": "int",
|
||||
"condition_id": "int",
|
||||
"copper": "int",
|
||||
"count": "int",
|
||||
"debug_level": "int",
|
||||
"decay_time": "int",
|
||||
"dest_heading": "float",
|
||||
"dest_x": "float",
|
||||
"dest_y": "float",
|
||||
"dest_z": "float",
|
||||
"distance": "int",
|
||||
"door_id": "int",
|
||||
"doorid": "uint",
|
||||
"duration": "int",
|
||||
"effect_id": "int",
|
||||
"elite_material_id": "int",
|
||||
"enforce_level_requirement": "bool",
|
||||
"explore_id": "uint",
|
||||
"faction_value": "int",
|
||||
"fade_in": "int",
|
||||
"fade_out": "int",
|
||||
"fadeout": "uint",
|
||||
"firstname": "string",
|
||||
"from": "string",
|
||||
"gender_id": "int",
|
||||
"gold": "int",
|
||||
"grid_id": "int",
|
||||
"guild_rank_id": "int",
|
||||
"heading": "float",
|
||||
"hero_forge_model_id": "int",
|
||||
"ignore_quest_update": "bool",
|
||||
"instance_id": "int",
|
||||
"int_unused": "int",
|
||||
"int_value": "int",
|
||||
"is_enabled": "bool",
|
||||
"is_strict": "bool",
|
||||
"item_id": "int",
|
||||
"key": "string",
|
||||
"language_id": "int",
|
||||
"lastname": "string",
|
||||
"leader_name": "string",
|
||||
"level": "int",
|
||||
"link_name": "string",
|
||||
"macro_id": "int",
|
||||
"max_level": "int",
|
||||
"max_x": "float",
|
||||
"max_y": "float",
|
||||
"max_z": "float",
|
||||
"message": "string",
|
||||
"milliseconds": "int",
|
||||
"min_level": "int",
|
||||
"min_x": "float",
|
||||
"min_y": "float",
|
||||
"min_z": "float",
|
||||
"name": "string",
|
||||
"new_hour": "int",
|
||||
"new_min": "int",
|
||||
"node1": "int",
|
||||
"node2": "int",
|
||||
"npc_id": "int",
|
||||
"npc_type_id": "int",
|
||||
"object_type": "int",
|
||||
"options": "int",
|
||||
"platinum": "int",
|
||||
"popup_id": "int",
|
||||
"priority": "int",
|
||||
"quantity": "int",
|
||||
"race_id": "int",
|
||||
"remove_item": "bool",
|
||||
"requested_id": "int",
|
||||
"reset_base": "bool",
|
||||
"saveguard": "bool",
|
||||
"seconds": "int",
|
||||
"send_to_world": "bool",
|
||||
"signal_id": "int",
|
||||
"silent": "bool",
|
||||
"silver": "int",
|
||||
"size": "int",
|
||||
"stat_id": "int",
|
||||
"str_value": "string",
|
||||
"subject": "string",
|
||||
"target_enum": "string",
|
||||
"target_id": "int",
|
||||
"task": "int",
|
||||
"task_id": "uint",
|
||||
"task_id1": "int",
|
||||
"task_id10": "int",
|
||||
"task_id2": "int",
|
||||
"task_set": "int",
|
||||
"taskid": "int",
|
||||
"taskid1": "int",
|
||||
"taskid2": "int",
|
||||
"taskid3": "int",
|
||||
"taskid4": "int",
|
||||
"teleport": "int",
|
||||
"temp": "int",
|
||||
"texture_id": "int",
|
||||
"theme_id": "int",
|
||||
"update_world": "int",
|
||||
"updated_time_till_repop": "uint",
|
||||
"version": "int",
|
||||
"wait_ms": "int",
|
||||
"window_title": "string",
|
||||
"x": "float",
|
||||
"y": "float",
|
||||
"z": "float",
|
||||
"zone_id": "int",
|
||||
"zone_short": "string",
|
||||
`task_id%i`: "int",
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
Hello World NATS example
|
||||
|
||||
## Go helloworld.go
|
||||
* Install go and set your GOPATH/GOROOT variables as instructions notes. https://golang.org/doc/install
|
||||
* run `go get ./...` in this directory
|
||||
* run `go run helloworld.go` in this directory
|
||||
|
||||
## Python 2 helloworld2.py
|
||||
* 2.7+ Python ideal
|
||||
* run `pip install nats-client`
|
||||
* run `pip install protobuf`
|
||||
|
||||
## C#
|
||||
* The easiest way how to use C# protobuf is via the Google.Protobuf NuGet package. Just add the NuGet package to your VS project.
|
||||
* Copy Message.cs to your project.
|
||||
* NATS is obtained via the NATS.Client NuGet project
|
||||
* (Optional) You will also want to install the Google.Protobuf.Tools NuGet package, which contains precompiled version of protoc.exe and a copy of well known .proto files under the package's tools directory.
|
||||
* (Optional) To generate C# files from your .proto files, invoke protoc with the --csharp_out option.
|
||||
* Read https://github.com/google/protobuf/tree/master/csharp for more details
|
||||
@@ -0,0 +1,16 @@
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
tmp/
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
packages/
|
||||
x64/
|
||||
x86/
|
||||
build/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
.vs
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,80 @@
|
||||
namespace helloworld
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.TxtLog = new System.Windows.Forms.TextBox();
|
||||
this.BtnHello = new System.Windows.Forms.Button();
|
||||
this.TmrMessage = new System.Windows.Forms.Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TxtLog
|
||||
//
|
||||
this.TxtLog.Location = new System.Drawing.Point(13, 13);
|
||||
this.TxtLog.Multiline = true;
|
||||
this.TxtLog.Name = "TxtLog";
|
||||
this.TxtLog.Size = new System.Drawing.Size(354, 151);
|
||||
this.TxtLog.TabIndex = 0;
|
||||
//
|
||||
// BtnHello
|
||||
//
|
||||
this.BtnHello.Location = new System.Drawing.Point(12, 170);
|
||||
this.BtnHello.Name = "BtnHello";
|
||||
this.BtnHello.Size = new System.Drawing.Size(354, 64);
|
||||
this.BtnHello.TabIndex = 1;
|
||||
this.BtnHello.Text = "Hello World";
|
||||
this.BtnHello.UseVisualStyleBackColor = true;
|
||||
this.BtnHello.Click += new System.EventHandler(this.BtnHello_Click);
|
||||
//
|
||||
// TmrMessage
|
||||
//
|
||||
this.TmrMessage.Tick += new System.EventHandler(this.TmrMessage_Tick);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(380, 244);
|
||||
this.Controls.Add(this.BtnHello);
|
||||
this.Controls.Add(this.TxtLog);
|
||||
this.Name = "Form1";
|
||||
this.Text = "helloworld";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox TxtLog;
|
||||
private System.Windows.Forms.Button BtnHello;
|
||||
private System.Windows.Forms.Timer TmrMessage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Eqproto;
|
||||
using Google.Protobuf;
|
||||
|
||||
// Reference the NATS client.
|
||||
using NATS.Client;
|
||||
|
||||
namespace helloworld
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
|
||||
// Creates a live connection to the default
|
||||
// NATS Server running locally
|
||||
IConnection c;
|
||||
ISyncSubscription sSync;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void BtnHello_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (c != null && !c.IsClosed())
|
||||
{
|
||||
// Closing a connection
|
||||
c.Close();
|
||||
TxtLog.Text += "\r\nDisconnected.";
|
||||
return;
|
||||
}
|
||||
|
||||
TxtLog.Text = "Initialized";
|
||||
|
||||
// Create a new connection factory to create
|
||||
// a connection.
|
||||
ConnectionFactory cf = new ConnectionFactory();
|
||||
|
||||
c = cf.CreateConnection();
|
||||
|
||||
|
||||
TxtLog.Text += "\r\nSending hello world";
|
||||
ChannelMessage msg = new ChannelMessage();
|
||||
msg.From = "csharp";
|
||||
msg.Message = "Hello, World!";
|
||||
msg.ChanNum = 5;
|
||||
|
||||
|
||||
c.Publish("world.channel_message", msg.ToByteArray());
|
||||
|
||||
// Simple synchronous subscriber
|
||||
sSync = c.SubscribeSync("world.channel_message");
|
||||
|
||||
TxtLog.Text += "\r\nWaiting for message...";
|
||||
TmrMessage.Enabled = true;
|
||||
|
||||
}
|
||||
|
||||
private void TmrMessage_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (c == null || sSync == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Using a synchronous subscriber, gets the first message available,
|
||||
// waiting up to 1000 milliseconds (1 second)
|
||||
Msg m;
|
||||
try
|
||||
{
|
||||
m = sSync.NextMessage(2);
|
||||
Application.DoEvents();
|
||||
} catch //(NATS.Client.NATSTimeoutException e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m == null) return;
|
||||
|
||||
ChannelMessage msg = ChannelMessage.Parser.ParseFrom(m.Data);
|
||||
TxtLog.Text += string.Format("\r\nFrom: {0} Chan_num: {1} Message: {2}", msg.From, msg.ChanNum, msg.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="TmrMessage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace helloworld
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("helloworld")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("helloworld")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("7f2cb9a7-0e8a-486d-8443-e09038dbf872")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace helloworld.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("helloworld.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace helloworld.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7F2CB9A7-0E8A-486D-8443-E09038DBF872}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>helloworld</RootNamespace>
|
||||
<AssemblyName>helloworld</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Google.Protobuf, Version=3.5.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Google.Protobuf.3.5.1\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NATS.Client, Version=0.8.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\NATS.Client.0.8.0\lib\net45\NATS.Client.DLL</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Message.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27428.2002
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "helloworld", "helloworld.csproj", "{7F2CB9A7-0E8A-486D-8443-E09038DBF872}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7F2CB9A7-0E8A-486D-8443-E09038DBF872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7F2CB9A7-0E8A-486D-8443-E09038DBF872}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7F2CB9A7-0E8A-486D-8443-E09038DBF872}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7F2CB9A7-0E8A-486D-8443-E09038DBF872}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3FE58E4E-B083-44A5-91B9-9E1F4E1EC6D4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Google.Protobuf" version="3.5.1" targetFramework="net461" />
|
||||
<package id="Google.Protobuf.Tools" version="3.5.1" targetFramework="net461" />
|
||||
<package id="NATS.Client" version="0.8.0" targetFramework="net461" />
|
||||
<package id="System.Runtime.Serialization.Json" version="4.0.2" targetFramework="net461" />
|
||||
</packages>
|
||||
@@ -0,0 +1,80 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/eqemu/server/protobuf/go/eqproto"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/nats-io/go-nats"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Starting...")
|
||||
var nc *nats.Conn
|
||||
var err error
|
||||
|
||||
//create a nats connection, by default 127.0.0.1
|
||||
if nc, err = nats.Connect(nats.DefaultURL); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer nc.Close()
|
||||
|
||||
//listen for any channel messages from game
|
||||
go asyncChannelMessageSubscriber(nc) //async is recommended
|
||||
//go syncChannelMessageSubscriber() //sync is here as example
|
||||
|
||||
//send a channel message to broadcast channel
|
||||
go testBroadcastMessage(nc, "Hello, World!")
|
||||
|
||||
time.Sleep(100 * time.Second)
|
||||
fmt.Println("Exited after 100 seconds")
|
||||
}
|
||||
|
||||
// asyncChannelMessageSubscriber is an example of how to subscribe
|
||||
// and invoke a function when a message is received
|
||||
func asyncChannelMessageSubscriber(nc *nats.Conn) {
|
||||
nc.Subscribe("world.channel_message.out", func(m *nats.Msg) {
|
||||
message := &eqproto.ChannelMessage{}
|
||||
proto.Unmarshal(m.Data, message)
|
||||
log.Println(message)
|
||||
})
|
||||
log.Println("Waiting on async messages...")
|
||||
}
|
||||
|
||||
// syncChannelMessageSubscriber is an example of how to subscribe
|
||||
// and poll for messages syncronously
|
||||
func syncChannelMessageSubscriber(nc *nats.Conn) {
|
||||
|
||||
sub, err := nc.SubscribeSync("world.channel_message.out")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var m *nats.Msg
|
||||
if m, err = sub.NextMsg(10 * time.Second); err != nil {
|
||||
log.Println("Timed out after 10 seconds waiting for message", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
message := &eqproto.ChannelMessage{}
|
||||
proto.Unmarshal(m.Data, message)
|
||||
log.Println("Got message", message)
|
||||
}
|
||||
|
||||
func testBroadcastMessage(nc *nats.Conn, msg string) {
|
||||
message := &eqproto.ChannelMessage{
|
||||
From: "go",
|
||||
Message: msg,
|
||||
Number: 5, //5 is ooc, 6 is bc
|
||||
}
|
||||
d, err := proto.Marshal(message)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err = nc.Publish("world.channel_message.in", d); err != nil {
|
||||
log.Println("Failed to publish:", err.Error())
|
||||
return
|
||||
}
|
||||
log.Println("Sending message", message)
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
# coding: utf-8
|
||||
import tornado.ioloop
|
||||
import tornado.gen
|
||||
import time
|
||||
import sys
|
||||
sys.path.insert(0, "../../../protobuf/python/proto")
|
||||
from datetime import datetime
|
||||
from nats.io.utils import new_inbox
|
||||
from nats.io import Client as NATS
|
||||
import message_pb2
|
||||
|
||||
@tornado.gen.coroutine
|
||||
def main():
|
||||
nc = NATS()
|
||||
|
||||
# Establish connection to the server.
|
||||
options = { "verbose": True, "servers": ["nats://127.0.0.1:4222"] }
|
||||
yield nc.connect(**options)
|
||||
|
||||
def discover(msg=None):
|
||||
channel_message = message_pb2.ChannelMessage()
|
||||
channel_message.ParseFromString(msg.data)
|
||||
print("[Received]: %s" % channel_message)
|
||||
|
||||
|
||||
send_message = message_pb2.ChannelMessage()
|
||||
send_message.chan_num = 5
|
||||
#send_message.from = "python"
|
||||
send_message.message = "Hello, World!"
|
||||
|
||||
sid = yield nc.subscribe("world.channel_message", "", discover)
|
||||
|
||||
yield nc.publish("world.channel_message", send_message.SerializeToString())
|
||||
|
||||
loop = tornado.ioloop.IOLoop.instance()
|
||||
yield tornado.gen.Task(loop.add_timeout, time.time() + 20)
|
||||
try:
|
||||
start = datetime.now()
|
||||
# Make roundtrip to the server and timeout after 1 second
|
||||
yield nc.flush(1)
|
||||
end = datetime.now()
|
||||
print("Latency: %d µs" % (end.microsecond - start.microsecond))
|
||||
except tornado.gen.TimeoutError, e:
|
||||
print("Timeout! Roundtrip too slow...")
|
||||
|
||||
if __name__ == '__main__':
|
||||
tornado.ioloop.IOLoop.instance().run_sync(main)
|
||||
@@ -0,0 +1,256 @@
|
||||
//Makes a player walk around in ecommons near Guard Reskin
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/eqemu/server/protobuf/go/eqproto"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/nats-io/go-nats"
|
||||
)
|
||||
|
||||
var (
|
||||
nc *nats.Conn
|
||||
err error
|
||||
entities []*eqproto.Entity
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
if nc, err = nats.Connect(nats.DefaultURL); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer nc.Close()
|
||||
|
||||
zone := "ecommons"
|
||||
instance := 0
|
||||
entityID := int64(288)
|
||||
entities = zoneEntityList(zone, 0)
|
||||
|
||||
fmt.Println(len(entities), "entities known")
|
||||
|
||||
var attackEntityID int64
|
||||
for _, entity := range entities {
|
||||
if entity.Name == "Guard_Reskin000" {
|
||||
fmt.Println("Found guard reskin as ID", entity.Id)
|
||||
attackEntityID = int64(entity.Id)
|
||||
break
|
||||
}
|
||||
}
|
||||
if attackEntityID == 0 {
|
||||
log.Fatal("Can't find guard to attack!")
|
||||
}
|
||||
|
||||
entityID = zoneCommandEntity(zone, "spawn", []string{
|
||||
"146.17",
|
||||
"-112.51",
|
||||
"-52.01",
|
||||
"109.6",
|
||||
"GoSpawn",
|
||||
})
|
||||
if entityID == 0 {
|
||||
log.Fatal("failed to get entity ID!")
|
||||
}
|
||||
go testMoveToLoop(zone, entityID)
|
||||
go testAttack(zone, entityID, attackEntityID)
|
||||
go entityEventSubscriber(zone, instance, entityID)
|
||||
time.Sleep(1000 * time.Second)
|
||||
}
|
||||
|
||||
//testMoveToLoop causes an npc to go in a circle in pojustice
|
||||
func testMoveToLoop(zone string, entityID int64) {
|
||||
params := []string{}
|
||||
positions := []string{
|
||||
"156.72 -136.71 -52.02 112.8",
|
||||
"116.18 -101.56 -51.56 228.8",
|
||||
"151.37 -102.54 -52.01 228.8",
|
||||
}
|
||||
command := "moveto"
|
||||
curPos := 0
|
||||
for {
|
||||
curPos++
|
||||
fmt.Println("Moving to position", curPos)
|
||||
if len(positions) < curPos+1 {
|
||||
fmt.Println("Resetting position")
|
||||
curPos = 0
|
||||
}
|
||||
|
||||
params = []string{}
|
||||
params = append(params, fmt.Sprintf("%d", entityID))
|
||||
params = append(params, strings.Split(positions[curPos], " ")...)
|
||||
|
||||
zoneCommand(zone, command, params)
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
func testAttack(zone string, entityID int64, targetID int64) {
|
||||
time.Sleep(10 * time.Second)
|
||||
fmt.Println("10 seconds, Having", entityID, "attack", targetID)
|
||||
params := []string{
|
||||
fmt.Sprintf("%d", entityID),
|
||||
fmt.Sprintf("%d", targetID), //attack first element
|
||||
"1", //amount of hate
|
||||
}
|
||||
command := "attack"
|
||||
zoneCommand(zone, command, params)
|
||||
}
|
||||
|
||||
func zoneEntityList(zone string, instanceID int) (entities []*eqproto.Entity) {
|
||||
msg := &eqproto.CommandMessage{
|
||||
Author: "xackery",
|
||||
Command: "entitylist",
|
||||
Params: []string{"npc"},
|
||||
}
|
||||
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
channel := fmt.Sprintf("zone.%s.command_message.in", zone)
|
||||
reply, err := nc.Request(channel, d, 1*time.Second)
|
||||
if err != nil {
|
||||
log.Println("Failed to get response on", channel, "", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to unmarshal", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
rootEntities := &eqproto.Entities{}
|
||||
err = proto.Unmarshal([]byte(msg.Payload), rootEntities)
|
||||
if err != nil {
|
||||
fmt.Println("failed to unmarshal entities", err.Error(), msg)
|
||||
return
|
||||
}
|
||||
entities = rootEntities.Entities
|
||||
return
|
||||
}
|
||||
|
||||
func zoneCommandEntity(zone string, command string, params []string) (entityID int64) {
|
||||
msg := &eqproto.CommandMessage{
|
||||
Author: "xackery",
|
||||
Command: command,
|
||||
Params: params,
|
||||
}
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
reply, err := nc.Request(fmt.Sprintf("zone.%s.command_message.in", zone), d, 1*time.Second)
|
||||
if err != nil {
|
||||
log.Println("Failed to get request response:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to unmarshal", err.Error())
|
||||
return
|
||||
}
|
||||
fmt.Println("Response:", msg)
|
||||
entityID, err = strconv.ParseInt(msg.Result, 10, 64)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to parse response", err.Error(), msg.Result)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func zoneCommand(zone string, command string, params []string) {
|
||||
msg := &eqproto.CommandMessage{
|
||||
Author: "xackery",
|
||||
Command: command,
|
||||
Params: params,
|
||||
}
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
reply, err := nc.Request(fmt.Sprintf("zone.%s.command_message.in", zone), d, 1*time.Second)
|
||||
if err != nil {
|
||||
log.Println("Failed to get request response:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to unmarshal", err.Error())
|
||||
return
|
||||
}
|
||||
fmt.Println("Response:", msg)
|
||||
return
|
||||
}
|
||||
|
||||
func entityEventSubscriber(zone string, instance int, entityID int64) {
|
||||
|
||||
/*event := &eqproto.EntityEvent{
|
||||
Entity: &eqproto.Entity{
|
||||
Id: 1,
|
||||
},
|
||||
}
|
||||
d, err := proto.Marshal(event)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err = nc.Publish(fmt.Sprintf("zone.%s.entity.event_subscribe.all", zone), d); err != nil {
|
||||
log.Println("Failed to publish event subscribe:", err.Error())
|
||||
return
|
||||
}*/
|
||||
|
||||
var opCode int64
|
||||
var index int
|
||||
channel := fmt.Sprintf("zone.%s.%d.entity.%d.event.out", zone, instance, entityID)
|
||||
nc.Subscribe(channel, func(m *nats.Msg) {
|
||||
event := &eqproto.Event{}
|
||||
err = proto.Unmarshal(m.Data, event)
|
||||
if err != nil {
|
||||
fmt.Println("invalid event data passed", m.Data)
|
||||
}
|
||||
|
||||
var eventPayload proto.Message
|
||||
switch event.Op {
|
||||
case eqproto.OpCode_OP_ClientUpdate:
|
||||
eventPayload = &eqproto.PlayerPositionUpdateEvent{}
|
||||
case eqproto.OpCode_OP_Animation:
|
||||
eventPayload = &eqproto.AnimationEvent{}
|
||||
case eqproto.OpCode_OP_NewSpawn:
|
||||
eventPayload = &eqproto.SpawnEvent{}
|
||||
case eqproto.OpCode_OP_ZoneEntry:
|
||||
eventPayload = &eqproto.SpawnEvent{}
|
||||
case eqproto.OpCode_OP_HPUpdate:
|
||||
eventPayload = &eqproto.HPEvent{}
|
||||
case eqproto.OpCode_OP_MobHealth:
|
||||
eventPayload = &eqproto.HPEvent{}
|
||||
case eqproto.OpCode_OP_DeleteSpawn:
|
||||
eventPayload = &eqproto.DeleteSpawnEvent{}
|
||||
case eqproto.OpCode_OP_Damage:
|
||||
eventPayload = &eqproto.DamageEvent{}
|
||||
case eqproto.OpCode_OP_SpecialMesg:
|
||||
eventPayload = &eqproto.SpecialMessageEvent{}
|
||||
default:
|
||||
return
|
||||
}
|
||||
err = proto.Unmarshal(event.Payload, eventPayload)
|
||||
if err != nil {
|
||||
fmt.Println("Invalid data passed for opcode", eqproto.OpCode(opCode), err.Error(), string(m.Data[index+1:]))
|
||||
return
|
||||
}
|
||||
fmt.Println(m.Subject, event.Op, eventPayload)
|
||||
//log.Printf("Received a message on %s: %s\n", m.Subject, string(m.Data))
|
||||
|
||||
//proto.Unmarshal(m.Data, event)
|
||||
//log.Println(event.Op.String(), event.Entity, event.Target)
|
||||
})
|
||||
log.Println("Subscribed to", channel, ", waiting on messages...")
|
||||
|
||||
time.Sleep(500 * time.Second)
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
//Makes a player say a message in local chat
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/eqemu/server/protobuf/go/eqproto"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/nats-io/go-nats"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var (
|
||||
nc *nats.Conn
|
||||
err error
|
||||
entities []*eqproto.Entity
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
if nc, err = nats.Connect(nats.DefaultURL); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer nc.Close()
|
||||
|
||||
zone := "ecommons"
|
||||
instance := int64(0)
|
||||
entities = zoneEntityList(zone, 0)
|
||||
if len(entities) == 0 {
|
||||
return
|
||||
}
|
||||
fmt.Println(len(entities), "entities known")
|
||||
//fmt.Println(entities)
|
||||
|
||||
var entityID int32
|
||||
for _, entity := range entities {
|
||||
if entity.Name == "Shin" {
|
||||
fmt.Println("Found Shin as ID", entity.Id)
|
||||
entityID = entity.Id
|
||||
break
|
||||
}
|
||||
}
|
||||
if entityID == 0 {
|
||||
log.Fatal("Can't find entity!")
|
||||
}
|
||||
go asyncChannelMessageSubscriber(nc) //async is recommended
|
||||
go entityEventSubscriber(zone, instance, entityID)
|
||||
err := zoneChannelMessage(zone, instance, entityID, eqproto.EntityType_Client, eqproto.MessageType_Say, "Hello, World!")
|
||||
//err := tell("shin", "Testing tell")
|
||||
if err != nil {
|
||||
fmt.Println("Failed to send channel message:", err.Error())
|
||||
return
|
||||
}
|
||||
time.Sleep(1000 * time.Second)
|
||||
}
|
||||
|
||||
func tell(to string, message string) (err error) {
|
||||
|
||||
msg := &eqproto.ChannelMessage{
|
||||
Message: message,
|
||||
From: "go",
|
||||
To: to,
|
||||
}
|
||||
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
channel := fmt.Sprintf("world.channel_message.in")
|
||||
reply, err := nc.Request(channel, d, 1*time.Second)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "Failed to get request response on zone channel")
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "failed to unmarshal")
|
||||
return
|
||||
}
|
||||
|
||||
if msg.ResponseError > 0 {
|
||||
err = errors.New(msg.ResponseMessage)
|
||||
return
|
||||
}
|
||||
fmt.Println("Response:", msg)
|
||||
return
|
||||
}
|
||||
|
||||
func zoneChannelMessage(zone string, instance int64, fromEntityID int32, fromEntityType eqproto.EntityType, chanNumber eqproto.MessageType, message string) (err error) {
|
||||
|
||||
msg := &eqproto.ChannelMessage{
|
||||
Message: message,
|
||||
Number: eqproto.MessageType_SayLocal, //chanNumber,
|
||||
FromEntityId: fromEntityID,
|
||||
FromEntityType: fromEntityType,
|
||||
From: "go",
|
||||
Distance: 500,
|
||||
SkipSender: false,
|
||||
//To: "shin",
|
||||
}
|
||||
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
channel := fmt.Sprintf("zone.%s.%d.channel_message.in", zone, instance)
|
||||
reply, err := nc.Request(channel, d, 1*time.Second)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "Failed to get request response on zone channel")
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "failed to unmarshal")
|
||||
return
|
||||
}
|
||||
|
||||
if msg.ResponseError > 0 {
|
||||
err = errors.New(msg.ResponseMessage)
|
||||
return
|
||||
}
|
||||
fmt.Println("Response:", msg)
|
||||
return
|
||||
}
|
||||
|
||||
func testAttack(zone string, entityID int64, targetID int64) {
|
||||
time.Sleep(10 * time.Second)
|
||||
fmt.Println("10 seconds, Having", entityID, "attack", targetID)
|
||||
params := []string{
|
||||
fmt.Sprintf("%d", entityID),
|
||||
fmt.Sprintf("%d", targetID), //attack first element
|
||||
"1", //amount of hate
|
||||
}
|
||||
command := "attack"
|
||||
zoneCommand(zone, command, params)
|
||||
}
|
||||
|
||||
func zoneEntityList(zone string, instanceID int) (entities []*eqproto.Entity) {
|
||||
msg := &eqproto.CommandMessage{
|
||||
Author: "xackery",
|
||||
Command: "entitylist",
|
||||
Params: []string{"client"},
|
||||
}
|
||||
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
channel := fmt.Sprintf("zone.%s.command_message.in", zone)
|
||||
reply, err := nc.Request(channel, d, 1*time.Second)
|
||||
if err != nil {
|
||||
log.Println("Failed to get response on", channel, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to unmarshal", err.Error())
|
||||
return
|
||||
}
|
||||
if msg.ResponseError > 0 {
|
||||
fmt.Println("Failed to get entity list:", msg.ResponseError, msg.ResponseMessage)
|
||||
return
|
||||
}
|
||||
|
||||
//fmt.Println("reply", len(msg.Payload), string(msg.Payload))
|
||||
rootEntities := &eqproto.Entities{}
|
||||
err = proto.Unmarshal([]byte(msg.ResponsePayload), rootEntities)
|
||||
if err != nil {
|
||||
fmt.Println("failed to unmarshal entities", err.Error(), msg)
|
||||
return
|
||||
}
|
||||
entities = rootEntities.Entities
|
||||
return
|
||||
}
|
||||
|
||||
func zoneCommandEntity(zone string, command string, params []string) (entityID int32) {
|
||||
msg := &eqproto.CommandMessage{
|
||||
Author: "xackery",
|
||||
Command: command,
|
||||
Params: params,
|
||||
}
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
reply, err := nc.Request(fmt.Sprintf("zone.%s.command_message.in", zone), d, 1*time.Second)
|
||||
if err != nil {
|
||||
log.Println("Failed to get request response:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to unmarshal", err.Error())
|
||||
return
|
||||
}
|
||||
//fmt.Println("Response:", msg)
|
||||
if msg.ResponseError > 0 {
|
||||
fmt.Println("Failed to get response:", msg.ResponseError, msg.ResponseMessage)
|
||||
return
|
||||
}
|
||||
|
||||
entityID = msg.ResponseValue
|
||||
return
|
||||
}
|
||||
|
||||
func zoneCommand(zone string, command string, params []string) {
|
||||
msg := &eqproto.CommandMessage{
|
||||
Author: "xackery",
|
||||
Command: command,
|
||||
Params: params,
|
||||
}
|
||||
d, err := proto.Marshal(msg)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
reply, err := nc.Request(fmt.Sprintf("zone.%s.command_message.in", zone), d, 1*time.Second)
|
||||
if err != nil {
|
||||
log.Println("Failed to get request response:", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = proto.Unmarshal(reply.Data, msg)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to unmarshal", err.Error())
|
||||
return
|
||||
}
|
||||
fmt.Println("Response:", msg)
|
||||
return
|
||||
}
|
||||
|
||||
func entityEventSubscriber(zone string, instance int64, entityID int32) {
|
||||
|
||||
var index int
|
||||
|
||||
channel := fmt.Sprintf("zone.%s.%d.entity.%d.event.out", zone, instance, entityID)
|
||||
nc.Subscribe(channel, func(m *nats.Msg) {
|
||||
event := &eqproto.Event{}
|
||||
err = proto.Unmarshal(m.Data, event)
|
||||
if err != nil {
|
||||
fmt.Println("invalid event data passed", m.Data)
|
||||
return
|
||||
}
|
||||
|
||||
var eventPayload proto.Message
|
||||
switch event.Op {
|
||||
case eqproto.OpCode_OP_ClientUpdate:
|
||||
eventPayload = &eqproto.PlayerPositionUpdateEvent{}
|
||||
case eqproto.OpCode_OP_Animation:
|
||||
eventPayload = &eqproto.AnimationEvent{}
|
||||
case eqproto.OpCode_OP_NewSpawn:
|
||||
eventPayload = &eqproto.SpawnEvent{}
|
||||
case eqproto.OpCode_OP_ZoneEntry:
|
||||
eventPayload = &eqproto.SpawnEvent{}
|
||||
case eqproto.OpCode_OP_HPUpdate:
|
||||
eventPayload = &eqproto.HPEvent{}
|
||||
case eqproto.OpCode_OP_MobHealth:
|
||||
eventPayload = &eqproto.HPEvent{}
|
||||
case eqproto.OpCode_OP_DeleteSpawn:
|
||||
eventPayload = &eqproto.DeleteSpawnEvent{}
|
||||
case eqproto.OpCode_OP_Damage:
|
||||
eventPayload = &eqproto.DamageEvent{}
|
||||
case eqproto.OpCode_OP_SpecialMesg:
|
||||
eventPayload = &eqproto.SpecialMessageEvent{}
|
||||
case eqproto.OpCode_OP_ChannelMessage:
|
||||
eventPayload = &eqproto.ChannelMessageEvent{}
|
||||
default:
|
||||
return
|
||||
}
|
||||
err = proto.Unmarshal(event.Payload, eventPayload)
|
||||
if err != nil {
|
||||
fmt.Println("Invalid data passed for opcode", event.Op, err.Error(), string(m.Data[index+1:]))
|
||||
return
|
||||
}
|
||||
fmt.Println(m.Subject, event.Op, eventPayload)
|
||||
//log.Printf("Received a message on %s: %s\n", m.Subject, string(m.Data))
|
||||
|
||||
//proto.Unmarshal(m.Data, event)
|
||||
//log.Println(event.Op.String(), event.Entity, event.Target)
|
||||
})
|
||||
log.Println("Subscribed to", channel, ", waiting on messages...")
|
||||
|
||||
time.Sleep(500 * time.Second)
|
||||
}
|
||||
|
||||
// asyncChannelMessageSubscriber is an example of how to subscribe
|
||||
// and invoke a function when a message is received
|
||||
func asyncChannelMessageSubscriber(nc *nats.Conn) {
|
||||
nc.Subscribe("world.channel_message.out", func(m *nats.Msg) {
|
||||
message := &eqproto.ChannelMessage{}
|
||||
proto.Unmarshal(m.Data, message)
|
||||
log.Println(message)
|
||||
})
|
||||
nc.Subscribe("zone.ecommons.0.channel_message.out", func(m *nats.Msg) {
|
||||
message := &eqproto.ChannelMessage{}
|
||||
proto.Unmarshal(m.Data, message)
|
||||
log.Println(message)
|
||||
})
|
||||
log.Println("Waiting on async messages...")
|
||||
}
|
||||
@@ -165,6 +165,7 @@ OP_GMNameChange=0x3077 # Was 0x4434
|
||||
OP_GMLastName=0x4dd7 # Was 0x3077
|
||||
|
||||
# Misc Opcodes
|
||||
OP_QueryUCSServerStatus=0x6964
|
||||
OP_InspectRequest=0x23f1
|
||||
OP_InspectAnswer=0x5794
|
||||
OP_InspectMessageUpdate=0x3064
|
||||
@@ -248,6 +249,7 @@ OP_AutoAttack=0x0d14
|
||||
OP_AutoAttack2=0x3912
|
||||
OP_Consume=0x4692
|
||||
OP_MoveItem=0x62a2
|
||||
OP_MoveMultipleItems=0x55ef
|
||||
OP_DeleteItem=0x3eb5
|
||||
OP_DeleteCharge=0x2d5b
|
||||
OP_ItemPacket=0x5e0e
|
||||
@@ -341,6 +343,7 @@ OP_MobUpdate=0x6b5a
|
||||
OP_NPCMoveUpdate=0x5bd9
|
||||
OP_CameraEffect=0x5712
|
||||
OP_SpellEffect=0x72b6
|
||||
OP_AddNimbusEffect=0x2954
|
||||
OP_RemoveNimbusEffect=0x3ba7
|
||||
OP_AltCurrency=0x8fcb
|
||||
OP_AltCurrencyMerchantRequest=0x7e3e
|
||||
|
||||
@@ -164,6 +164,7 @@ OP_GMNameChange=0x035f
|
||||
OP_GMLastName=0x46ce
|
||||
|
||||
# Misc Opcodes
|
||||
OP_QueryUCSServerStatus=0x398f
|
||||
OP_InspectRequest=0x57bc
|
||||
OP_InspectAnswer=0x71ac
|
||||
OP_InspectMessageUpdate=0x4d25
|
||||
@@ -247,6 +248,7 @@ OP_AutoAttack=0x109d
|
||||
OP_AutoAttack2=0x3526
|
||||
OP_Consume=0x4b70
|
||||
OP_MoveItem=0x32ee
|
||||
OP_MoveMultipleItems=0x5623
|
||||
OP_DeleteItem=0x18ad
|
||||
OP_DeleteCharge=0x01b8
|
||||
OP_ItemPacket=0x368e
|
||||
@@ -340,6 +342,7 @@ OP_MobUpdate=0x2c84
|
||||
OP_NPCMoveUpdate=0x5892
|
||||
OP_CameraEffect=0x127f
|
||||
OP_SpellEffect=0x5936
|
||||
OP_AddNimbusEffect=0xc693
|
||||
OP_RemoveNimbusEffect=0x7b1e
|
||||
OP_AltCurrency=0x6b6d
|
||||
OP_AltCurrencyMerchantRequest=0x5409
|
||||
|
||||
@@ -165,6 +165,7 @@ OP_GMKill=0x6685 # C
|
||||
OP_GMNameChange=0x565d # C
|
||||
OP_GMLastName=0x3563 # C
|
||||
|
||||
OP_QueryUCSServerStatus=0x4036
|
||||
OP_InspectAnswer=0x4938 # C
|
||||
OP_Action2=0x7e4d # C OP_Damage?
|
||||
OP_BeginCast=0x0d5a # C
|
||||
@@ -241,6 +242,7 @@ OP_AutoAttack=0x3d86 # C
|
||||
OP_AutoAttack2=0x4ca1 # C
|
||||
OP_Consume=0x7ce4 # C
|
||||
OP_MoveItem=0x7f56 # C
|
||||
OP_MoveMultipleItems=0x4572
|
||||
OP_DeleteItem=0x36f8 # C
|
||||
OP_DeleteCharge=0x1df9 # C
|
||||
OP_ItemPacket=0x34f8 # C
|
||||
@@ -345,6 +347,7 @@ OP_AltCurrencySell=0x7a21
|
||||
OP_AltCurrencySellSelection=0x26d9
|
||||
OP_AltCurrencyReclaim=0x712c
|
||||
OP_ShroudProgress=0x0296
|
||||
OP_AddNimbusEffect=0x6840
|
||||
OP_RemoveNimbusEffect=0x5272 # C
|
||||
OP_Untargetable=0x5ea1 # 0x301d on UF?
|
||||
OP_IncreaseStats=0x71eb
|
||||
|
||||
@@ -237,6 +237,7 @@ OP_AutoAttack=0x3427 #Trevius 01/20/09
|
||||
OP_AutoAttack2=0x6017 #Trevius 01/20/09
|
||||
OP_Consume=0x729a #Trevius 02/08/09
|
||||
OP_MoveItem=0x14B3 #Trevius 02/08/09
|
||||
OP_MoveMultipleItems=0x2d3e
|
||||
OP_DeleteItem=0x7DD4 #Xinu 03/08/09 0x41EE 0x018E 0x070C
|
||||
OP_DeleteCharge=0x32e2 #Trevius 03/23/09
|
||||
OP_ItemPacket=0x78Cd #Trevius 02/08/09
|
||||
@@ -329,6 +330,7 @@ OP_AltCurrencyPurchase=0x3994
|
||||
OP_AltCurrencySell=0x2ac3
|
||||
OP_AltCurrencySellSelection=0x7d00
|
||||
OP_AltCurrencyReclaim=0x1996
|
||||
OP_AddNimbusEffect=0x45e2
|
||||
OP_RemoveNimbusEffect=0x5872 # C
|
||||
OP_InspectMessageUpdate=0x67e9 # C
|
||||
OP_OpenInventory=0x66c8
|
||||
|
||||
@@ -198,6 +198,7 @@ OP_Split=0x4848 # ShowEQ 10/27/05
|
||||
OP_Surname=0x4668 # ShowEQ 10/27/05
|
||||
OP_ClearSurname=0x6cdb
|
||||
OP_MoveItem=0x420f # ShowEQ 10/27/05
|
||||
OP_MoveMultipleItems=0x463b
|
||||
OP_FaceChange=0x0f8e # ShowEQ 10/27/05
|
||||
OP_ItemPacket=0x3397 # ShowEQ 10/27/05
|
||||
OP_ItemLinkResponse=0x667c # ShowEQ 10/27/05
|
||||
|
||||
@@ -168,6 +168,7 @@ OP_GMKill=0x799c # C
|
||||
OP_GMNameChange=0x0f48 # C
|
||||
OP_GMLastName=0x7bfb # C
|
||||
|
||||
OP_QueryUCSServerStatus=0x4481
|
||||
OP_InspectAnswer=0x0c2b # C
|
||||
OP_BeginCast=0x0d5a # C
|
||||
OP_ColoredText=0x71bf # C
|
||||
@@ -251,6 +252,7 @@ OP_AutoAttack=0x1df9 # C
|
||||
OP_AutoAttack2=0x517b # C
|
||||
OP_Consume=0x24c5 # V
|
||||
OP_MoveItem=0x2641 # C
|
||||
OP_MoveMultipleItems=0x40e8
|
||||
OP_DeleteItem=0x66e0 # C
|
||||
OP_DeleteCharge=0x4ca1 # C
|
||||
OP_ItemPacket=0x7b6e # C
|
||||
@@ -346,6 +348,7 @@ OP_MobUpdate=0x4656 # Same as OP_SpawnPositionUpdate
|
||||
OP_NPCMoveUpdate=0x0f3e #
|
||||
OP_CameraEffect=0x6b0e # V
|
||||
OP_SpellEffect=0x57a3 # V
|
||||
OP_AddNimbusEffect=0x6361
|
||||
OP_RemoveNimbusEffect=0x2c77 # C
|
||||
OP_AltCurrency=0x659e
|
||||
OP_AltCurrencyMerchantRequest=0x214C
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
############################################################
|
||||
#::: Script: db_dumper.pl
|
||||
#::: Purpose: Utility to easily manage database backups and compress.
|
||||
#::: Export Individual DB Tables...
|
||||
#::: Export specific databases...
|
||||
#::: Built for both Windows and Linux
|
||||
#::: Windows uses WinRar or 7-Zip for compression
|
||||
#::: Linux uses tar for compression
|
||||
#::: Author: Akkadius
|
||||
############################################################
|
||||
|
||||
$localdrive = "C:"; #::: Where Windows and all Install Programs are...
|
||||
$linesep = "---------------------------------------";
|
||||
|
||||
use POSIX qw(strftime);
|
||||
my $date = strftime "%m_%d_%Y", localtime;
|
||||
print "\nTodays Date: " . $date . "\n";
|
||||
|
||||
use Config;
|
||||
print "Operating System is: $Config{osname}\n";
|
||||
if($Config{osname}=~/linux/i){ $OS = "Linux"; }
|
||||
if($Config{osname}=~/Win|MS/i){ $OS = "Windows"; }
|
||||
|
||||
if(!$ARGV[0]){
|
||||
print "\nERROR! Need arguments\n";
|
||||
print "#::: Help :::#\n";
|
||||
print "######################################################\n";
|
||||
print "Arguments\n";
|
||||
print " loc=\"C:\\File Location\" - File path location to backup...\n";
|
||||
print " database=\"dbname\" - Manually specify databasename, default is database in eqemu_config.xml\n";
|
||||
print " tables=\"table1,table2,table3\" - Manually specify tables, default is to dump all tables from database\n";
|
||||
print " compress - Compress Database with 7-ZIP, will fallback to WinRAR depending on what is installed (Must be installed to default program dir)...\n";
|
||||
print " nolock - Does not lock tables, meant for backuping while the server is running..\n";
|
||||
print " backup_name=\"name\" - Sets database backup prefix name\n";
|
||||
print ' Example: perl DB_Dumper.pl Loc="E:\Backups"' . "\n";
|
||||
print "######################################################\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
sub read_eqemu_config_json {
|
||||
use JSON;
|
||||
my $json = new JSON();
|
||||
|
||||
my $content;
|
||||
open(my $fh, '<', "eqemu_config.json") or die "Unable to open config: eqemu_config.json - This must be in your EQEmu Server Folder\n"; {
|
||||
local $/;
|
||||
$content = <$fh>;
|
||||
}
|
||||
close($fh);
|
||||
|
||||
$config = $json->decode($content);
|
||||
|
||||
$db = $config->{"server"}{"database"}{"db"};
|
||||
$host = $config->{"server"}{"database"}{"host"};
|
||||
$user = $config->{"server"}{"database"}{"username"};
|
||||
$pass = $config->{"server"}{"database"}{"password"};
|
||||
$long_name = $config->{"server"}{"world"}{"longname"};
|
||||
|
||||
}
|
||||
|
||||
read_eqemu_config_json();
|
||||
|
||||
$Debug = 0;
|
||||
print "[db_dumper.pl] Arguments\n" if $Debug;
|
||||
$n = 0;
|
||||
while($ARGV[$n]){
|
||||
print $n . ': ' . $ARGV[$n] . "\n" if $Debug;
|
||||
if($ARGV[$n]=~/nolock/i){
|
||||
$no_lock = 1;
|
||||
}
|
||||
if($ARGV[$n]=~/compress/i){
|
||||
print "[db_dumper.pl] Compression SET\n";
|
||||
$Compress = 1;
|
||||
}
|
||||
if($ARGV[$n]=~/database=/i){
|
||||
@DB_NAME = split('=', $ARGV[$n]);
|
||||
print "[db_dumper.pl] Database is " . $DB_NAME[1] . "\n";
|
||||
$db = $DB_NAME[1];
|
||||
}
|
||||
if($ARGV[$n]=~/backup_name=/i){
|
||||
@data = split('=', $ARGV[$n]);
|
||||
print "[db_dumper.pl] Backup Name is " . $data[1] . "\n";
|
||||
$backup_name = $data[1];
|
||||
}
|
||||
if($ARGV[$n]=~/loc=/i){
|
||||
@backup_location = split('=', $ARGV[$n]);
|
||||
print "[db_dumper.pl] Backup Directory: " . $backup_location[1] . "\n";
|
||||
}
|
||||
if($ARGV[$n]=~/tables=/i){
|
||||
@Tables = split('=', $ARGV[$n]); @TList = split(',', $Tables[1]);
|
||||
foreach my $tables (@TList){
|
||||
$t_tables .= $tables . " ";
|
||||
$t_tables_l .= $tables . "_";
|
||||
$t_tables_p .= $tables . "\n";
|
||||
}
|
||||
print "[db_dumper.pl] Backing up tables: \n############################\n" . $t_tables_p . "############################\n";
|
||||
}
|
||||
$n++;
|
||||
}
|
||||
|
||||
#::: Check for Backup Directory existence, if doesn't exist then create...
|
||||
if (-d $backup_location[1]) {
|
||||
print "[db_dumper.pl] Directory currently exists... Adding files to it...\n";
|
||||
}
|
||||
elsif($backup_location[1] ne ""){
|
||||
print "[db_dumper.pl] Directory does NOT exist! Creating...\n";
|
||||
mkdir($backup_location[1]) or die 'Failed to create folder, maybe created the folder manually at "' . $backup_location[1]. '" ?';
|
||||
}
|
||||
else{
|
||||
print "[db_dumper.pl] No save location specified... Saving to folder script is running in...\n";
|
||||
}
|
||||
if($backup_location[1] ne ""){
|
||||
if($OS eq "Windows"){ $file_app = "\\"; }
|
||||
if($OS eq "Linux"){ $file_app = "/"; }
|
||||
}
|
||||
else {
|
||||
$file_app = "";
|
||||
}
|
||||
|
||||
if($t_tables ne ""){
|
||||
$tables_f_l = substr($t_tables_l, 0, 20) . '-';
|
||||
if($backup_name){
|
||||
$target_file = $backup_name . '_' . $date . '';
|
||||
}
|
||||
else {
|
||||
$target_file = '' . $tables_f_l . '_' . $date . '';
|
||||
}
|
||||
|
||||
print "[db_dumper.pl] Performing table based backup...\n";
|
||||
#::: Backup Database...
|
||||
print "[db_dumper.pl] Backing up Database " . $db . "... \n";
|
||||
if($no_lock == 1){
|
||||
$added_parameters .= " --skip-lock-tables ";
|
||||
}
|
||||
$cmd = 'mysqldump -u' . $user . ' --host ' . $host . ' ' . $added_parameters . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' ' . $t_tables . ' > "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql"';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
}
|
||||
else{ #::: Entire DB Backup
|
||||
|
||||
if($backup_name){
|
||||
$target_file = $backup_name . '_' . $db . '_' . $date . '';
|
||||
}
|
||||
else {
|
||||
$target_file = '' . $db . '_' . $date . '';
|
||||
}
|
||||
|
||||
#::: Backup Database...
|
||||
print "[db_dumper.pl] Backing up Database " . $db . "... \n";
|
||||
if($no_lock == 1){
|
||||
$added_parameters .= " --skip-lock-tables ";
|
||||
}
|
||||
$cmd = 'mysqldump -u' . $user . ' --host ' . $host . ' ' . $added_parameters . ' --max_allowed_packet=512M --password="' . $pass . '" ' . $db . ' > "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql"';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
}
|
||||
|
||||
#::: Get File Size
|
||||
$fileloc = '' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql';
|
||||
$filesize = -s $fileloc;
|
||||
if($filesize < 1000){ print "[db_dumper.pl] " . 'Error occurred... exiting...' . "\n"; exit; }
|
||||
print "[db_dumper.pl] Backup DONE... DB Backup File Size '" . $filesize . "' (" . get_filesize_str($fileloc) . ")\n";
|
||||
|
||||
#::: WinRar Get, check compression flag
|
||||
if($Compress == 1){
|
||||
if($OS eq "Windows"){
|
||||
if(-d $localdrive . "\\Program Files\\7-Zip"){
|
||||
print "[db_dumper.pl] ::: You have 7-Zip installed as 64 Bit...\n";
|
||||
$S_ZIP = $localdrive . "\\Program Files\\7-Zip";
|
||||
}
|
||||
elsif(-d $localdrive . "\\Program Files (x86)\\7-Zip"){
|
||||
print "[db_dumper.pl] ::: You have 7-Zip installed as 32 Bit...\n";
|
||||
$S_ZIP = $localdrive . "\\Program Files (x86)\\7-Zip";
|
||||
}
|
||||
elsif(-d $localdrive . "\\Program Files (x86)\\WinRAR"){
|
||||
print "[db_dumper.pl] ::: You have WinRAR installed as 32 Bit...\n";
|
||||
$WinRar = $localdrive . "\\Program Files (x86)\\WinRAR";
|
||||
}
|
||||
elsif(-d $localdrive . "\\Program Files\\WinRAR"){
|
||||
print "[db_dumper.pl] ::: You have WinRAR installed as 64 Bit...\n";
|
||||
$WinRar = $localdrive . "\\Program Files\\WinRAR";
|
||||
}
|
||||
else{
|
||||
print "[db_dumper.pl] No WinRAR installed... Will not compress...\n";
|
||||
}
|
||||
if($S_ZIP ne ""){
|
||||
print "[db_dumper.pl] Compressing Database with 7-ZIP... \n";
|
||||
$cmd = '"' . $S_ZIP . '\\7z" a -t7z -m0=lzma -mx=9 "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.7z" "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
print "[db_dumper.pl] \nDeleting RAW .sql Dump... \n";
|
||||
$cmd = 'del "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
$final_file = $target_file . ".7z";
|
||||
}
|
||||
elsif($WinRar ne ""){
|
||||
print "[db_dumper.pl] Compressing Database with WinRAR... \n";
|
||||
$cmd = '"' . $WinRar . '\\rar" a "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.rar" "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
print "[db_dumper.pl] \nDeleting RAW .sql Dump... \n";
|
||||
$cmd = 'del "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
$final_file = $target_file . ".rar";
|
||||
}
|
||||
}
|
||||
if($OS eq "Linux"){
|
||||
print "[db_dumper.pl] Compressing Database with Tarball... \n";
|
||||
$cmd = 'tar -zcvf "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.tar.gz" "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
print "[db_dumper.pl] \nDeleting RAW .sql Dump... \n";
|
||||
$cmd = 'rm "' . $backup_location[1] . '' . $file_app . '' . $target_file . '.sql" ';
|
||||
printcmd($cmd);
|
||||
system($cmd);
|
||||
$final_file = $target_file . ".tar.gz";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$final_file = $target_file . ".sql";
|
||||
}
|
||||
|
||||
#::: Get Final File Location for display
|
||||
if($backup_location[1] ne ""){ $final_loc = $backup_location[1] . '' . $file_app . ""; }
|
||||
else{
|
||||
if($OS eq "Windows"){
|
||||
$final_loc = `echo %cd%`;
|
||||
}
|
||||
elsif($OS eq "Linux"){
|
||||
$final_loc = `pwd`;
|
||||
}
|
||||
}
|
||||
|
||||
print "[db_dumper.pl] Final file located: " . $final_loc . "" . $final_file . "\n";
|
||||
|
||||
sub printcmd{
|
||||
print "[db_dumper.pl] Command [" . $_[0] . "]\n";
|
||||
}
|
||||
|
||||
sub get_filesize_str{
|
||||
my $file = shift();
|
||||
my $size = (stat($file))[7] || die "stat($file): $!\n";
|
||||
if ($size > 1099511627776) { return sprintf("%.2f TiB", $size / 1099511627776); }
|
||||
elsif ($size > 1073741824) { return sprintf("%.2f GiB", $size / 1073741824); }
|
||||
elsif ($size > 1048576) { return sprintf("%.2f MiB", $size / 1048576); }
|
||||
elsif ($size > 1024) { return sprintf("%.2f KiB", $size / 1024); }
|
||||
else { return "$size byte" . ($size == 1 ? "" : "s"); }
|
||||
}
|
||||
+296
-80
@@ -48,10 +48,18 @@ if(-e "eqemu_server_skip_update.txt"){
|
||||
}
|
||||
|
||||
#::: Check for script self update
|
||||
check_xml_to_json_conversion() if $ARGV[0] eq "convert_xml";
|
||||
do_self_update_check_routine() if !$skip_self_update_check;
|
||||
get_windows_wget();
|
||||
get_perl_version();
|
||||
read_eqemu_config_xml();
|
||||
if(-e "eqemu_config.json") {
|
||||
read_eqemu_config_json();
|
||||
}
|
||||
else {
|
||||
#::: This will need to stay for servers who simply haven't updated yet
|
||||
# This script can still update without the server bins being updated
|
||||
read_eqemu_config_xml();
|
||||
}
|
||||
get_mysql_path();
|
||||
|
||||
#::: Remove old eqemu_update.pl
|
||||
@@ -265,7 +273,7 @@ sub new_server {
|
||||
analytics_insertion("new_server::install", $database_name);
|
||||
|
||||
if($OS eq "Linux"){
|
||||
build_linux_source();
|
||||
build_linux_source("login");
|
||||
}
|
||||
|
||||
do_installer_routines();
|
||||
@@ -281,6 +289,10 @@ sub new_server {
|
||||
|
||||
show_install_summary_info();
|
||||
|
||||
if($OS eq "Linux") {
|
||||
unlink('/home/eqemu/install_variables.txt');
|
||||
}
|
||||
|
||||
rmtree('updates_staged');
|
||||
|
||||
return;
|
||||
@@ -291,6 +303,61 @@ sub new_server {
|
||||
}
|
||||
}
|
||||
|
||||
sub check_xml_to_json_conversion {
|
||||
if(-e "eqemu_config.xml" && !-e "eqemu_config.json") {
|
||||
|
||||
if($OS eq "Windows"){
|
||||
get_remote_file("https://raw.githubusercontent.com/EQEmu/Server/master/utils/xmltojson/xmltojson-windows-x86.exe", "xmltojson.exe");
|
||||
print "Converting eqemu_config.xml to eqemu_config.json\n";
|
||||
print `xmltojson eqemu_config.xml`;
|
||||
}
|
||||
if($OS eq "Linux"){
|
||||
get_remote_file("https://raw.githubusercontent.com/EQEmu/Server/master/utils/xmltojson/xmltojson-linux-x86", "xmltojson");
|
||||
print "Converting eqemu_config.xml to eqemu_config.json\n";
|
||||
print `chmod 755 xmltojson`;
|
||||
print `./xmltojson eqemu_config.xml`;
|
||||
}
|
||||
|
||||
#::: Prettify and alpha order the config
|
||||
use JSON;
|
||||
my $json = new JSON();
|
||||
|
||||
my $content;
|
||||
open(my $fh, '<', "eqemu_config.json") or die "cannot open file $filename"; {
|
||||
local $/;
|
||||
$content = <$fh>;
|
||||
}
|
||||
close($fh);
|
||||
|
||||
$result = $json->decode($content);
|
||||
$json->canonical(1);
|
||||
|
||||
print $json->pretty->indent_length(5)->utf8->encode($result),"\n";
|
||||
|
||||
open(my $fh, '>', 'eqemu_config.json');
|
||||
print $fh $json->pretty->indent_length(5)->utf8->encode($result);
|
||||
close $fh;
|
||||
|
||||
mkdir('backups');
|
||||
copy_file("eqemu_config.xml", "backups/eqemu_config.xml");
|
||||
unlink('eqemu_config.xml');
|
||||
unlink('db_dumper.pl');
|
||||
|
||||
print "[Server Maintenance] eqemu_config.xml is now DEPRECATED \n";
|
||||
print "[Server Maintenance] eqemu_config.json is now the new Server config format \n";
|
||||
print " A backup of this old config is located in the backups folder of your server directory\n";
|
||||
print " --- \n";
|
||||
print " You may have some plugins and/or applications that still require reference of this config file\n";
|
||||
print " Please update these plugins/applications to use the new configuration format if needed\n";
|
||||
print " --- \n";
|
||||
print " Thanks for your understanding\n";
|
||||
print " The EQEmulator Team\n\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub build_linux_source {
|
||||
|
||||
$build_options = $_[0];
|
||||
@@ -330,10 +397,10 @@ sub build_linux_source {
|
||||
|
||||
print "Generating CMake build files...\n";
|
||||
if($os_flavor eq "fedora_core"){
|
||||
print `cmake $cmake_options -DEQEMU_BUILD_LUA=ON -DLUA_INCLUDE_DIR=/usr/include/lua-5.1/ -G "Unix Makefiles" ..`;
|
||||
print `cmake $cmake_options -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -DLUA_INCLUDE_DIR=/usr/include/lua-5.1/ -G "Unix Makefiles" ..`;
|
||||
}
|
||||
else {
|
||||
print `cmake $cmake_options -DEQEMU_BUILD_LUA=ON -G "Unix Makefiles" ..`;
|
||||
print `cmake $cmake_options -DEQEMU_BUILD_LOGIN=ON -DEQEMU_BUILD_LUA=ON -G "Unix Makefiles" ..`;
|
||||
}
|
||||
print "Building EQEmu Server code. This will take a while.";
|
||||
|
||||
@@ -352,6 +419,7 @@ sub build_linux_source {
|
||||
print `ln -s -f $source_dir/Server/build/bin/ucs .`;
|
||||
print `ln -s -f $source_dir/Server/build/bin/world .`;
|
||||
print `ln -s -f $source_dir/Server/build/bin/zone .`;
|
||||
print `ln -s -f $source_dir/Server/build/bin/loginserver .`;
|
||||
}
|
||||
|
||||
sub do_installer_routines {
|
||||
@@ -362,8 +430,8 @@ sub do_installer_routines {
|
||||
mkdir('updates_staged');
|
||||
mkdir('shared');
|
||||
|
||||
do_install_config_xml();
|
||||
read_eqemu_config_xml();
|
||||
do_install_config_json();
|
||||
read_eqemu_config_json();
|
||||
get_installation_variables();
|
||||
|
||||
$db_name = "peq";
|
||||
@@ -579,7 +647,12 @@ sub do_self_update_check_routine {
|
||||
sub get_installation_variables{
|
||||
#::: Fetch installation variables before building the config
|
||||
if($OS eq "Linux"){
|
||||
open (INSTALL_VARS, "../install_variables.txt");
|
||||
if(-e "../install_variables.txt") {
|
||||
open (INSTALL_VARS, "../install_variables.txt");
|
||||
}
|
||||
elsif(-e "install_variables.txt") {
|
||||
open (INSTALL_VARS, "./install_variables.txt");
|
||||
}
|
||||
}
|
||||
if($OS eq "Windows"){
|
||||
open (INSTALL_VARS, "install_variables.txt");
|
||||
@@ -593,73 +666,51 @@ sub get_installation_variables{
|
||||
close (INSTALL_VARS);
|
||||
}
|
||||
|
||||
sub do_install_config_xml {
|
||||
sub do_install_config_json {
|
||||
get_installation_variables();
|
||||
|
||||
#::: Fetch XML template
|
||||
get_remote_file($install_repository_request_url . "eqemu_config.xml", "eqemu_config_template.xml");
|
||||
#::: Fetch json template
|
||||
get_remote_file($install_repository_request_url . "eqemu_config.json", "eqemu_config_template.json");
|
||||
|
||||
#::: Open new config file
|
||||
open (NEW_CONFIG, '>', 'eqemu_config.xml');
|
||||
use JSON;
|
||||
my $json = new JSON();
|
||||
|
||||
my $content;
|
||||
open(my $fh, '<', "eqemu_config_template.json") or die "cannot open file $filename"; {
|
||||
local $/;
|
||||
$content = <$fh>;
|
||||
}
|
||||
close($fh);
|
||||
|
||||
$config = $json->decode($content);
|
||||
|
||||
$in_database_tag = 0;
|
||||
$long_name = "Akkas " . $OS . " PEQ Installer (" . generate_random_password(5) . ')';
|
||||
$config->{"server"}{"world"}{"longname"} = $long_name;
|
||||
$config->{"server"}{"world"}{"key"} = generate_random_password(30);
|
||||
|
||||
#::: Iterate through template and replace variables...
|
||||
open (FILE_TEMPLATE, "eqemu_config_template.xml");
|
||||
while (<FILE_TEMPLATE>){
|
||||
chomp;
|
||||
$o = $_;
|
||||
|
||||
#::: Find replace variables
|
||||
|
||||
if($o=~/\<\!--/i){
|
||||
next;
|
||||
}
|
||||
|
||||
if($o=~/database/i && $o=~/\<\//i){
|
||||
$in_database_tag = 0;
|
||||
}
|
||||
if($o=~/database/i){
|
||||
$in_database_tag = 1;
|
||||
}
|
||||
|
||||
if($o=~/key/i){
|
||||
my($replace_key) = $o =~ />(\w+)</;
|
||||
$new_key = generate_random_password(30);
|
||||
$o =~ s/$replace_key/$new_key/g;
|
||||
}
|
||||
if($o=~/\<longname\>/i){
|
||||
my($replace_name) = $o =~ /<longname>(.*)<\/longname>/;
|
||||
$append = '(' . generate_random_password(5) . ')';
|
||||
$o =~ s/$replace_name/Akkas $OS PEQ Installer $append/g;
|
||||
}
|
||||
if($o=~/\<username\>/i && $in_database_tag){
|
||||
my($replace_username) = $o =~ />(\w+)</;
|
||||
$o =~ s/$replace_username/$installation_variables{"mysql_eqemu_user"}/g;
|
||||
}
|
||||
if($o=~/\<password\>/i && $in_database_tag){
|
||||
my($replace_password) = $o =~ />(\w+)</;
|
||||
$o =~ s/$replace_password/$installation_variables{"mysql_eqemu_password"}/g;
|
||||
}
|
||||
if($o=~/\<db\>/i){
|
||||
my($replace_db_name) = $o =~ />(\w+)</;
|
||||
|
||||
#::: There is really no reason why this shouldn't be set
|
||||
if($installation_variables{"mysql_eqemu_db_name"}){
|
||||
$db_name = $installation_variables{"mysql_eqemu_db_name"};
|
||||
}
|
||||
else {
|
||||
$db_name = "peq";
|
||||
}
|
||||
|
||||
$o =~ s/$replace_db_name/$db_name/g;
|
||||
}
|
||||
print NEW_CONFIG $o . "\n";
|
||||
if($installation_variables{"mysql_eqemu_db_name"}){
|
||||
$db_name = $installation_variables{"mysql_eqemu_db_name"};
|
||||
}
|
||||
else {
|
||||
$db_name = "peq";
|
||||
}
|
||||
|
||||
close(FILE_TEMPLATE);
|
||||
close(NEW_CONFIG);
|
||||
unlink("eqemu_config_template.xml");
|
||||
$config->{"server"}{"database"}{"username"} = $installation_variables{"mysql_eqemu_user"};
|
||||
$config->{"server"}{"database"}{"password"} = $installation_variables{"mysql_eqemu_password"};
|
||||
$config->{"server"}{"database"}{"db"} = $db_name;
|
||||
|
||||
$config->{"server"}{"qsdatabase"}{"username"} = $installation_variables{"mysql_eqemu_user"};
|
||||
$config->{"server"}{"qsdatabase"}{"password"} = $installation_variables{"mysql_eqemu_password"};
|
||||
$config->{"server"}{"qsdatabase"}{"db"} = $db_name;
|
||||
|
||||
$json->canonical(1);
|
||||
$json->indent_length(5);
|
||||
|
||||
open(my $fh, '>', 'eqemu_config.json');
|
||||
print $fh $json->pretty->indent_length(5)->utf8->encode($config);
|
||||
close $fh;
|
||||
|
||||
unlink("eqemu_config_template.json");
|
||||
}
|
||||
|
||||
sub fetch_utility_scripts {
|
||||
@@ -725,6 +776,13 @@ sub show_menu_prompt {
|
||||
print "Enter a command #> ";
|
||||
$last_menu = trim($input);
|
||||
}
|
||||
elsif($input eq "conversions"){
|
||||
print "\n>>> Conversions Menu\n\n";
|
||||
print " [quest_heading_convert] Converts old heading format in quest scripts to new (live format)\n";
|
||||
print " \n> main - go back to main menu\n";
|
||||
print "Enter a command #> ";
|
||||
$last_menu = trim($input);
|
||||
}
|
||||
elsif($input eq "assets"){
|
||||
print "\n>>> Server Assets Menu\n\n";
|
||||
print " [maps] Download latest maps\n";
|
||||
@@ -733,7 +791,7 @@ sub show_menu_prompt {
|
||||
print " [plugins] Download latest plugins\n";
|
||||
print " [lua_modules] Download latest lua_modules\n";
|
||||
print " [utility_scripts] Download utility scripts to run and operate the EQEmu Server\n";
|
||||
if($OS eq "Windows"){
|
||||
if($OS eq "Windows") {
|
||||
print ">>> Windows\n";
|
||||
print " [windows_server_download] Updates server via latest 'stable' code\n";
|
||||
print " [windows_server_latest] Updates server via latest commit 'unstable'\n";
|
||||
@@ -766,6 +824,8 @@ sub show_menu_prompt {
|
||||
elsif($input eq "setup_loginserver"){ do_windows_login_server_setup(); $dc = 1; }
|
||||
elsif($input eq "new_server"){ new_server(); $dc = 1; }
|
||||
elsif($input eq "setup_bots"){ setup_bots(); $dc = 1; }
|
||||
elsif($input eq "linux_login_server_setup"){ do_linux_login_server_setup(); $dc = 1; }
|
||||
elsif($input eq "quest_heading_convert"){ quest_heading_convert(); $dc = 1; }
|
||||
elsif($input eq "exit"){
|
||||
exit;
|
||||
}
|
||||
@@ -816,6 +876,7 @@ sub print_main_menu {
|
||||
print " [assets] Manage server assets \n";
|
||||
print " [new_server] New folder EQEmu/PEQ install - Assumes MySQL/Perl installed \n";
|
||||
print " [setup_bots] Enables bots on server - builds code and database requirements \n";
|
||||
print " [conversions] Routines used for conversion of scripts/data \n";
|
||||
print "\n";
|
||||
print " exit \n";
|
||||
print "\n";
|
||||
@@ -858,13 +919,13 @@ sub check_for_database_dump_script{
|
||||
return;
|
||||
}
|
||||
|
||||
#::: Check for script changes :: db_dumper.pl
|
||||
get_remote_file($eqemu_repository_request_url . "utils/scripts/db_dumper.pl", "updates_staged/db_dumper.pl", 0, 1, 1);
|
||||
#::: Check for script changes :: database_dumper.pl
|
||||
get_remote_file($eqemu_repository_request_url . "utils/scripts/database_dumper.pl", "updates_staged/database_dumper.pl", 0, 1, 1);
|
||||
|
||||
if(-e "updates_staged/db_dumper.pl") {
|
||||
if(-e "updates_staged/database_dumper.pl") {
|
||||
|
||||
my $remote_script_size = -s "updates_staged/db_dumper.pl";
|
||||
my $local_script_size = -s "db_dumper.pl";
|
||||
my $remote_script_size = -s "updates_staged/database_dumper.pl";
|
||||
my $local_script_size = -s "database_dumper.pl";
|
||||
|
||||
if($remote_script_size != $local_script_size){
|
||||
print "[Update] Script has been updated, updating...\n";
|
||||
@@ -876,14 +937,14 @@ sub check_for_database_dump_script{
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
if($file=~/db_dumper/i){
|
||||
if($file=~/database_dumper/i){
|
||||
$destination_file = $file;
|
||||
$destination_file =~s/updates_staged\///g;
|
||||
print "[Install] Installing :: " . $destination_file . "\n";
|
||||
unlink($destination_file);
|
||||
copy_file($file, $destination_file);
|
||||
if($OS eq "Linux"){
|
||||
system("chmod 755 db_dumper.pl");
|
||||
system("chmod 755 database_dumper.pl");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -893,7 +954,7 @@ sub check_for_database_dump_script{
|
||||
print "[Update] No script update necessary...\n";
|
||||
}
|
||||
|
||||
unlink("updates_staged/db_dumper.pl");
|
||||
unlink("updates_staged/database_dumper.pl");
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -903,7 +964,7 @@ sub check_for_database_dump_script{
|
||||
sub database_dump {
|
||||
check_for_database_dump_script();
|
||||
print "[Database] Performing database backup....\n";
|
||||
print `perl db_dumper.pl database="$db" loc="backups"`;
|
||||
print `perl database_dumper.pl database="$db" loc="backups"`;
|
||||
}
|
||||
|
||||
sub database_dump_player_tables {
|
||||
@@ -921,7 +982,7 @@ sub database_dump_player_tables {
|
||||
}
|
||||
$tables = substr($tables, 0, -1);
|
||||
|
||||
print `perl db_dumper.pl database="$db" loc="backups" tables="$tables" backup_name="player_tables_export" nolock`;
|
||||
print `perl database_dumper.pl database="$db" loc="backups" tables="$tables" backup_name="player_tables_export" nolock`;
|
||||
|
||||
print "[Database] Press any key to continue...\n";
|
||||
|
||||
@@ -932,7 +993,7 @@ sub database_dump_player_tables {
|
||||
sub database_dump_compress {
|
||||
check_for_database_dump_script();
|
||||
print "[Database] Performing database backup....\n";
|
||||
print `perl db_dumper.pl database="$db" loc="backups" compress`;
|
||||
print `perl database_dumper.pl database="$db" loc="backups" compress`;
|
||||
}
|
||||
|
||||
sub script_exit{
|
||||
@@ -1008,7 +1069,7 @@ sub get_remote_file{
|
||||
}
|
||||
|
||||
#::: wget -O db_update/db_update_manifest.txt https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt
|
||||
$wget = `wget -N --no-check-certificate --quiet -O $destination_file $request_url`;
|
||||
$wget = `wget -N --cache=no --no-check-certificate --quiet -O $destination_file $request_url`;
|
||||
print "[Download] Saved: (" . $destination_file . ") from " . $request_url . "\n" if !$silent_download;
|
||||
if($wget=~/unable to resolve/i){
|
||||
print "Error, no connection or failed request...\n\n";
|
||||
@@ -1072,6 +1133,26 @@ sub read_eqemu_config_xml {
|
||||
close(CONFIG);
|
||||
}
|
||||
|
||||
sub read_eqemu_config_json {
|
||||
use JSON;
|
||||
my $json = new JSON();
|
||||
|
||||
my $content;
|
||||
open(my $fh, '<', "eqemu_config.json") or die "cannot open file $filename"; {
|
||||
local $/;
|
||||
$content = <$fh>;
|
||||
}
|
||||
close($fh);
|
||||
|
||||
$config = $json->decode($content);
|
||||
|
||||
$db = $config->{"server"}{"database"}{"db"};
|
||||
$host = $config->{"server"}{"database"}{"host"};
|
||||
$user = $config->{"server"}{"database"}{"username"};
|
||||
$pass = $config->{"server"}{"database"}{"password"};
|
||||
|
||||
}
|
||||
|
||||
#::: Fetch Latest PEQ AA's
|
||||
sub aa_fetch{
|
||||
if(!$db){
|
||||
@@ -1277,6 +1358,8 @@ sub do_windows_login_server_setup {
|
||||
|
||||
sub do_linux_login_server_setup {
|
||||
|
||||
build_linux_source();
|
||||
|
||||
for my $file (@files) {
|
||||
$destination_file = $file;
|
||||
$destination_file =~s/updates_staged\/login_server\///g;
|
||||
@@ -1297,6 +1380,8 @@ sub do_linux_login_server_setup {
|
||||
get_remote_file($install_repository_request_url . "linux/login.ini", "login_template.ini");
|
||||
get_remote_file($install_repository_request_url . "linux/login_opcodes.conf", "login_opcodes.conf");
|
||||
get_remote_file($install_repository_request_url . "linux/login_opcodes_sod.conf", "login_opcodes_sod.conf");
|
||||
get_remote_file($install_repository_request_url . "linux/server_start_with_login.sh", "server_start_with_login.sh");
|
||||
system("chmod 755 *.sh");
|
||||
|
||||
get_installation_variables();
|
||||
my $db_name = $installation_variables{"mysql_eqemu_db_name"};
|
||||
@@ -2181,3 +2266,134 @@ sub generate_random_password {
|
||||
return $randpassword;
|
||||
}
|
||||
|
||||
sub quest_heading_convert {
|
||||
|
||||
if(trim(get_mysql_result("SELECT value FROM variables WHERE varname = 'new_heading_conversion'")) eq "true") {
|
||||
print "Conversion script has already ran... doing this again would skew proper heading values in function calls...\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
%matches = (
|
||||
0 => ["quest::spawn2", 6],
|
||||
1 => ["eq.spawn2", 6],
|
||||
2 => ["eq.unique_spawn", 6],
|
||||
3 => ["quest::unique_spawn", 6],
|
||||
4 => ["GMMove", 3],
|
||||
5 => ["MovePCInstance", 5],
|
||||
6 => ["MovePC", 4],
|
||||
7 => ["moveto", 3],
|
||||
);
|
||||
|
||||
$total_matches = 0;
|
||||
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
|
||||
my @files;
|
||||
my $start_dir = "quests/.";
|
||||
find(
|
||||
sub { push @files, $File::Find::name unless -d; },
|
||||
$start_dir
|
||||
);
|
||||
for my $file (@files) {
|
||||
|
||||
#::: Skip non script files
|
||||
if($file!~/lua|pl/i){ next; }
|
||||
|
||||
if($file=~/lua|pl/i){
|
||||
$print_buffer = "";
|
||||
|
||||
$changes_made = 0;
|
||||
|
||||
#::: Open and read line by line
|
||||
open (FILE, $file);
|
||||
while (<FILE>) {
|
||||
chomp;
|
||||
$line = $_;
|
||||
|
||||
#::: Loop through matches
|
||||
foreach my $key (sort(keys %matches)) {
|
||||
$argument_position = $matches{$key}[1];
|
||||
$match = $matches{$key}[0];
|
||||
|
||||
if($line=~/$match/i) {
|
||||
$line_temp = $line;
|
||||
$line_temp =~s/$match\(//g;
|
||||
$line_temp =~s/\(.*?\)//gs;
|
||||
$line_temp =~s/\);.*//;
|
||||
$line_temp =~s/\).*//;
|
||||
$line_temp =~s/\):.*//;
|
||||
$line_temp =~s/\);//g;
|
||||
|
||||
@line_data = split(",", $line_temp);
|
||||
|
||||
# use Data::Dumper;
|
||||
# print Dumper(\@line_data);
|
||||
|
||||
$heading_value = $line_data[$argument_position];
|
||||
$heading_value_clean = trim($heading_value);
|
||||
$heading_value_raw = $line_data[$argument_position];
|
||||
$heading_value_before = $line_data[$argument_position - 1];
|
||||
|
||||
if (looks_like_number($heading_value) && $heading_value != 0 && ($heading_value * 2) <= 512) {
|
||||
$heading_value_new = $heading_value * 2;
|
||||
|
||||
$heading_value=~s/$heading_value_clean/$heading_value_new/g;
|
||||
|
||||
$heading_value_search = quotemeta($heading_value_before . "," . $heading_value_raw);
|
||||
$heading_value_replace = $heading_value_before . "," . $heading_value;
|
||||
|
||||
print $file . "\n";
|
||||
print $line . "\n";
|
||||
$line=~s/$heading_value_search/$heading_value_replace/g;
|
||||
print $line . "\n";
|
||||
print "\n";
|
||||
|
||||
$changes_made = 1;
|
||||
}
|
||||
elsif ($heading_value == 0){} #::: Do nothing
|
||||
elsif ($heading_value=~/GetHeading|heading|\$h/i){} #::: Do nothing
|
||||
else {
|
||||
if ($file=~/\.pl/i) {
|
||||
if($line_temp=~/#/i) {
|
||||
$line .= " - needs_heading_validation";
|
||||
}
|
||||
else {
|
||||
$line .= " # needs_heading_validation";
|
||||
}
|
||||
}
|
||||
elsif ($file=~/\.lua/i) {
|
||||
if($line_temp=~/--/i) {
|
||||
$line .= " - needs_heading_validation";
|
||||
}
|
||||
else {
|
||||
$line .= " -- needs_heading_validation";
|
||||
}
|
||||
}
|
||||
|
||||
$changes_made = 1;
|
||||
|
||||
print $line . "\n";
|
||||
}
|
||||
|
||||
$total_matches++;
|
||||
}
|
||||
}
|
||||
|
||||
$print_buffer .= $line . "\n";
|
||||
}
|
||||
close (FILE);
|
||||
|
||||
if($changes_made == 1) {
|
||||
#::: Write changes
|
||||
open (NEW_FILE, '>', $file);
|
||||
print NEW_FILE $print_buffer;
|
||||
close NEW_FILE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#::: Mark conversion as ran
|
||||
print get_mysql_result("INSERT INTO `variables` (varname, value, information, ts) VALUES ('new_heading_conversion', 'true', 'Script ran against quests folder to convert new heading values', NOW())");
|
||||
|
||||
print "Total matches: " . $total_matches . "\n";
|
||||
}
|
||||
@@ -119,18 +119,15 @@ if [[ "$OS" == "Debian" ]]; then
|
||||
apt-get $apt_options install zlibc
|
||||
apt-get $apt_options install libsodium-dev
|
||||
apt-get $apt_options install libsodium18
|
||||
apt-get $apt_options install libjson-perl
|
||||
|
||||
# If libsodium18 isn't installed (Debian), let's download both that and the dev package and install them.
|
||||
if dpkg-query -s "libsodium18" 1>/dev/null 2>&1; then
|
||||
echo "Sodium library already installed."
|
||||
else
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium-dev_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium-dev.deb
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium18_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium18.deb
|
||||
dpkg -i /home/eqemu/libsodium*.deb
|
||||
# Cleanup after ourselves
|
||||
rm -f /home/eqemu/libsodium-dev.deb
|
||||
rm -f /home/eqemu/libsodium18.deb
|
||||
fi
|
||||
# Install libsodium
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium-dev_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium-dev.deb
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libs/libsodium/libsodium18_1.0.11-1~bpo8+1_amd64.deb -O /home/eqemu/libsodium18.deb
|
||||
dpkg -i /home/eqemu/libsodium*.deb
|
||||
# Cleanup after ourselves
|
||||
rm -f /home/eqemu/libsodium-dev.deb
|
||||
rm -f /home/eqemu/libsodium18.deb
|
||||
|
||||
#::: Install FTP for remote FTP access
|
||||
echo "proftpd-basic shared/proftpd/inetd_or_standalone select standalone" | debconf-set-selections
|
||||
@@ -159,7 +156,7 @@ EOF
|
||||
# Install prereqs
|
||||
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
yum -y install deltarpm
|
||||
yum -y install open-vm-tools vim cmake boost-* zlib-devel mariadb-server mariadb-client mariadb-devel mariadb-libs mariadb-compat perl-* lua* dos2unix php-mysql proftpd
|
||||
yum -y install open-vm-tools vim cmake boost-* zlib-devel mariadb-server mariadb-client mariadb-devel mariadb-libs mariadb-compat perl-* lua* dos2unix php-mysql proftpd libuuid-devel
|
||||
yum -y groupinstall "Development Tools" "Basic Web Server" "Compatibility Libraries"
|
||||
|
||||
elif [[ "$OS" == "fedora_core" ]]; then
|
||||
|
||||
@@ -368,6 +368,14 @@
|
||||
9112|2017_06_24_rule_values_expand.sql|SHOW COLUMNS FROM rule_values WHERE Field = 'rule_value' and Type = 'varchar(30)'|empty|
|
||||
9113|2017_07_19_show_name.sql|SHOW COLUMNS FROM `npc_types` LIKE 'show_name'|empty|
|
||||
9114|2017_07_22_aura.sql|SHOW TABLES LIKE 'auras'|empty|
|
||||
9115|2017_10_28_traps.sql|SHOW COLUMNS FROM `traps` LIKE 'triggered_number'|empty|
|
||||
9116|2017_12_16_GroundSpawn_Respawn_Timer.sql|SHOW COLUMNS FROM `ground_spawns` WHERE Field = 'respawn_timer' AND Type = 'int(11) unsigned'|empty|
|
||||
9117|2018_02_01_NPC_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `npc_spells_entries` LIKE 'min_hp'|empty|
|
||||
9118|2018_02_04_Charm_Stats.sql|SHOW COLUMNS FROM `npc_types` LIKE 'charm_ac'|empty|
|
||||
9119|2018_02_10_GlobalLoot.sql|SHOW TABLES LIKE 'global_loot'|empty|
|
||||
9120|2018_02_13_Heading.sql|SELECT value FROM variables WHERE varname = 'fixed_heading'|empty|
|
||||
9121|2018_02_18_bug_reports.sql|SHOW TABLES LIKE 'bug_reports'|empty|
|
||||
9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
9015|2017_02_26_bots_spell_casting_chances_update.sql|SHOW COLUMNS FROM `bot_spell_casting_chances` LIKE 'value'|not_empty|
|
||||
9016|2017_02_26_bots_spell_casting_chances_update.sql|SHOW TABLES LIKE 'bot_spell_casting_chances'|empty|
|
||||
9017|2017_03_26_bots_spells_id_fix_for_saved_shadowknight_bots.sql|SELECT * FROM `bot_data` WHERE `class` = '5' AND `spells_id` = '3004'|not_empty|
|
||||
9018|2018_02_02_Bot_Spells_Min_Max_HP.sql|SHOW COLUMNS FROM `bot_spells_entries` LIKE 'min_hp'|empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user