Commit Graph

47 Commits

Author SHA1 Message Date
Lloyd Dilley
2b8fc95fde Core/Misc: Fix *BSD compile errors (#28287) 2022-10-01 17:17:46 +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
Shauren
677952fbc5 Core/Console: Fix uninitialized variable 2021-04-13 23:27:49 +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
Mikhail Redko
eaa22b8a17 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
2021-01-04 19:52:43 +01:00
Treeston
75f9e7396e [3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443) 2020-09-12 19:42:10 +02:00
Treeston
feaaa595ca Core/ChatCommands: make ExactSequence more readable 2020-09-10 15:19:17 +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
Treeston
534a2388b7 Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327) 2020-08-28 00:11:16 +02:00
Treeston
cd30e0b86c Common/Utilities: Centralize string -> T conversion in StringConvert.h (PR #25335) 2020-08-26 23:31:45 +02:00
Treeston
fd05a35341 Revert "[3.3.5] Core/ChatCommands: C++17 cleanup (if constexpr + std::string_view)"
This reverts commit 11c4a60fbe.
2020-08-24 16:38:39 +02:00
Treeston
11c4a60fbe [3.3.5] Core/ChatCommands: C++17 cleanup (if constexpr + std::string_view) 2020-08-24 16:17:56 +02:00
Treeston
a41bbd9ad9 Core/Misc: std::string -> std::string_view in a bunch of places, notably chat commands and Util.h 2020-08-23 00:31:57 +02:00
Peter Keresztes Schmidt
5e40eb20e2 Core/ChatCommands: Add support for enum type arguments (PR #25242) 2020-08-16 14:11:21 +02:00
Treeston
7b8b999516 Core/Common: Move old-style pointer+size HexStr methods to Trinity::Impl where they can't hurt anyone 2020-08-04 17:03:26 +02:00
Treeston
210176fd91 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
2020-07-26 01:53:34 +02:00
Shauren
524d167398 Dep: Switch to boost process instead of old standalone version 2020-07-15 19:33:12 +02:00
Giacomo Pozzoni
8c09b6e58b Cherry-pick some cmake commits (#24720)
* Build system: Support  new in cmake 3.17 Ninja Multi-Config generator

(cherry picked from commit 369b618d4f)

* Build system: Fixed PCH with MSVC & Ninja generator

(cherry picked from commit d669f46b6d)

* Core: Fix clang 10 warnings

(cherry picked from commit 7272508cb4)

# Conflicts:
#	src/common/Utilities/Util.h
#	src/server/bnetserver/REST/LoginRESTService.cpp
#	src/server/game/Entities/Object/Position.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Guilds/GuildFinderMgr.h
#	src/server/game/Movement/Spline/MoveSplineFlag.h
#	src/server/shared/Dynamic/LinkedList.h

* Build system: Set -Wno-deprecated-copy only for clang 10

(cherry picked from commit 7fdeb259ba)

* Core/Misc: GCC build and warning fixes

(cherry picked from commit 4d69cc1c56)

# Conflicts:
#	src/common/Utilities/Util.cpp
#	src/server/database/Database/MySQLConnection.cpp
#	src/server/game/Battlefield/Zones/BattlefieldTB.cpp
#	src/server/game/DataStores/M2Stores.cpp
#	src/server/game/DungeonFinding/LFGMgr.cpp
#	src/server/game/DungeonFinding/LFGPlayerData.cpp
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Item/Item.cpp
#	src/server/game/Entities/Object/Updates/UpdateFields.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Player/RestMgr.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Handlers/PetHandler.cpp
#	src/server/game/Server/Packets/GuildPackets.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Auras/SpellAuras.cpp
#	src/server/game/Spells/Spell.cpp
#	src/server/game/Spells/SpellInfo.cpp
#	src/server/game/Spells/SpellMgr.cpp
#	src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp
#	src/server/scripts/Kalimdor/HallsOfOrigination/instance_halls_of_origination.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
#	src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
#	src/server/scripts/Northrend/zone_sholazar_basin.cpp
#	src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
#	src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
#	src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
#	src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp
#	src/tools/vmap4_extractor/gameobject_extract.cpp
#	src/tools/vmap4_extractor/model.cpp
#	src/tools/vmap4_extractor/vec3d.h

* Build system: Print found git version when warning about it being too old

(cherry picked from commit 1ae72db201)

* Build system: Removed hard requirement on BOOST_ROOT being set as environment variable, it can now be also passed as command line argument to cmake and fix compile warning with boost 1.73

(cherry picked from commit 161944b764)

# Conflicts:
#	dep/boost/CMakeLists.txt

* Remove some code that was already removed from 335 and then cherry-picked into master

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2020-05-31 14:17:26 +02:00
Ujp8LfXBJ6wCPR
fb75a958f0 Part1: Modernize codebase with Clang-Tidy range based loops (#24164) 2020-02-29 13:20:05 +01:00
ForesterDev
71a01c75ca Core/Server: improve timestamp format output for large time values (#24193) 2020-02-28 19:24:33 +01:00
ForesterDev
69231581e4 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
2020-02-22 21:31:37 +01:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Treeston
a4d5b24874 Common/Util: Sorry about that unexpected downtime at 3AM last night, everyone. (We call them happy little features.) 2019-08-05 11:23:57 +02:00
Treeston
a5e73e41c0 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
2019-08-04 12:22:57 +02:00
Treeston
309851ea24 Core/Misc: Rewrite some old name handling functions that use raw buffers to no longer be old name handling functions that use raw buffers. 2019-08-03 23:53:10 +02:00
Giacomo Pozzoni
aeddd417c4 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
2019-07-19 21:24:56 +02:00
jackpoz
b33934f6ce 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.
2019-04-19 23:45:07 +02:00
jackpoz
1d04a3b216 Core/Misc: Fix GCC 8 warnings 2019-03-31 17:34:28 +02:00
jackpoz
bdb7e6e5e8 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.
2019-01-12 12:05:48 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Treeston
4c3af3b636 Core/Utils: some code style adjustments, 6d6077e follow-up 2018-12-25 12:36:20 +01:00
Treeston
6d6077e36f Core/Utils: Fix Unicode handling 2018-12-25 01:47:24 +01:00
Treeston
f27284594b [3.3.5] 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
2018-09-13 00:11:27 +02:00
Treeston
66a87c4642 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*
2018-09-07 20:31:04 +02:00
Shauren
b2b4f9d1e4 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

(cherry picked from commit dfd2660a85)
2018-01-06 12:30:28 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Shauren
9ec2a82cac Core/Misc: Prefix all preprocessor defines from CompilerDefs with TRINITY_ to avoid conflicts (PLATFORM_WINDOWS is used/defined by CascLib)
(cherry picked from commit b8db320bf1)
2017-05-23 18:46:44 +02:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
Shauren
caee7dcad5 Core/Utils: Added additional argument to Tokenizer class to make it behave like strtok - not returning empty tokens in case of multiple consecutive separators in input string
(cherry picked from commit dd1533b315)
2016-08-06 14:29:11 +02:00
Shauren
39abb8acb3 Core/Misc: MSVC warning fixes
(cherry picked from commit 70412e7e25)
2016-04-09 18:13:30 +02:00
Shauren
9295d9fa09 Core/Util: Extracted GetPID to separate function
(cherry picked from commit e3af42e05c)
2016-03-21 17:26:48 +01:00
Shauren
298d70476e Core/Misc: Partial port of d9f1d6466d (refactoring) 2016-03-12 21:21:41 +01:00
Shauren
55ef8d80a3 Core/Utils: Moved rng functions to separate header and added utility functions to select a random element from a container where each element can have different chance of being selected
(cherry picked from commit ae20b2ab56)
(cherry picked from commit 921d893c2a)
(cherry picked from commit 9ab10d6e68)
(cherry picked from commit 00c878e73a)
(cherry picked from commit ff9c999334)
(cherry picked from commit bc94bacce4)
(cherry picked from commit d5b0ffbe9b)
2016-02-09 19:26:29 +01:00
Rushor
923a368ac7 Update copyright note for 2016 2016-01-01 12:02:33 +01:00
treeston
c0faee0795 Core/Util: Add a urandms(min,max) helper to make urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS) shorter to write for random time intervals (boss scripts). 2015-11-28 23:53:04 +01:00
StormBytePP
1f66d719f2 Core/BuildSystem: Merge collision, debugging, threading, utilities and configuration into "common" which does not depend on shared anymore and moved database out of shared library
These changes enables to build tools only without even having MySQL installed
2015-08-16 21:23:15 +02:00