Commit Graph

482 Commits

Author SHA1 Message Date
Shauren
9d9e11f8ca Core/DataStores: Made DB2LoadInfo constexpr 2022-12-14 00:27:01 +01:00
Shauren
9f753e97f4 Core/Misc: Switch GetLocaleByName to use string_view 2022-11-20 14:55:17 +01:00
Shauren
fc37c42e55 Core/Misc: Added noexcept to move constructors and move assignment operators 2022-11-06 01:03:35 +01:00
Shauren
c9f1606b76 Build: Cleanup boost CMakeLists from pre-c++11 flag checks 2022-11-05 01:08:17 +01:00
Shauren
f59580dc6c Core/Threading: Create ThreadPool class
(cherry picked from commit d82b2b1a67)
2022-10-13 11:54:18 +02:00
Lloyd Dilley
1c36441b7c Core/Misc: Fix *BSD compile errors (#28287)
(cherry picked from commit 2b8fc95fde)
2022-10-01 17:33:25 +02:00
Shauren
301572212f Core/Misc: Changed string formatting functions to accept std::string_view as format argument instead being templated on it to slightly improve compile times and reduce executable size 2022-09-19 00:33:19 +02:00
Shauren
b8f18fad29 Core/Crypto: Remove support for OpenSSL 1.0 2022-09-06 12:51:08 +02:00
ihm-tswow
cec4cb0222 Core/Debugging: Improve SymInitialize fail message (#28206)
* clarify that this is not the crash error, but an error with the crash report itself
* improve formatting and message boundaries
* warn the reader that this means the call stack symbols may be inaccurate

(cherry picked from commit 6e37438e5d)
2022-09-05 22:23:02 +02:00
daMaex
4d1ae6cf06 Core/Crypto: Fixed build with openssl 1.1
(cherry picked from commit 9368823c8d)
2022-09-05 18:49:13 +02:00
Shauren
3fa46c6dc1 Core/Crypto: Fixed loading legacy openssl provider for RC4 on windows 2022-09-05 18:48:43 +02:00
daMaex
13c44517da Core/Crypto: Updated ARC4 code with openssl 3.0 support
(cherry picked from commit 9fca5e9117)
2022-09-05 18:44:05 +02:00
Shauren
eafc5214b2 Core/Misc: Minor refactor to std::hash specialization for std::pair to avoid showing incorrect documentation in IDEs on entire std namespace 2022-09-02 21:25:36 +02:00
Shauren
cf56aff76d Core/Misc: Dynamic build fix (add missing TC_COMMON_API) 2022-08-18 10:00:22 +02:00
Shauren
82b119da91 Core/DataStores: Sprinkle some constexpr on db2 meta 2022-08-16 20:00:36 +02:00
Shauren
72264f1d79 Core/Crypto: Removed unneccessary std::reverse in Ed25519::Sign 2022-08-01 11:54:51 +02:00
Shauren
ed2a2f032a Core/Crypto: Added Ed25519 implementation 2022-08-01 00:12:47 +02:00
Shauren
16a06346ae Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c648
2022-07-23 19:13:33 +02:00
Shauren
758580c076 Core/Crypto: Fixed openssl 3.0 compatibility for custom hmac_sha256 digest for RSA 2022-06-17 15:37:47 +02:00
Shauren
5859510b54 Core/Utils: Added helper function to make creating unique_ptr with custom deleters more convenient 2022-06-17 15:20:55 +02:00
daMaex
71efb44dbd Core/Crypto: Fixed GenericHMAC::Finalize wth openssl 3.0
(cherry picked from commit 0b6f77a006)
2022-06-16 13:53:26 +02:00
jackpoz
ce4916ec79 Core/Metric: Sync default Metric.Interval value
Sync default Metric.Interval value in C++ with the value in worldserver.conf

(cherry picked from commit c83d00a645)
2022-06-10 16:57:35 +02:00
Shauren
88e42e3dc1 Core/Metric: Fixed double logging metric timers
(cherry picked from commit 46b1284f61)
2022-06-10 16:22:15 +02:00
Shauren
a1855591b9 Core/Metric: Build fix for WITH_DETAILED_METRICS
(cherry picked from commit 46b7a361ee)
2022-06-10 16:22:07 +02:00
Shauren
3e60a92211 Core/Metric: Minor optimizations for metrics (reducing number of allocations)
(cherry picked from commit caaedbfa80)
2022-06-10 16:21:28 +02:00
Shauren
3b78762ab8 Core/CrashHandler: Support retrieving windows version names for all future versions
(cherry picked from commit ca9b82fb85)
2022-06-10 15:30:47 +02:00
Shauren
c13d26e1fa Core/GameObjects: Use all axis rotations for gameobject model collision, not just orientation 2022-05-22 14:53:05 +02:00
Shauren
088db0103f Core/Misc: Remove uses of std::aligned_storage (deprecated in future c++ standard) 2022-05-11 13:59:41 +02:00
Shauren
5ba1247587 Core/Logging: Remove string allocations for logs that are not going to be logged 2022-05-09 14:19:02 +02:00
Shauren
aa6a0f2431 Core/Crypto: Fixed EVP_PKEY reference counting for copied objects
Closes #27943
2022-05-06 12:21:59 +02:00
Shauren
849999c1b3 Codestyle fix - remove empty lines 2022-05-03 17:57:51 +02:00
Shauren
2345b33669 Core/Crypto: Fix nopch build 2022-05-03 17:51:47 +02:00
Shauren
bc87f7b337 Core/Crypto: Switch away from most deprecated openssl functions and removed upper version limit 2022-05-03 17:03:57 +02:00
Shauren
aefce9a25c Core/Misc: Prefix include guard to avoid possible conflict with external library 2022-05-03 11:16:35 +02:00
Gosha
428d8dc3b7 Core/Vmaps: Use provided invDirection from G3D::Ray instead of calculating it ourselves (#27883)
Do not calculate inv direction, Ray has one
2022-04-18 21:41:31 +02:00
Anton Popovichenko
8447f627ba Core/Config: Implement config override with env vars (#26811)
* Core/Config: Implement config override with env vars

Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver

* Core/Config Fix typo in logs

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* Core/Config Fix code style in EnvVarForIniKey

Co-authored-by: Shauren <shauren.trinity@gmail.com>

* Update tests/common/Config.cpp

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

* Apply suggestions from code review

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>

Co-authored-by: Anton Popovichenko <anton.popovichenko@mendix.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 1ddd9dc19c)
2022-03-13 16:37:01 +01:00
Giacomo Pozzoni
51f0294c18 Core/DBLayer: Add QueueSize() method (#26733)
* Core/DBLayer: Add QueueSize() method

Add QueueSize() method to database objects (Login, Character and World) that returns how many tasks are queued.
Include the queue size of the 3 databases in ".server debug" command

* Make the code less threadsafe

* Send data to InfluxDB

* Update grafana dashboard

(cherry picked from commit 96dc110f4a)
2022-03-11 19:32:22 +01:00
Giacomo Pozzoni
2bc1bbd91d Common/Misc: Replace old macros with modern C++ attributes (#26613)
(cherry picked from commit 5ae2a0f47d)
2022-03-11 11:48:31 +01:00
Shauren
a5f107dafc Core/Utilities: Fixed child process console output being incorrectly cut off at first newline 2022-03-09 16:22:04 +01:00
Mikhail Redko
9e6def8ae2 Core/Console: Improve ReadWinConsole logic and cosmetic changes (#26402)
* Core/Console: Improve ReadWinConsole logic and cosmetic changes

* Core/Console: Fixed possible appearance of weird characters in the console when printing the output of child processes

* Fix codestyle

* Removed auto

* Core/Misc: Explicit casting Difficulty values to uint8 before outputting to console

* Core/Misc: Cast Difficulty to uint32 for output to console

Co-authored-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit 6c12f45f3b)
2022-03-09 14:55:18 +01:00
Shauren
b1f231452b Core/Console: Fix uninitialized variable
(cherry picked from commit 677952fbc5)
2022-03-08 21:58:16 +01:00
Mikhail Redko
f7441f0234 Core/Misc: Fixed utf8 encoding in console input/output. (#26352)
* Core/Misc: Fixed utf8 encoding in console input/output.

* Fix gcc build

* Fixed that weird 'a' with circle above it and other similar letters. Also fixed encoding in AppenderConsole which sometimes did not work as it should

* Fix build on Linux

* Probably better to do it like this

(cherry picked from commit 1539bed3db)
2022-03-08 15:57:30 +01:00
Giacomo Pozzoni
c2068bd423 CI/CircleCI: Expose binaries built on Circle CI as docker images in the Circle CI artifacts (#25832)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 9af6bf15aa)
2022-03-06 00:24:04 +01:00
Mikhail Redko
81555a8ea4 Core/Misc: Remove unneeded null-terminator after switch from wchar_t to std::wstring in 309851e. Fixes creation characters with declined russian names (#25797)
Closes #23775

(cherry picked from commit eaa22b8a17)
2022-03-05 21:46:57 +01:00
Kargatum
373ed8f46b Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf

(cherry picked from commit a32b6b8ac4)
2022-03-05 20:07:57 +01:00
Aokromes
2f0ed35c26 Common/Metric: Fix build with PERFORMANCE_PROFILING and/or WITHOUT_METRICS
(cherry picked from commit 91cda8b1cd)
2022-02-27 20:08:41 +01:00
Shauren
0b846b2107 Build: Partial support for clang-cl 2022-02-16 20:22:15 +01:00
Shauren
f6e72494f1 Dep: Raise required boost versions to 1.73 on windows and 1.71 on linux and remove compatibility code for unsupported versions 2022-02-14 12:43:57 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Shauren
6c399c372e Core/Misc: common PCH tuning 2022-02-11 23:24:54 +01:00