aboutsummaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2021-12-19Core/Random: Refactor random number generation to use ↵Shauren
std::uniform_*_distribution to restrict result range instead of doing that ourselves * Seed SFMTRand with more values for its state (cherry picked from commit 73bc3d8ea49a4793b14976e86010a36f19c1d18b)
2021-12-19Dep/SFMT: updated to newest upstream version from ↵daMaex
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) (cherry picked from commit 4e0279b0e48c9992842010b9f3f132e54a460128)
2021-12-18[3.3.5] Core/Authserver: TOTP rewrite: (PR #23633)Treeston
- 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 (cherry picked from commit 4211645834c467a03c60248e80818d3607be9ea7)
2021-12-18Common/Util: Sorry about that unexpected downtime at 3AM last night, ↵Treeston
everyone. (We call them happy little features.) (cherry picked from commit a4d5b24874e7f6f09efc69119785c7c9113870b4)
2021-12-18Core/Pooling: Quest pooling rewrite: (PR#23627)Treeston
- 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 a5e73e41c0e813e674bb0a644e0052052435494e)
2021-12-18Core/Misc: Rewrite some old name handling functions that use raw buffers to ↵Treeston
no longer be old name handling functions that use raw buffers. (cherry picked from commit 309851ea2442457c87f791bb44abfa89e04af1af)
2021-12-17Core/Misc: Remove Trinity::Containers::Size (duplicate of advstd::size)Treeston
(cherry picked from commit f1d9a36c5fce23ae9c68e221521a2b492709f8e5)
2021-12-17Core/AI: No longer do strange things when told to enter evade mode while ↵Treeston
there's no need to do so, typically by terrible legacy code. (cherry picked from commit 163f44c1b08cc043b114585922bd08664434bf92)
2021-12-16Core/Misc: Handle timezones for hour-specific events specifieds in ↵Giacomo Pozzoni
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 aeddd417c460c43d885cb89ceaa6e051c44b1d27)
2021-12-16build fix after d1dc0e2Treeston
(cherry picked from commit c0f8e8535a025b29557385c95338b642fbda39e8)
2021-12-08Core/Misc: Exclude boost 1.78 and newer from ↵Shauren
boost_1_73_process_windows_nopch hack
2021-12-02Core/CrashHandler: Remove sensitive data from crashlogsjackpoz
(cherry picked from commit 25bcb1a0b2d9326519d9226dfe968caf26bb4e2d) (cherry picked from commit 37478c5ac1efb8e4f19ffc94f444e160600c7b27)
2021-12-02Shared/Metric: Fix a rare memory leakjackpoz
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. (cherry picked from commit 0d1ff7446dce7b0641f49ac55a008669838612cd)
2021-12-01Core/Calendar: Improve calendar timezone handlingjackpoz
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 b33934f6ce9b0227597c712dd6a76b7ed49deea3)
2021-11-30Core/Movement: Add time synchronisation (#18189)Chaouki Dhib
(cherry picked from commit 975f1e364a6a68be2beca261a64ea8aecc16f6f6)
2021-11-24Core/Misc: Fix GCC 8 warningsjackpoz
(cherry picked from commit 1d04a3b216901671eae0104547715a570b1ff3ab)
2021-11-23Core/Misc: Added lambda support to EventProcessorShauren
Closes #22909 (cherry picked from commit 813f693768ee94864b0d24423b9265bde2c9903d)
2021-11-23Shared/Utilities: Handle string format exceptionsGiacomo Pozzoni
Handle StringFormat() exceptions in case of malformed string format to avoid causing unhandled exception crashes (cherry picked from commit c79811de4fbf2b22cd74f55853516c7fc307055f)
2021-11-22Dep/Recast: Update recastnavigation to ↵jackpoz
https://github.com/recastnavigation/recastnavigation/commit/14b2631527c4792e95b2c78ebfa8ac4cd3413363 Rebuilding mmaps IS required (cherry picked from commit 5ff88ea04aec4677f1c1d669674e5442288a25e3)
2021-11-21Core/Utils: Handle UTF-8 conversion errorsjackpoz
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 bdb7e6e5e81e0d9376c9c803bae9da470b02d8cd)
2021-11-16Core/Utils: some code style adjustments, 6d6077e follow-upTreeston
(cherry picked from commit 4c3af3b636d5e9279fb694c9d9a5a4422ad773d0)
2021-11-16Core/Utils: Fix Unicode handlingTreeston
(cherry picked from commit 6d6077e36fe9c5cb8ea8e4f981d637e72ee87037)
2021-11-16Core/Misc: Fix vsnprintf usage in ASSERT()jackpoz
Fix vsnprintf to follow standard definition and not some old VC++ behavior, not requiring to include the '\0' character in the count parameter (cherry picked from commit eee1f2cadf8174caca4849c22ba1fb8f12fc9e08)
2021-11-16Core/Misc: Log more information in asserts (#22783)Giacomo Pozzoni
* 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 (cherry picked from commit 9a924fb9d557434c5a2e4020c80db6e6bfe466ad)
2021-11-15Fix invalid arguments to string format in Trinity::FatalWarpten
Isn't whatever is used nowadays to make this stuff safe supposed to prevent this sort of stuff? (cherry picked from commit 9bf69b3849a9d78f3e8d174ed6367a259aaf876f)
2021-11-15Core/Misc: Partial merge of 3.3.5-dbedit:Treeston
- 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 Core/Util: Redesign SmartEnum to properly work for large enums (>64 entries) and play nice with IDEs (PR #22768) (cherry picked from commit 338e8ba0fea8b4b15120c96fff15a6c4b1a52593) (cherry picked from commit f7ca0877a3736000a6e3b4ed09ac5f08b4d8e3f0) (cherry picked from commit 207093475a177e9fd29696e80fdd06a11324782d) (cherry picked from commit ee68cf33921944fd3f8c188044906998cf10ff2a) (cherry picked from commit c16d461e16f0704bb11040faff30953d33ba2188) (cherry picked from commit f6b0d99e2c0bc22b44d6f3cfdae50cbba7d51de8) (cherry picked from commit bc1f456125c1b6c90617a514152d69c40ce64886)
2021-11-12Core/Misc: Add a missing include of Windows.h to Errors.cppTreeston
(that last one wasn't me!) (cherry picked from commit 1dc675f0a17d9c7d1b6e9a07d5c25cdd79bb8788)
2021-11-04Core/DataStores: Add a bit more info to db2 file loader sign check assertionsShauren
2021-10-31Core/Misc: FIx a GCC warningShauren
2021-10-31Core/Chat: Unify chat hyperlink parsing (PR #22417)Treeston
- 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 f27284594b18000a1c098262728fb19fdc63fc6c)
2021-10-26Core/Conversations: Dropped time fields and calculate them using db2 data ↵ModoX
(#27151)
2021-10-25Scripts/Commands: New argument parsing methodology (PR #22363)Treeston
- 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 66a87c4642d25f27ca24254cfeb0a0c4b21036b1)
2021-10-24Core/DataStores: Hackfix broken db2 files that have invalid id tablesShauren
2021-10-23Core/CrashHandler: Include assertion messages in crash reportsShauren
(cherry picked from commit 62db1fb683c13b8dde0cc359564e090e0594658f)
2021-10-23Utilities/EventProcessor: Added a overload to AddEventAtOffset accept rand timeKeader
(cherry picked from commit 4d9c36c8c3bc59afb74ffe336ff121c06812d645)
2021-10-15Common/Containers: Eliminate a edge case that could potentially lead to ↵Treeston
object invalidation. (cherry picked from commit 64a61e03ab0799b5437ddb9fe702c4912f3f9dd9)
2021-10-14Misc: Pass std::chrono types by value everywhere.Treeston
(cherry picked from commit 2ef9d301f0869b443122e2ba543af054c5b0e53c)
2021-10-06Core/Misc: Fix another gcc warningShauren
2021-10-06Common/Misc: Clean-up a GCC sign comparison warningTreeston
(cherry picked from commit 643b9209f8f1bc90fa4e26fc06e95f89b2b04899)
2021-09-26Core/Misc: movement header cleanupccrs
(cherry picked from commit f9914caefc59f36ab7583432442a26b29124b7f1)
2021-09-25Core/Maps: Adjusted logic in GetFullTerrainStatusForPosition to closer match ↵Shauren
what the client does regarding being inside WMOs Closes #21625 Closes #21624 Closes #21516 (cherry picked from commit b9c6bbb51df0ed10f74617482740fedb91ff5366)
2021-09-24Core/Movement: Replace old TargetedMovementGenerator into ↵Treeston
ChaseMovementGenerator and FollowMovementGenerator, full rewrite for both. - Chase to angle is now functional. Pets use this to chase behind the target. Closes #19925. - Chase to arbitrary range interval works. Not used anywhere, but you can technically make hunter-like mobs. - Pets now follow the hunter cleanly and without stutter stepping. Also fix some other things. Closes #8924. (cherry picked from commit 2a84562dc85516f432bb1e5de9add23c28b26ce4)
2021-08-31Core/Misc: Fix windows nopch buildShauren
Closes #25363 (cherry picked from commit 6ad58d604a63bacc13ee92c525189931d41d1e91)
2021-08-08Core/Misc: Add PERFORMANCE_PROFILING CMake optionjackpoz
Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance. This option is unsupported, do not report any issue happening when enabling this option. (cherry picked from commit db5c9867e2ffde3657f53bc155b474c5d46884dd)
2021-06-19Core/Movement: Creatures' idle movement generator can no longer override ↵Treeston
player mover control. Tagging #20310, partial fix. (cherry picked from commit d02f481d9ac8e1d1a7716368f609d53a5add0960)
2021-06-13Core/Misc: Add container utility function ↵Shauren
Trinity::Containers::EnsureWritableVectorIndex to replace if (i >= vec.size()) vec.resize(i + 1) copypaste everywhere
2021-05-29Fix buildShauren
2021-05-29Core/Maps & Extractors: Move copypasted map file headers into a single ↵Shauren
shared file and replace #defines with enums
2021-05-29Core/Misc: Rename MapDefines.h to MMapDefines.h as it contains mmap defines ↵Shauren
exclusively
2021-05-27Core/Logging: Add functions that allow creating loggers and appenders from ↵Shauren
other sources than config files