Commit Graph

222 Commits

Author SHA1 Message Date
Shauren
73bc3d8ea4 Core/Random: Refactor random number generation to use std::uniform_*_distribution to restrict result range instead of doing that ourselves
* Seed SFMTRand with more values for its state
2019-11-09 15:09:22 +01:00
daMaex
4e0279b0e4 Dep/SFMT: updated to newest upstream version from https://github.com/MersenneTwister-Lab/SFMT
* only needed files added
* used CMake and SFMTRand from https://github.com/TrinityCore/TrinityCore/pull/23240 (Thank you Artox)
2019-11-09 15:09:22 +01:00
Treeston
3750c1cad9 I actually changed compilers in godbolt this time. This does it. Really. (31b5632 7378bcb 0a40252) 2019-08-12 14:37:01 +02:00
Treeston
0a40252c29 i am so done with compilers for today , WHY IS STD::SWAP NOT A CONSTEXPR ASDFOWQWDO (31b5632 7378bcb follow-up grml) 2019-08-12 14:33:04 +02:00
Treeston
7378bcb418 ugh. compilers. 31b5632 follow-up. 2019-08-12 14:25:28 +02:00
Treeston
31b5632c00 Common/Utilities: Explicit tail recursion to keep the compilers happy. 2019-08-12 14:19:22 +02:00
Treeston
0f7e070ed4 Common/Crypto: Make C++14 compilers happy. 2019-08-11 13:29:50 +02:00
Treeston
4211645834 [3.3.5] Core/Authserver: TOTP rewrite: (PR #23633)
- Proper management commands (.account 2fa)
- Secrets can now be encrypted (set TOTPTokenSecret in .conf)
- Secret now stored in binary
- Argon2 and AES primitives
- Base32/64 support
2019-08-10 21:34:51 +02:00
Treeston
b2b9880377 Core/Common: fix a bug in BigNumber::AsByteArray that was causing incorrect output in 1/256 cases with explicit minSize (iff MSB zero) 2019-08-06 11:24:48 +02: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
Treeston
f1d9a36c5f Core/Misc: Remove Trinity::Containers::Size (duplicate of advstd::size) 2019-07-29 16:38:28 +02:00
Treeston
163f44c1b0 Core/AI: No longer do strange things when told to enter evade mode while there's no need to do so, typically by terrible legacy code. 2019-07-29 00:14:10 +02:00
Sebastien Levy
7e10438b27 Core/Misc: MSVC build error (#23637)
- fixed a constness error leveraged by msvc 16.2
2019-07-25 17:00:03 +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
Treeston
c0f8e8535a build fix after d1dc0e2 2019-07-19 20:37:22 +02:00
SolarisSDK
ebfe5a637e Local-only mode fix (#23546)
* Local-only mode fix

In response to issue #21309

* Full patch also for boost 1.66 and newer
2019-07-04 19:18:44 +02:00
jackpoz
37478c5ac1 Core/CrashHandler: Update placeholder text 2019-04-28 17:53:19 +02:00
jackpoz
25bcb1a0b2 Core/CrashHandler: Remove sensible data from crashlogs 2019-04-28 17:32:53 +02:00
jackpoz
0d1ff7446d Shared/Metric: Fix a rare memory leak
Fix a memory leak in Metric happening only when enabling/disabling Metric from configs at runtime, leaking the metric added between last SendBatch() call and the ScheduleSend() call in the same function. The only way to reproduce this is to actually freeze the thread calling SendBatch(), disable metric, reload config, unfreeze the thread.
2019-04-27 17:18:13 +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
Chaouki Dhib
975f1e364a Core/Movement: Add time synchronisation (#18189) 2019-04-15 23:31:25 +02:00
Shauren
d56c671064 Core/Dep: Boost 1.70 compatibility
(cherry picked from commit bcda8dd742)
2019-04-14 01:04:02 +02:00
Shauren
daf9e1be03 Add missing fclose
(cherry picked from commit a71d4b70ff)
2019-04-02 19:53:05 +02:00
jackpoz
1d04a3b216 Core/Misc: Fix GCC 8 warnings 2019-03-31 17:34:28 +02:00
Shauren
1e2cc147e5 Warning fix
(cherry picked from commit 87278b69f0)
2019-02-23 22:00:05 +01:00
Shauren
7b561373a8 Tools/mmaps_generator: Give land priority during area merges over liquids
Closes #21700

(cherry picked from commit edb2b16f54)
2019-02-23 22:00:05 +01:00
Shauren
8d1bb258fc Tools:
* mapextractor - fixed compressing liquid data
* vmapextractor - fixed extracting liquids inside WMOs
* vmapextractor - implemented new WMO flags
* vmapextractor - store model type for gameobject models
* mmap_generator - fixed processing liquids broken in e5d23103f3

(cherry picked from commit 2c64bb97e6)
2019-02-23 22:00:05 +01:00
Shauren
cd6d57e2e7 Core/Misc: Improved error message reported by ASSERT_NOTNULL
(cherry picked from commit d184768bbc)
2019-02-16 17:26:57 +01:00
Shauren
ab22619f46 Fix build 2019-02-15 21:55:52 +01:00
Shauren
7515553c29 Fix build for older compilers 2019-02-15 21:37:31 +01:00
Shauren
813f693768 Core/Misc: Added lambda support to EventProcessor
Closes #22909
2019-02-15 21:34:56 +01:00
Giacomo Pozzoni
c79811de4f Shared/Utilities: Handle string format exceptions
Handle StringFormat() exceptions in case of malformed string format to avoid causing unhandled exception crashes
2019-02-15 20:01:10 +01:00
jackpoz
5ff88ea04a Dep/Recast: Update recastnavigation to 14b2631527
Rebuilding mmaps IS required
2019-01-26 20:44:27 +01:00
jackpoz
dc628b23e2 Core/Misc: Fix clang 6.0 warnings
Ported from e9bcae1fad
2019-01-19 15:02:47 +01:00
Kittnz
d1c3ee9579 Core/Objects: increase sight range of objects & correct general default visibility distance (#22891)
This can be used for anything really.
Note: This does not make the object active.

#21111 #21681
2019-01-16 20:47:25 +01: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
Giacomo Pozzoni
166bb31163 Shared/Misc: Use C99 conformant snprintf and vsnprintf in Visual Studio (#22876) 2018-12-19 11:27:44 +01:00
jackpoz
eee1f2cadf Core/Misc: Fix vsnprintf usage in ASSERT()
Fix vsnprintf to follow standard definition and not some old VC++ behavior, not requiring to include the '\0' character in the count parameter
2018-12-16 12:09:20 +01:00
Giacomo Pozzoni
9a924fb9d5 Core/Misc: Log more information in asserts (#22783)
* Core/Misc: Log more information in asserts

Add a new function GetDebugInfos() to types that could trigger an ASSERT() to easily include more useful information in crashlogs.
This is an initial commit that requires many more commits to implement the new GetDebugInfos() function in all required types.
If the type doesn't have the function, the global default one is picked which doesn't log anything.

* Core/Misc: Fix dynamic build

Add missing attribute for dynamic build

* Core/Misc: Fix gcc/clang build

* Core/Misc: Rename GetDebugInfos() to GetDebugInfo()

* Core/Misc: Fix FormatAssertionMessage() adding an extra '\0'

* Core/Misc: Add GetDebugInfo support to Unit

* Core/Misc: Add GetDebugInfo support to Creature

* Core/Misc: Add more info to GetDebugInfo for Creature

* Core/Misc: Add GetDebugInfo support to GameObject

* Core/Misc: Add GetDebugInfo support to Player

* Core/Misc: Add more GetDebugInfo info

* Core/Misc: Add GetDebugInfo support to Item

* Core/Misc: Add GetDebugInfo support to Bag

* Core/Misc: Add GetDebugInfo support to Transport

* Core/Misc: Add GetDebugInfo support to TempSummon, Minion, Guardian, Pet

* Core/Misc: Add GetDebugInfo support to Map, InstanceMap

* Core/Misc: Add GetDebugInfo support to Spell

* Core/Misc: Fix build warning

* Core/Misc: Add GetDebugInfo support to Aura

* Core/Misc: Add GetDebugInfo support to UnitAI
2018-12-14 22:01:16 +01:00
Shauren
bc1f456125 Fix nopch build 2018-11-14 22:57:06 +01:00
Treeston
c16d461e16 Core/Util: Redesign SmartEnum to properly work for large enums (>64 entries) and play nice with IDEs (PR #22768) 2018-11-11 17:52:41 +01:00
Warpten
9bf69b3849 Fix invalid arguments to string format in Trinity::Fatal
Isn't whatever is used nowadays to make this stuff safe supposed to prevent this sort of stuff?
2018-10-27 22:14:37 +02:00
Treeston
f7ca0877a3 338e8ba follow-up (more constexpr) 2018-10-26 17:42:29 +02:00
Treeston
338e8ba0fe Core/Misc: Partial merge of 3.3.5-dbedit:
- Added SmartEnum.h for enum iteration, stringification, and more, courtesy of krabicezpapundeklu/smart_enum
- Moved a bunch of enums in SharedDefines.h to the new system
- Miscellaneous utility methods ported
2018-10-26 14:43:22 +02:00
Treeston
ac253e1e41 cleanup unused variable error (2a607e6 follow-up) 2018-09-27 15:59:36 +02:00