Commit Graph

683 Commits

Author SHA1 Message Date
Shauren
1942647c0d Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer
(cherry picked from commit c81183a660)
2025-02-18 15:39:41 +01:00
Mykhailo Redko
62fe2d6a8d Core/Chat: Corrected names and descriptions for GM.LowerSecurity config option and related rbac permission (#30644) 2025-02-14 18:53:07 +01:00
Benjamin Jackson
65e2474ff2 Core/Players: Add separate config option for starting money for Death Knight characters (#30466) 2024-11-29 13:03:37 +01:00
Смердокрыл
2fca554555 Core/Config: Implement reading config overrides from subdirectory (#29068)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 74a4dc46b4)
2024-04-07 12:05:20 +02:00
Shauren
eb50b29ab3 Core/Misc: Added windows version checks during startup to avoid confusion about crashes when running on unsupported OS
(cherry picked from commit 333630b7de)
2023-12-02 15:57:09 +01:00
Shauren
7be101ac67 Core/Locales: Set active code page and locale used by c string functions to utf8
Closes #29455

(cherry picked from commit b299902881)
2023-12-02 15:57:09 +01:00
Shauren
aaa6e73c8c Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1d)
2023-08-15 20:10:04 +02:00
Shauren
3144566584 Core/Misc: Include cleanup, 2023 edition
(cherry picked from commit 92ed5e8af1)
2023-08-12 17:56:16 +02:00
Aokromes
e11613eeb5 Update worldserver.conf.dist 2023-02-16 10:44:41 +01:00
Shauren
966e38ab75 Core/Misc: Fixed worldserver shutdown with --update-databases-only
(cherry picked from commit edc922d532)
2022-10-13 12:54:40 +02:00
Shauren
2c0bf1c407 Core/Misc: Minor cleanup in worldserver main.cpp 2022-10-08 21:22:28 +02:00
Shauren
d82b2b1a67 Core/Threading: Create ThreadPool class 2022-10-08 21:22:28 +02:00
Giacomo Pozzoni
de4920de81 Core/World: Include more details about MaxCoreStuckTime asserts (#28188)
* Core/World: Include more details about MaxCoreStuckTime asserts

Include more details about MaxCoreStuckTime asserts that might help find why FreezeDetector gets triggered with idle MapThreads

* Codestyle fix
2022-09-11 18:45:14 +02:00
Shauren
27259f8524 Core/Crypto: Fixed loading legacy openssl provider for RC4 on windows 2022-06-16 12:37:00 +02:00
Shauren
77091ed599 Core/Crypto: Switch away from most deprecated openssl functions and removed upper version limit
(cherry picked from commit bc87f7b337)
2022-06-16 12:37:00 +02:00
stoneharry
5384fc194f Core/Chat: Apply chat flood control to addon messages as well (#26908)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-04-17 00:27:28 +02:00
Shauren
29a4153f00 Core/World: Allow specifying minimum world updates diff in config 2022-04-16 23:14:42 +02:00
jackpoz
055dffaa71 Core/Metric: Send metrics in smaller intervals
Send metrics in smaller intervals to reduce the chances of triggering HTTP status "413 Payload Too Large" from InfluxDB.
Another way to avoid this is to set max-body-size to 0 in InfluxDB config.
For more information see https://docs.influxdata.com/influxdb/v1.8/administration/config/#max-body-size--25000000
2022-04-10 17:00:48 +02:00
Shauren
32cef906b0 Core/Time: Remove artificially high minimal update intervals
(cherry picked from commit 3a67e37681)
2022-01-03 16:19:29 +01:00
Maks Szokalski
b1e7f2489c Flash worldserver on taskbar on thread start (#26886)
* Flush worldserver on taskbar on thread start

* update

* update

* fix codestyle

* Update worldserver.conf.dist

* Update src/server/worldserver/worldserver.conf.dist

Co-authored-by: NoName <322016+Faq@users.noreply.github.com>

Co-authored-by: NoName <322016+Faq@users.noreply.github.com>
2021-10-01 16:37:39 +02:00
Anton Popovichenko
1ddd9dc19c 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>
2021-08-19 22:26:16 +02:00
Jinnaix
7050a5ccb6 Server/Config - Change default settings for saving gm logs. (#26804)
* Server/Config - Change default settings for saving gm logs.

* update

Prefix Timestamp to the text
2021-08-13 16:59:43 +02:00
jackpoz
8fcf59f9db Core/Misc: Fix build on systems where size_t is not defined as uintXX_t, i.e. Mac 2021-08-06 19:46:37 +02:00
jackpoz
de4ccc7f27 Core/SOAP: Fix memory leak on shutdown reported by ASan 2021-07-30 18:42:43 +02:00
jackpoz
2a12e96d17 Core/SOAP: Fix new/free mismatch reported by ASan 2021-07-30 17:54:46 +02:00
Giacomo Pozzoni
68bf7e6d12 Core/Network: Add option to allow/disallow saving IP addresses to database (#26723)
Add config option AllowLoggingIPAddressesInDatabase to authserver and worldserver to specify if IP addresses can be logged or not to the database
2021-07-28 11:44:24 +02:00
Giacomo Pozzoni
96dc110f4a 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
2021-07-24 14:50:30 +02:00
Chaouki Dhib
d337fb99ed Core/Movement: Implement proper player speed change (#26561) 2021-06-15 23:09:48 +02:00
KoNicks
4b0089bf7d Core/Misc: Fix build when using libstdc++-11 (#26564) 2021-05-30 18:52:35 +02:00
Mikhail Redko
6c12f45f3b 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>
2021-05-11 09:55:57 +02:00
Mikhail Redko
1539bed3db 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
2021-04-11 19:41:44 +02:00
illfated
23cd884f3b DB/Item: Remove Plans: Goblin Rocket Boots (7192) from loot & exclude from being sold by AHbot
Closes #25930
2021-01-24 15:10:04 +02:00
Kargatum
a32b6b8ac4 Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf
2021-01-03 11:47:07 +01:00
Gildor
8217519ea2 Core/Visibility: Split BG/Arena visibility settings (#25690) 2020-12-26 23:30:16 +01:00
Shauren
155e37831e Dep/Boost: Partial support for boost 1.74 - asio
Ref #25470
2020-09-27 20:20:59 +02:00
Treeston
1eca51b417 [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463) 2020-09-20 02:50:38 +02:00
Treeston
75f9e7396e [3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443) 2020-09-12 19:42:10 +02:00
jackpoz
5498f3be96 Core/PathFinding: Enable pathfinding (MMaps) by default 2020-09-06 21:34:19 +02:00
Treeston
eaf8fa75a1 Core/Misc: Add support for custom link colors. Clean-up hyperlink validation, no more long-ass defines. Remove UI.ShowQuestLevelsInDialogs. 2020-09-02 22:01:51 +02:00
Jinnaix
812c2af4da Core/Misc: Update Worldserver.conf for AhBot Pricing -make things more clear (#25341)
* AhBot Pricing: Make things more clear

* Change default value to BuyPrice and add some more information to how two sided AH works

* Sync c++ configs with .conf ones

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-08-29 17:05:59 +02:00
Treeston
d717b9dc3e Core/Misc: Update worldserver.conf.dist to match actual defaults. 2020-08-21 12:13:38 +02:00
Treeston
a3971ca4b0 Core/Warden: More refactors lifted from #25286. 2020-08-20 17:56:10 +02:00
Shauren
39c5e03b74 Core/CrashHandler: #ifdef cleanup to make VS not choke when parsing, fixed file being all red in editor 2020-08-07 17:19:18 +02:00
Shauren
b3db50a3b4 Core/Misc: Fix compile errors found with msvc /permissive- 2020-08-04 15:42:08 +02:00
Treeston
3164b58c7d Core/Authserver: Re-organize the accounts table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA)
- salt/verifier/session_key are now binary
- old s/v/sha_pass_hash fields kept around for backwards compatibility
- sha_pass_hash is still updated (for now), s/v are not
- sha_pass_hash is only read if s/v have been manually changed
- SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)
2020-08-02 22:52:21 +02:00
Giacomo Pozzoni
deceb11b5f Log sync db queries in World::Update() loop (#25174)
* Core/Misc: Log sync queries on critical path

* Fix build

* Rename

* Fix warning

* Fix no-pch

* Change WarnAboutSyncQueries() to be header-only
2020-07-30 21:42:27 +02:00
Shauren
2f0893d279 Core/Misc: Replace database query in WorldSession::HandleAddFriendOpcode with async version 2020-07-30 17:41:20 +02:00
Giacomo Pozzoni
8a2c79c850 Core/Metric: Log detailed metrics about each opcode handler (#25153)
* Core/Metric: Log detailed metrics about each opcode handler

* Add new panel to Performance profiling dashboard and use fill(0) instead of fill(none)

* Add new settings Metric.Threshold.* to be able to specify the minimum threshold for the specified metrics

* Update dashboard

* Change thresholds to be required to send the metrics. A TC_METRIC_DETAILED_TIMER metric with an expected threshold not configured will be ignored

* Use typedef Milliseconds

* Refresh realms on load
2020-07-28 14:27:54 +02:00
Giacomo Pozzoni
3c0ac7302f Core/Metric: Add more metrics about World::Update() loop (#25098)
* Core/Metric: Add more metrics about World::Update() loop

* Add new Performance profiling grafana dashboard

* Add new cmake setting WITHOUT_METRICS that disables all metrics

As new metrics are added, someone might want to disable them if unused.

* Add more metrics about World::Update() loop

* Remove old performance profiling features

Remove "server set difftime" command, "-RecordUpdateTimeDiffInterval" and "MinRecordUpdateTimeDiff" worldserver config settings and their related code.
The whole UpdateTime class could be removed too.

* Update and rename 2020_07_99_99_world.sql to 2020_07_24_00_world.sql
2020-07-24 00:30:16 +02:00
ipriver
a46d047f94 fixed indentation for cmake files 2020-06-24 14:42:02 +02:00