Commit Graph

201 Commits

Author SHA1 Message Date
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
Treeston
2a607e647f Core/Misc: A few more advstd imports from C++17 2018-09-27 14:45:13 +02:00
Treeston
1dc675f0a1 Core/Misc: constexpr a bunch of things, and a missing include of Windows.h somewhere
(that last one wasn't me!)
2018-09-27 14:42:42 +02: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
62db1fb683 Core/CrashHandler: Include assertion messages in crash reports 2018-08-29 23:59:24 +02:00
Keader
4d9c36c8c3 Utilities/EventProcessor: Added a overload to AddEventAtOffset accept rand time 2018-08-26 01:02:58 -03:00
Treeston
64a61e03ab Common/Containers: Eliminate a edge case that could potentially lead to object invalidation. 2018-07-19 11:59:36 +02:00
Treeston
2ef9d301f0 Misc: Pass std::chrono types by value everywhere. 2018-07-18 17:48:15 +02:00
Shauren
0ead73516a Core/Misc: Improved ip2location code and set it to disabled by default 2018-06-23 21:31:09 +02:00
Gildor
e323652f79 Nopch fix (#22077) 2018-06-23 11:32:55 +02:00
Gooyeth
2fe4ab94c5 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
2018-06-23 01:32:39 +02:00
jackpoz
9fb11fc8f2 Dep/Boost: Fix crash in Boost
Work around a NULL dereference exception happening in boost::asio::ip::tcp::resolver::results_type, resulting in a crash when trying to bind on an address that cannot be resolved.
Fixes #21884
2018-04-27 21:25:14 +02:00
ccrs
6d069b631f Build: fix noPCH 2018-04-19 15:02:07 +02:00
Shauren
b9c6bbb51d Core/Maps: Adjusted logic in GetFullTerrainStatusForPosition to closer match what the client does regarding being inside WMOs
Closes #21625
Closes #21624
Closes #21516
2018-04-07 21:36:15 +02:00
Shauren
2dadbda24a Revert "Core/Entities: Reduce the probability of units dropping under the map (#21322)"
This reverts commit 9e0faace9a.
2018-04-07 21:36:14 +02:00
Treeston
2a84562dc8 Core/Movement: Replace old TargetedMovementGenerator into 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.
2018-04-06 18:09:55 +02:00
Shauren
901eed7828 Core/CrashHandler: Fixed generating crash logs from CRT debug assertions
(cherry picked from commit abdf6479dd)
2018-03-10 15:51:57 +01:00
ariel-
d18f8b94b0 Scripts/Commands: implemented command .server debug
- Shows detailed information about server setup, useful when reporting a bug:
 * rev. hash
 * versions of mysql, openssl, boost, cmake
 * info about autoupdater
 * info about ports (realmlist and current)
 * vmap/map/mmap status and folder sizes
 * available DBC locales
 * TDB version

Closes #19957
2018-03-06 18:48:57 -03:00
Warlockbugs
efef6b5e36 Core/Crypto: Transitional Cryptography update for OpenSSL 1.1 (#21533)
Support for both OpenSSL 1.0 LTS and OpenSSL 1.1 versions.

Many Linux distributions are still on 1.0 and will stay on LTS for quite
some time.

Port of CMaNGOS commit: e1b0048f05
2018-03-04 15:53:41 +01:00
jackpoz
db5c9867e2 Core/Misc: Add PERFORMANCE_PROFILING CMake option
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.
2018-02-17 23:29:34 +01:00
Jeremy
9e0faace9a Core/Entities: Reduce the probability of units dropping under the map (#21322)
Reduce the probabilty of going under the map
2018-02-16 20:59:19 +01:00