Commit Graph

241 Commits

Author SHA1 Message Date
Treeston
d5816cc224 nopch fix 2020-07-22 17:18:37 +02:00
Treeston
544b6a3381 Misc: assert -> ASSERT
# Conflicts:
#	src/common/DataStores/DBCFileLoader.h
#	src/server/scripts/Commands/cs_debug.cpp
2020-07-22 17:16:21 +02:00
Shauren
db5a6d2738 Nopch fix 2 2020-07-22 13:46:16 +02:00
Treeston
ec04d3b2cd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
Giacomo Pozzoni
52d9bb2538 Core/Threads: Replace Boost TLS with C++11 one (#15782)
* Core/Threads: Replace Boost TLS with C++11 one

Replace boost::thread_specific_ptr<T> thread-local storage with C++11 thread_local to remove libboost_thread dependency from common project

* Fix no-pch build
2020-07-18 22:48:03 +02:00
Peter Keresztes Schmidt
a06e5d7d40 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs 2020-07-18 22:43:24 +02:00
Ovahlord
d46fb93657 Core/Pools: ported pooling updates from 335 branch 2020-07-13 11:17:19 +02:00
Ovahlord
d077c92011 Core/Datastores: ported locale related datastore updates in order to load storage locales properly when set in config 2020-07-07 02:39:07 +02:00
jackpoz
cb6611b048 Core/MMAPs: Fix small steps being considered as NAV_AREA_GROUND_STEEP 2020-06-26 21:27:04 +02:00
Giacomo Pozzoni
85532de2e9 Handle different slopes in mmaps (#24765)
* Tools/MMAPs: Remove input argument --maxAngle

Remove input argument --maxAngle . This should be just hardcoded in MapBuilder::GetMapSpecificConfig() so all settings are easily found in the same place instead of being spread around.

* Tools/MMAPs: Add new area type NAV_AREA_GROUND_STEEP

Add new area type NAV_AREA_GROUND_STEEP for ground with slope in the range (55, 70] .
NAV_AREA_GROUND is used for ground with range [0, 55] .
NAV_AREA_GROUND_STEEP takes priority over NAV_AREA_GROUND.

* Tools/MMAPs: Fix NAV_GROUND_STEEP flag not being saved in the mmtile

* Core/PathFinding: Implement NAV_GROUND_STEEP flag

Implement NAV_GROUND_STEEP flag, used only by Creatures that are in combat or evading.

* Distinguish between RC_WALKABLE_AREA and NAV_AREA_GROUND.

* Allow mobs in combat to walk on steeps up to 80°

* Allow mobs in combat to walk on steeps up to 85°.
Disable rcFilterLedgeSpans() filter as it removed long steep spans.

* Increase cost of steep spans to try making creatures walk around obstacles instead of walking on them

* Revert last commit
# Conflicts:
#	src/server/game/Movement/PathGenerator.cpp
2020-06-18 02:16:11 +02:00
funjoker
a70b9d3be8 Misc: Fix nopch build 2020-06-11 20:34:03 +02:00
Giacomo Pozzoni
9fdf598792 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)

* 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)

* 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)

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

Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 8c09b6e58b)
2020-06-11 20:24:00 +02:00
Shauren
40f80fc0ed Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-06-11 01:35:27 +02:00
Warpten
0af44ccc01 Core/Spells: implement DoT clipping
* Core/Spells: Implementation of DoT clipping.
* Core/Utilities: Backport "EnumFlags v3.0" from master.
* Core/Spells: Switch AURA_REMOVE_MODE to a flag set.
2020-06-04 18:16:03 +02:00
Warpten
3994e2a183 Core/Errors: Fix a bad formatting call. (#115) 2020-06-02 20:01:30 +02:00
Giacomo Pozzoni
e3bab35d5e Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)
* Core/MMAPs: Adjust walkable climb

Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb.

* Temporarily disable static collision (the whole check should be removed)

* Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP

* Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells)

* Code refactor

* Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH

* Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors.

* Remove whitespace

* Revert 4a197ba22a as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End

* Cleanup PathGenerator raycast case

* Fix PathGenerator raycast broken if start and end are on same poly.
Fix PathGenerator raycast broken if no wall is hit.
Remove unused case of using raycast with an existing previous path (can be added back properly if needed).
Remove forcing poly length to 2 when we actually have already the right number.

* Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast.
Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead.

* Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision)

* Add far from poly flags

* Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly

* Fix blink close to walls with no valid polygon behind the wall

* Require to re-extract mmaps

Co-authored-by: Ovah <dreadkiller@gmx.de>
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
2020-05-16 13:45:57 +02:00
Shauren
ca881f7e3f Core/DBLayer: Implement async transaction completion callbacks 2020-04-15 21:41:14 +02:00
Ovahlord
2a9fc25269 Core/Misc: fixed more no pch errors 2020-03-11 13:42:42 +01:00
Ovahlord
5db48393bc Core/Collision: improved codestyle accross the board 2020-03-05 18:20:41 +01:00
Ovahlord
d9b854ad59 Core/Datastores: backported hotfix system implementation 2020-02-21 23:13:38 +01:00
Ghaster
df173c7e1c Core/Bnet: Cleanup/Improve Battle.net account commands (#33) 2020-02-19 02:52:11 +01:00
jackpoz
6eb44dff00 Core/Misc: Fix clang 6.0 warnings
Ported from e9bcae1fad
2020-01-31 21:41:33 +01:00
jackpoz
183789053e Core/Misc: Fix GCC 8 warnings 2020-01-31 21:19:25 +01:00
jackpoz
8714c2be57 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.
2020-01-31 20:51:51 +01:00
Treeston
cd3fa07389 Core/Utils: some code style adjustments, 6d6077e follow-up 2020-01-31 20:50:06 +01:00
Treeston
3ab2d9575e Core/Utils: Fix Unicode handling 2020-01-31 20:49:10 +01:00
Treeston
eed78a603e Core/Misc: Rewrite some old name handling functions that use raw buffers to no longer be old name handling functions that use raw buffers. 2020-01-31 20:31:14 +01:00
Aokromes
d6d3f06f06 New year 2020-01-04 18:32:38 +01:00
funjoker
6c56916b29 Misc: Update copyright information
Happy new year
2020-01-01 18:47:28 +01:00
Shauren
bbdf60701b 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

# Conflicts:
#	src/common/Utilities/Random.cpp
2019-11-10 18:58:25 +01:00
daMaex
983f28e73b 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)

# Conflicts:
#	dep/SFMT/CMakeLists.txt
2019-11-10 18:57:48 +01:00
Ovahlord
8bec6af24a Core/NetworkIO: implement 2nd connection 2019-10-03 22:32:24 +02:00
Ovahlord
78e5791f19 Fixed build for newer boost versions 2019-09-12 03:16:24 +02:00
SolarisSDK
a0e7958f85 Local-only mode fix (#23546)
* Local-only mode fix

In response to issue #21309

* Full patch also for boost 1.66 and newer
2019-09-12 01:09:36 +02:00
Sebastien Levy
8e250910b4 Core/Misc: MSVC build error (#23637)
- fixed a constness error leveraged by msvc 16.2
2019-08-03 23:04:53 +02:00
jackpoz
66f2bd91bb 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 21:10:05 +02:00
Ovahlord
ee69943717 Core/Movement: ported time synchronization (commits: 975f1e364a and 50d32fe493) 2019-04-26 16:48:09 +02:00
Shauren
2fb644344d Core/Dep: Boost 1.70 compatibility
(cherry picked from commit bcda8dd742)

# Conflicts:
#	src/server/authserver/Main.cpp
#	src/server/shared/Realm/RealmList.cpp
#	src/server/shared/Realm/RealmList.h
2019-04-14 12:18:33 +02:00
Ovahlord
8acc08fcba Dep: merged RecastNavigation updates from 3.3.5 branch 2019-02-25 08:25:59 +01:00
Ovahlord
fe7bcac696 Core/Maps: ported all master branch changes for map extractor including height map extraction
* new maps, and mmaps are required
2019-02-25 07:37:47 +01:00
Ovahlord
f763095de9 Core: merged some analysis issue fixup commits from master and 335 2019-02-18 04:15:05 +01:00
Ovahlord
50a91bd590 Core/Movement: merged Collision height handling from 335 branch to reduce the probability that creatures are falling under the map 2019-02-17 23:40:24 +01:00
Ovahlord
659ad3bca1 Core/Misc: Added lambda support to EventProcessor (ported commit: 813f693768) 2019-02-16 02:31:41 +01:00
Ovahlord
7edabcbd88 Core/Movement: ported and merged Follow and Chase movement generator rewrite 2019-02-07 23:51:45 +01:00
Ovahlord
7543c45c7c Core/Objects: ported and implement custom visibility range functionality for creatures and gameobjects. Gameobjects will now get their visbility range read from their template data while creatures can be modified at will. The initial visbility distance changes has been parsed from MoP difficulty data by Kilyana 2019-01-02 15:51:56 +01:00
Ovahlord
be540664c3 Core/Maps: remove a NULL macro from MapTree 2018-10-17 11:58:39 +02:00
Ovahlord
1a1790b737 Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
# Conflicts:
#	src/server/game/AI/SmartScripts/SmartScript.cpp
#	src/server/game/Skills/Archaeology/ArchaeologySites.cpp
#	src/server/scripts/Spells/spell_mage.cpp
2018-09-17 15:43:22 +02:00
Aokromes
6815c24be1 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-09 14:31:14 +02:00
Ovahlord
65a0dbadd3 Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4 2018-09-03 07:14:17 +02:00
Shauren
4bfd1314ba Core/CrashHandler: Include assertion messages in crash reports 2018-08-30 00:03:18 +02:00