59 Commits

Author SHA1 Message Date
Shauren
ff6df050c5 Core/Misc: Remove boost/algorithm dependency 2025-06-08 14:37:54 +02:00
Shauren
71b681bbf0 Core/Network: Move to separate project 2025-04-09 21:02:31 +02:00
Shauren
898a941b10 Adjust previous commit to compile with clang on systems that have gcc 12 installed 2024-11-27 13:55:47 +01:00
Shauren
2a6fd947de Core/Misc: Modernize and improve GetMainPartOfName 2024-11-26 20:14:35 +01:00
Shauren
1a41281e37 Core/Misc: Replace std::ostringstream based formatting with Trinity::StringFormat where possible in common and database projects 2024-10-16 18:58:45 +02:00
Shauren
81bec6954f Core/Logging: Minor internal refactor
* Avoid formatting to output with fprintf
* Use vector instead of unordered_map to store appenders in Logger
2024-07-16 16:31:40 +02:00
Shauren
333630b7de Core/Misc: Added windows version checks during startup to avoid confusion about crashes when running on unsupported OS 2023-12-01 19:53:13 +01:00
Shauren
b888b1b09f Core/Calendar: Implement different timezone support for ingame calendar
Closes #8390
Closes #29427
2023-11-21 12:25:22 +01:00
Shauren
3260b94dd6 Core/Misc: Replace string to int conversion functions from Common.h with c++17 std::from_chars based ones Trinity::StringTo 2023-05-13 15:46:27 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
a53e4a5756 Core/Misc: Replace enable_if overload selection with if constexpr 2023-01-07 22:38:21 +01:00
Lloyd Dilley
1c36441b7c Core/Misc: Fix *BSD compile errors (#28287)
(cherry picked from commit 2b8fc95fde)
2022-10-01 17:33:25 +02: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
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
Treeston
378691aaa2 [3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443)
(cherry picked from commit 75f9e7396e)
2022-02-05 23:42:15 +01:00
Treeston
013c9b2cb7 Core/ChatCommands: make ExactSequence more readable
(cherry picked from commit feaaa595ca)
2022-02-05 21:29:53 +01:00
Treeston
0d54a5ecb4 Core/Misc: Add support for custom link colors. Clean-up hyperlink validation, no more long-ass defines. Remove UI.ShowQuestLevelsInDialogs.
(cherry picked from commit eaf8fa75a1)
2022-02-04 23:49:59 +01:00
Treeston
9f97fdd31a Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)
(cherry picked from commit 534a2388b7)
2022-02-04 00:27:14 +01:00
Treeston
be9dadc189 Common/Utilities: Centralize string -> T conversion in StringConvert.h (PR #25335)
(cherry picked from commit cd30e0b86c)
2022-02-04 00:27:13 +01:00
Treeston
0473beff2b Core/Misc: std::string -> std::string_view in a bunch of places, notably chat commands and Util.h
(cherry picked from commit a41bbd9ad9)
2022-02-04 00:27:12 +01:00
Peter Keresztes Schmidt
3923650aeb Core/ChatCommands: Add support for enum type arguments (PR #25242)
(cherry picked from commit 5e40eb20e2)
2022-01-26 22:13:06 +01:00
Treeston
fa8ab6eb98 Core/Common: Move old-style pointer+size HexStr methods to Trinity::Impl where they can't hurt anyone
(cherry picked from commit 7b8b999516)
2022-01-26 14:36:42 +01:00
Shauren
2b312c7bd2 Dep: Switch to boost process instead of old standalone version
(cherry picked from commit 524d167398)
2022-01-23 20:39:15 +01:00
Ujp8LfXBJ6wCPR
43aa763d04 Part1: Modernize codebase with Clang-Tidy range based loops (#24164)
(cherry picked from commit fb75a958f0)
2021-12-22 15:48:01 +01:00
ForesterDev
8c6974bc9f Core/Server: improve timestamp format output for large time values (#24193)
(cherry picked from commit 71a01c75ca)
2021-12-22 14:55:23 +01:00
ForesterDev
69f7686050 Core/Server: correct timestamp format for shutdown/restart notification broadcasts (#24181)
* Core/SmartScripts: implement SMART_ACTION_OVERRIDE_LIGHT and SMART_ACTION_OVERRIDE_WEATHER

* Core/Server: correct timestamp format for shutdown/restart notification broadcasts

* remove unexpected changes

* move enum from Common to Util

* Use enum class instead of enum

* Fix width for seconds 0 to 9

(cherry picked from commit 69231581e4)
2021-12-22 01:25:24 +01:00
Treeston
28942db431 Common/Util: Sorry about that unexpected downtime at 3AM last night, everyone. (We call them happy little features.)
(cherry picked from commit a4d5b24874)
2021-12-18 15:33:44 +01:00
Treeston
51fbda4223 Core/Pooling: Quest pooling rewrite: (PR#23627)
- Split quest pooling from PoolMgr (into QuestPoolMgr)
- Proper saving/restoring on server restart
- No more hacking into sObjectMgr to insert/remove available quests

(cherry picked from commit a5e73e41c0)
2021-12-18 15:28:45 +01:00
Treeston
87c2d247d9 Core/Misc: Rewrite some old name handling functions that use raw buffers to no longer be old name handling functions that use raw buffers.
(cherry picked from commit 309851ea24)
2021-12-18 11:25:59 +01:00
Giacomo Pozzoni
493fe066f6 Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf (#23540)
* Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf

* Handle Respawn.RestartQuietTime too

* Handle XP.Boost.Daymask too

* Core/Misc: Code cleanup

* Core/Misc: Code cleanup

* Update Util.cpp

* Update boosted_xp.cpp

(cherry picked from commit aeddd417c4)
2021-12-16 22:35:44 +01:00
jackpoz
5600316c9f Core/Calendar: Improve calendar timezone handling
Improve calendar timezone handling by at least creating events with the correct time if both client and server are in the same timezone. There is currently no information received from the client about in which timezone it is.

(cherry picked from commit b33934f6ce)
2021-12-01 00:46:05 +01:00
jackpoz
e9e3d2d69d Core/Utils: Handle UTF-8 conversion errors
Replace the output string when a UTF-8 conversion error happen with an error message instead of using an empty string, swallowing any message that the caller wanted to log.

(cherry picked from commit bdb7e6e5e8)
2021-11-21 14:38:29 +01:00
Treeston
549d5fea31 Core/Utils: some code style adjustments, 6d6077e follow-up
(cherry picked from commit 4c3af3b636)
2021-11-16 21:05:35 +01:00
Treeston
4f8fd56903 Core/Utils: Fix Unicode handling
(cherry picked from commit 6d6077e36f)
2021-11-16 21:04:53 +01:00
Treeston
e506c80a64 Core/Chat: Unify chat hyperlink parsing (PR #22417)
- Validate most link properties all the time
- If enabled, also validate link text (needs locale)
- Instead of blocking the entire message, sanitize it
- Apply filtering to DND/AFK messages. Closes #22399

(cherry picked from commit f27284594b)
2021-10-31 01:39:04 +02:00
Treeston
0c681b6509 Scripts/Commands: New argument parsing methodology (PR #22363)
- Detect the arguments accepted by the command handler
- Tokenize out those arguments automatically and feed them to the handler
- Unmatched rest of the string can be accepted by trailing char const* or CommandArgs*

(cherry picked from commit 66a87c4642)
2021-10-25 00:03:23 +02:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston
e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd91)
2020-08-03 19:39:00 +02:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
Shauren
aced88b09b Core/AuctionHouse: After taking a break at the start of patch 8.3 auction house is now back in business. 2020-04-20 20:36:24 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
dfd2660a85 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173
2018-01-06 01:21:59 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
joschiwald
ae070a1b64 Core/Spells: Implemented ConeAngle from DB2 2017-07-18 15:16:32 +02:00
Shauren
4226eb2ea5 Core/Misc: Some /W4 warning fixes 2017-06-07 17:23:50 +02:00
Shauren
3a418a0bbc Core/Common: Include cleanup 2017-05-11 22:29:51 +02:00